12.04.2017, 20:43
Can someone please help me with this, if there are 2 admins online it only shows 1, and it does nothing if there are no admins online...
PHP код:
CMD:admins(playerid, params[])
{
new adminstring[128];
if(IsPlayerConnected(playerid))
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] > 0)
{
format(adminstring, sizeof(adminstring),"{FFFFFF}%s%s {FFFF00}[ID:%d]{FFFFFF}\n", adminstring, PlayerName(i), i);
}
}
}
ShowPlayerDialog(playerid,DIALOG_ONLINEADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
return 1;
}
}