Impact Dynamics / Developers

Client exports

All client exports take a vehicle handle. Leaving it out (nil) uses the vehicle the player sits in, where noted.

RepairVehicle

Lua
exports['ryan-impactdynamics']:RepairVehicle(vehicle)

Clears what Impact Dynamics keeps on the car - bent wheels, jammed doors, a wrecked engine - for everyone, and a pending slow tyre leak on this client. Call it within 8 m of the car, after your mechanic script fixed it with SetVehicleFixed. If the caller is not driving, the condition is only cleared once the car is back at full body and engine health. See Mechanics & garages.

GetVehicleStatus

Lua
local status = exports['ryan-impactdynamics']:GetVehicleStatus(vehicle)   -- vehicle optional

Returns nil for no vehicle, else:

Field Type Meaning
tyre number 0 fine, 1 pressure dropping (slow leak - only known on the client of the driver who picked up the puncture), 2 burst / flat / wheel gone
align number 0 fine, 1 bent, 2 badly bent
alignment number The worst wheel bend, 0.0 - 1.0
fuelLeak number Fuel % per second the tank is losing (0 = not leaking)
jammed table Jammed door indexes, e.g. { 0, 2 }
wrecked boolean Engine dead after a rollover until a repair

IsDoorJammed

Lua
local jammed = exports['ryan-impactdynamics']:IsDoorJammed(vehicle, door)   -- vehicle optional

door: 0 front left (the default), 1 front right, 2 rear left, 3 rear right. A door that is cut off or standing open is not jammed. Returns false when there is no vehicle.

GetJammedDoors

Lua
local doors = exports['ryan-impactdynamics']:GetJammedDoors(vehicle)   -- vehicle optional -> { 0, 1 }
Still stuck? Open a ticket in the Ryan Studios Discord and we'll help you out.