04.12.2012, 03:07
Guys,
Im having a problem with my /admins command. If i am Level 1 .. Then i type /admins. My name shows BUT if i am level 3. My name doesnt show up. Just the header does which is, -| ADMINS |-. Somebody please kindly help me with this problem.
Im having a problem with my /admins command. If i am Level 1 .. Then i type /admins. My name shows BUT if i am level 3. My name doesnt show up. Just the header does which is, -| ADMINS |-. Somebody please kindly help me with this problem.
pawn Код:
COMMAND:admins(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_RED, " ");
SendClientMessage(playerid, COLOR_RED, "-| ADMINS |-");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] < 1 && PlayerInfo[i][pAdmin] < 3)
{
new admtext[64];
new sendername[MAX_PLAYER_NAME];
new string[256];
if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level-1 Trial Admin"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Level-2 Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level-3 Master Administrator"; }
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_RED, string);
}
}
}
}
return 1;
}