Small error?
#1

Код:
			if(strcmp(cmd, "/admincolor", true) == 0)
	{
	    if (PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, GREY, "You are not a Admin");
		if(GetPVarInt(playerid, "AdminColor") == 0)
        {
        	SetPVarInt(playerid, "AdminColor", 1);
            SendClientMessage(playerid, 0x3399FFFF, "Your name is now colored.");
            SetPlayerToTeamColor(playerid);
		}
		else if(GetPVarInt(playerid, "AdminColor") == 1)
		{
			DeletePVar(playerid, "AdminColor");
   			SendClientMessage(playerid, GREY, "    Your name is no longer colored.");
      		SetPlayerToTeamColor(playerid);
		}
		return 1;
	}
Why can't I use it as a higher admin then lvl 2?
Reply
#2

pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, GREY, "You are not a Admin");
That is if pAdmin is equal or higher then 2 it will return "you are not admin".

Use;
pawn Код:
if (PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, GREY, "You are not a Admin");
If pAdmin is lower then 2, they cant use the command.
Reply
#3

Oh, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)