20.02.2010, 23:43
Hey © Tђэ LυxυяiσN™, sorry for double post man!
I found another code here, and it's working without deleting i thing..
But now, when admin uses /admins, it gives list of all players online with the admin level of admin which used command
Like, I am admin lvl4 and I use /admins it gives this
Present Admins: Player1-4
Present Admins: Player2-4
Present Admins: Player3-4
Present Admins: Player4-4
Present Admins: Player5-4
........................
........................
And when player (non admin user) uses /admins, it gives him "No admins online at the moment"
Do you maybe know the problem now?
I found another code here, and it's working without deleting i thing..
pawn Код:
dcmd_admins(playerid, params[])
{
if(strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Use /admins");
new count = 0;
new string[128];
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
new player[24];
GetPlayerName(i, player, 24);
if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] <= 6)
{
format(string, sizeof(string), "Present Admins: %s(%i)-%i ",player,i,PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_CYAN, string);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_CYAN, "No admins online at the moment");
}
return 1;
}
Like, I am admin lvl4 and I use /admins it gives this
Present Admins: Player1-4
Present Admins: Player2-4
Present Admins: Player3-4
Present Admins: Player4-4
Present Admins: Player5-4
........................
........................
And when player (non admin user) uses /admins, it gives him "No admins online at the moment"
Do you maybe know the problem now?

