12.04.2014, 13:21
Delete 'carname' that's your first warning because you've defined it and you never used it..
Try something like that.
pawn Код:
CMD:afix(playerid,params[])
{
new target;
if(!IsAdmin(playerid,3)) return SendMsg(playerid, 5);
if(sscanf(params,"u",target)) return SendClientMessage(playerid,0xF69521AA,"USAGE: /afix <playerid>"); //Your color doesn't work
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, RED, ""RED2_"{FF0000}»Warning«{FF1919}"RED_" This player is not connected");
if(IsPlayerNPC(target) && !strcmp(pName[target],"Jonny")) SendNpcPM(playerid," retard!!"),GiveMedal(playerid,24);
if(IsPlayerNPC(target)) return 0;
if(GetPVarInt(target,"RACER")) return SendClientMessage(playerid,RED," "RED2_"{FF0000}»Warning«{FF1919}"RED_" you cant fix cars in race");
if(!IsPlayerInAnyVehicle(target)) return SendClientMessage(playerid,RED," "RED2_"{FF0000}»Warning«{FF1919}"RED_" this player is not in a vehicle");
RepairVehicle(GetPlayerVehicleID(target));
SetVehicleHealth(GetPlayerVehicleID(target), 1000.0);
new str[128];
format(str,sizeof(str)," {004131}»Admininfo«{00FF99} you have fixed %s's vehicle",pName[target],target);
SendClientMessage(playerid, 0xF69521AA, str); //Syntax was also wrong
format(str,sizeof(str)," {004131}»Admininfo«{00FF99} your vehicle has been fixed by admin %s",pName[playerid]);
SendClientMessage(target, 0xF69521AA, str); //The syntax was wrong
return 1;
}