PHP код:
native IsValidVehicle(vehicleid);
if(isnull(params)) {
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"Usae: /repair [vehicleID]");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid,-1,"You have sucessfully repaired your vehicle!");
} else {
if(IsValidVehicle(strval(params))) {
RepairVehicle(strval(params));
SendClientMessage(playerid,-1,"You have sucessfully repaired the vehicle!");
} else {
SendClientMessage(playerid,-1,"ERROR: Invalid Vehicle ID!");
}
}
return 1;
}