HELP]Admin commands
#1

Код:
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : error 028: invalid subscript (not an array or too many subscripts): "pAdmin"
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : warning 215: expression has no effect
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : fatal error 107: too many error messages on one line
i have new: new pAdmin[MAX_PLAYERS];

Код:
	if(strcmp(cmd, "/ahelp", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(pAdmin[playerid] > 1)
            {
                SendClientMessage(playerid,COLOR_WHITE,"    .:: - ADMIN Help - ::.");
            }else{
            SendClientMessage(playerid,COLOR_GREY,"* You are not an higher level to use this command!");
            }
        }
        return 1;
    }
help
Reply
#2

pawn Код:
if(strcmp(cmd, "/ahelp", true) == 0)
{
          if(pAdmin[playerid] < 1) return SendClientMessage(playerid,COLOR_GREY,"* You are not an higher level to use this command!");          
        SendClientMessage(playerid,COLOR_WHITE,"    .:: - ADMIN Help - ::.");
        return 1;
}
Try that.
Reply
#3

You didnt declare pAdmin as an array.


Next time you might want to show your declarations as well btw :P.
Reply
#4

What?
Reply
#5

Show us your declaration of pAdmin (search for "new pAdmin").
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)