Errors
#5

Delete 'carname' that's your first warning because you've defined it and you never used it..

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;
}
Try something like that.
Reply


Messages In This Thread
Errors - by VanSiera - 12.04.2014, 13:09
Re: Errors - by BroZeus - 12.04.2014, 13:12
Re: Errors - by VanSiera - 12.04.2014, 13:14
Re: Errors - by VanSiera - 12.04.2014, 13:17
Re: Errors - by Flake. - 12.04.2014, 13:21
Re: Errors - by VanSiera - 12.04.2014, 13:23
Re: Errors - by Flake. - 12.04.2014, 13:27
Re: Errors - by VanSiera - 12.04.2014, 13:31
Re: Errors - by Flake. - 12.04.2014, 13:36
Re: Errors - by VanSiera - 12.04.2014, 13:46

Forum Jump:


Users browsing this thread: 1 Guest(s)