Player slots in dialog
#2

When you format your DIALOG_STYLE_TABLIST_HEADERS, you simply do a player loop:

Код:
new pcount[2];
for(new i = 0; i < MAX_PLAYERS; i++)
  if(IsPlayerConnected(i))
    if(PlayerArea == 1) pcount[0]++; //By PlayerArea I assume a variable that is responding for the map in which player is in.
    else if(PlayerArea == 2) pcount[1]++;
new str[128];
format(str, sizeof(str), 
"Map\tSlots\n\
Hilltop Farm\t%i\n\
Montgomery\t%i\n\", pcount[0], pcount[1]);
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_TABLIST_HEADERS, "Deathmatch", str, "Select", "Close");
Something like that. You get the idea, I hope.
Reply


Messages In This Thread
Player slots in dialog - by Mike861 - 30.06.2018, 16:18
Re: Player slots in dialog - by Maxandmov - 30.06.2018, 18:10
Re: Player slots in dialog - by Mike861 - 30.06.2018, 18:26

Forum Jump:


Users browsing this thread: 2 Guest(s)