RepairVehicle
From SA-MP Wiki
Repairs the visual damage (bumps, dents, scratches, wheels and the actual health) of a vehicle.
(vehicleid)
| vehicleid | The ID of the vehicle to repair. |
| Returns | This function doesn't return a specific value |
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 successfully repaired!"); return 1; } }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetVehicleHealth: Set the health of a vehicle.
- GetVehicleHealth: Check the health of a vehicle.
