02.03.2015, 08:07
hello i've this command to see the online admins but the problem its only show me one admin even if is there two or more admins online any way to fix that?
PHP код:
CMD:admins(playerid,params[])
{
new name[24], str[100];
new count = 0;
for(new i = 0; i <MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(pdata[i][Adminstator])
{
GetPlayerName(i,name,sizeof(name));
format(str,sizeof(str),"%s (%d): %s",name,i,AdminLevel(i));
ShowPlayerDialog(playerid,20,DIALOG_STYLE_LIST,"Online admins",str,"Close","");
count++;
}
if(count == 0) return ShowPlayerDialog(playerid,22,DIALOG_STYLE_MSGBOX,"Online admins","No players found","Close","");
}
return 1;
}