Players online with dialog
#1

Hi guys, how can I count players online and display them in a dialog style list? Please help I will +rep
Reply
#2

try

pawn Код:
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");
Reply
#3

Ty, +rep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)