Command Does nothing?
#1

pawn Код:
COMMAND:invitesapd(playerid, params[])
{
    if(PlayerInfo[pLSPD] != 5))
    {
        new toplayerid, // the player we want to make SA-PD
            rank; // extracting player's ID and rank from params
        if (!sscanf(params, "ui", toplayerid, rank))
        {
          if (toplayerid = INVALID_PLAYER_ID)
          {
            PlayerInfo[pLSPD][toplayerid] = rank;
            new
            message[40];
            format(message, sizeof(message), "You were set rank %i By the SA-PD Leader.!", rank);
            SendClientMessage(toplayerid, 0x00FF00FF, message);
          }
          else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
        }
        else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /finvite <playerid> <rank>");
    }
    else SendClientMessage(playerid, 0xFF0000FF, "Only the SA-PD Leader can use this command!");
    return 1;
}
Edit - updated the command today and still i get nothing, not even command unknown or anything like that :S

Edit 2 - Re did the command but changed it a little and still i get no response in server :S

pawn Код:
CMD:invitelspd(playerid, params[])
{
     if(PlayerInfo[pLSPD] != 5))
     new toplayerid,
         rank;
     if (sscanf(params, "ui", toplayerid, rank)) return SendClientMessage(playerid, 0xFF0000AA, "[SERVER] Usage: /invitelspd <playerid> <rank>");
     else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "[SERVER] Invalid ID");
     else if (toplayerid == playerid) SendClientMessage(playerid, 0xFF0000AA, "[SERVER] You can't invite yourself!");
     PlayerInfo[pLSPD][toplayerid] = rank;
     new message[128]
     format(string, sizeof string, "[SERVER] You were set rank %i by the SA-PD leader", rank,);
     SendClientMessage(giveplayerid, COL_WHITE, message);
     return 1;
     }
For both commands i always get this warning though..

pawn Код:
C:\Users\Scripting.Ash-PC\Desktop\Scripting\Roleplaying Server\gamemodes\roleplay.pwn(391) : warning 203: symbol is never used: "invitelspd"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply


Messages In This Thread
Command Does nothing? - by Lz - 11.12.2012, 18:08
Re: Command Does nothing? - by ReVo_ - 11.12.2012, 18:27
Re: Command Does nothing? - by InfiniTy. - 11.12.2012, 18:35
Re: Command Does nothing? - by Lz - 11.12.2012, 18:38
Re: Command Does nothing? - by ReVo_ - 11.12.2012, 19:55
Re: Command Does nothing? - by NoahF - 11.12.2012, 22:04
Re: Command Does nothing? - by Lz - 13.12.2012, 09:44
Re: Command Does nothing? - by Roel - 13.12.2012, 10:43
Re: Command Does nothing? - by Lz - 13.12.2012, 10:45
Re: Command Does nothing? - by Roel - 13.12.2012, 10:52

Forum Jump:


Users browsing this thread: 1 Guest(s)