garageIn
exports["RiP-Fraktion"]:garageIn(vehicle, cb)
This function parks in a fraction vehicle.
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
vehicle | Integer | No | Vehicle handle (object) |
cb | Function | Yes | Callback function with boolean |
Returned Boolean
If the function was successful it will return true
in a callback function. Otherwise it will return false
with an error notify or print.
Example
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
exports["RiP-Fraktion"]:garageIn(vehicle, function(callback)
if callback then
-- continue with your code
else
-- vehicle couldn't be parked
end
end)