20.07.2014, 15:44
Hi guys, how can I count players online and display them in a dialog style list? Please help I will +rep
new string[50], name[32];
new count=0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i, name, sizeof(name));
format(string,sizeof(string),"%s\n",name);
count++;
}
}
ShowPlayerDialog(playerid,723,DIALOG_STYLE_LIST,"online players",string,"Ok", "Cancel");