/admins not working rightly
#1

Код:
COMMAND:admins(playerid, params[])
{
    new admin = 0;
    foreach(petla, i)
    {
	if(PlayerInfo[i][pAdmin] >= 1)
	{
	format(str,sizeof(str),"%s | Admin Level: %d \n", NickName(i), PlayerInfo[i][pAdmin]);
	admin++;
	}
    }
    if(admin >= 1)
    {
	ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "Online Admins", str, "Okey", "Close");
    }
    if(admin == 0)
    {
	ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "Administrators", "Server: No Administrators Online", "Okey", "Cancel");
    }
	return true;
}
So , im one admin online, then it shows me,
But if an another admin joins ( 2 admins online now ) Then it will show only that admin who joined lately ( Another admin )

Whats the problem ? Im getting no errors
Reply


Messages In This Thread
/admins not working rightly - by Tekto - 22.09.2010, 13:19
Re: /admins not working rightly - by Hiddos - 22.09.2010, 13:23
Re: /admins not working rightly - by Tekto - 22.09.2010, 13:33

Forum Jump:


Users browsing this thread: 1 Guest(s)