isVehicleOnGround
Shared
Returns whether a vehicle is resting on the ground.
bool isVehicleOnGround(vehicle vehicle)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle | The vehicle. |
Returns
true if it is on the ground, otherwise false.
On the client, a vehicle that is not streamed in returns false.
Example
setTimer(function()
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle and not isVehicleOnGround(vehicle) then
outputDebugString("airborne")
end
end, 500, 0)