25.08.2016, 15:07
Here the code:-
PHP код:
CMD:test(playerid, parmas[])
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You can only use this command when you are in a vehicle!");// Checks if the player is in a vehicle or not. If yes, it will show the player an error message.
RepairVehicle(playerid);//repairs the vehicle.
SendClientMessage(playerid, -1, "Vehicle successfully repaired!");//Sends the clientmessage about the vehicle to be repaired.
return 1;
}