warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
RepairVehicle
Description
Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.).
Name | Description |
---|---|
vehicleid | The ID of the vehicle to repair. |
Returns
true - The function was executed successfully.
false - The function failed to execute. This means the vehicle specified does not exist.
Examples
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/repair", cmdtext))
{
if (!IsPlayerInAnyVehicle(playerid))
{
return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
}
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired!");
return 1;
}
return 0;
}
Related Functions
- SetVehicleHealth: Set the health of a vehicle.
- GetVehicleHealth: Check the health of a vehicle.