SetVehicleHealth

From SA-MP Wiki

Jump to: navigation, search


Sets a vehicle's health to a specific value


Parameters:
(vehicleid, Float:health)
vehicleidID of the vehicle to set the health of.
Float:healthHealth given as a float value.


ReturnsThis function doesn't return a specific value


if(strcmp("/fixengine", cmdtext, true) == 0)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    SetVehicleHealth(vehicleid, 1000.0);
    SendClientMessage(playerid, COLOUR_WHITE, "The vehicles engine has been fully repaired.");
    return 1;
}
Image:32px-Ambox_warning_orange.png Note: Full vehicle health is 1000.


Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools
In other languages