- Documentation
- Server functions
- getVehicleGravity
Function
getVehicleGravity
Returns the vehicle's gravity direction stored with setVehicleGravity (0, 0, -1 by default).
Syntax
float, float, float getVehicleGravity(vehicle vehicle)Arguments
vehiclevehicle- The vehicle.
Returns
x, y, z.
Example
local vehicle = createVehicle(411, 2000, -1690, 13.5)
local gx, gy, gz = getVehicleGravity(vehicle)