RepairVehicle

From SA-MP Wiki

Jump to: navigation, search

RepairVehicle


Warning: This function was added in SA-MP version 0.3. It is not available in previous versions.


Repairs the visual damage (bumps, dents, scratches, wheels and the actual health) of a vehicle.


Parameters:
(vehicleid)
vehicleidThe ID of the vehicle to repair.


This function does not 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 might be useful as well, as they're related to this function in one way or another.

Personal tools