SetVehicleHealth
From SA-MP Wiki
SetVehicleHealth
Sets the vehicle health to a specific value
(vehicleid, Float:health)
| vehicleid | ID of the vehicle. |
| Float:health | Health given as a float value. |
Important Note: A vehicle's health is 1000.0 if it has full health, it will set on fire with a health of 250.0 or below.
This function does not return a specific value.
new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid,1000.0);
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- GetVehicleHealth: Check the health of a vehicle.
- RepairVehicle: Fully repair a vehicle.
- SetPlayerHealth: Set a player's health.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnVehicleDeath: Called when a vehicle is destroyed.
