RepairVehicle

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:30, 30 January 2014
Smithy (Talk | contribs)

← Previous diff
Revision as of 17:08, 2 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 32: Line 32:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
 +[[fr:RepairVehicle]]
[[pt:RepairVehicle]] [[pt:RepairVehicle]]
[[ru:RepairVehicle]] [[ru:RepairVehicle]]
[[nl:RepairVehicle]] [[nl:RepairVehicle]]

Revision as of 17:08, 2 February 2014



RepairVehicle was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Description:

Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.).


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


Return Values:

This function does not return any specific values.


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

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