brake smoke fivem code example
Example 1: Set vehicle health fivem
SetVehicleEngineHealth(
vehicle ,
health
)
1000 is max health
Begins leaking gas at around 650 health
-999.90002441406 appears to be minimum health, although nothing special occurs <- false statement
Minimum: -4000
Maximum: 1000
-4000: Engine is destroyed
0 and below: Engine catches fire and health rapidly declines
300: Engine is smoking and losing functionality
1000: Engine is perfect
Example 2: FiveM check if vehicle has flat tires
local retval =
IsVehicleTyreBurst(
vehicle ,
wheelID ,
completely
)
wheelID used for 4 wheelers seem to be (0, 1, 4, 5)
completely - is to check if tire completely gone from rim.
'0 = wheel_lf / bike, plane or jet front
'1 = wheel_rf
'2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left
'3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right
'4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left
'5 = wheel_rr / in 6 wheels trailer, plane or jet is last one right
'45 = 6 wheels trailer mid wheel left
'47 = 6 wheels trailer mid wheel right