if(strcmp("/repair", cmdtext, true, 10) == 0) { SetVehicleHealth(playerid,100); SendClientMessage(playerid, WHITE, "Your vehicle has been repaired!"); return 1; }
SetVehicleHealth(GetPlayerVehicleID(playerid),100);
if(strcmp("/repair", cmdtext, true, 10) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW,"You must be inside vehicle to use this command!");
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_YELLOW,"You do not have enough money to repair your vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid,0xFFFF00AA,"Server: Your Vehicle Has Been Repaired!");
return 1;
}
pawn Код:
|
CMD:fix(playerid, params[])
{
new string[160];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not in a vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid, "~g~Fixed!",3000,3);
format(string, sizeof(string), "[INFO]: %s Has Fixed His Vehicle.", GetName(playerid));
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
if(!strcmp("/repair", cmdtext, true))
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_YELLOW,"You must be inside vehicle to use this command!");
if(GetPlayerMoney(playerid) < 100)
return SendClientMessage(playerid, COLOR_YELLOW,"You do not have enough money to repair your vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid,0xFFFF00AA,"Server: Your Vehicle Has Been Repaired!");
return 1;
}