#
Wheels
#
Get the health of wheels
SHARED
- SV_GetWheelFLHealth returns the health of the left front wheel.
- SV_GetWheelFRHealth returns the health of the right front wheel.
- SV_GetWheelRLHealth returns the health of the left rear (back) wheel.
- SV_GetWheelRRHealth returns the health of the right rear (back) wheel.
The health of a wheel is between 0 and 100.
if veh:SV_GetWheelFLHealth() < 75 then
-- The left front wheel health is less than 75.
end
if veh:SV_GetWheelFRHealth() < 50 then
-- The right front wheel health is less than 50.
end
if veh:SV_GetWheelRLHealth() < 25 then
-- The left rear wheel health is less than 25.
end
if veh:SV_GetWheelRRHealth() == 0 then
-- The right rear wheel health is 0.
end
When someone shoots a wheel, the wheel can be punctured and lose health points over time. The wheel must be repaired so that it is no longer punctured.
SV_IsWheelFLPunctured SV_IsWheelFRPunctured SV_IsWheelRLPunctured SV_IsWheelRRPunctured
#
Set the health of a vehicle
SERVER
SV_SetHealth returns the health of a vehicle. SV_SetMaxHealth returns the maximum health of a vehicle.
veh:SV_SetHealth(125)
veh:SV_SetMaxHealth(200)
SV_SetWheelBlowout(wheelID, state)
SV_GetWheelID(type) SV_GetNearestWheel(pos)
SV_SetWheelFLHealth(value) SV_SetWheelFRHealth(value) SV_SetWheelRLHealth(value) SV_SetWheelRRHealth(value)
SV_DealDamageToWheel(wheelID, value) SV_StartPunctureWheel(wheelID, delayToPuncture) SV_StopPunctureWheel(wheelID)
SV_UpdateWheelSpeed() SV_SetWheelPercent(wheelID, percent)
SV_FullRepair