Help with dialogs
#1

I made a dm arena where if you do /dm you will get a dialog giving diffrent types of arenas like spas12, deagle arenas e.t.c, And when you click one of those it will set you to a interior and vitrual world and gives you certain guns. How can make the number of players display besside certain arena in the dialog menu

Example:-
'dialog'
Spas12 arena Players:20 ( i need this number to display
Deagle arena Players:6
.... arena

oK cancel

please help thanks
Reply
#2

Heres an example
pawn Код:
new
    d_str[64];
format(d_str, sizeof(d_str), "Spas12 arena Players: %d \nDeagle arena Players: %d", PLAYERS_IN_SPAZDM, PLAYERS_IN_DEAGLE_DM); //swap these for the amount of players in the respective arenas
ShowPlayerDialog(playerid, DUEL_DIALOG, DIALOG_STYLE_LIST, "Choose an arena", d_str, "Ok","Cancel");
Reply
#3

Make a global variable ( new PlayersOnlineInSpas12Arena; )
and when player enters some arena just add it to existing number ( PlayersOnlineInSpas12Arena++; ).

When players exit it just reduce the number ( PlayersOnlineInSpas12Arena--; ).

Then Format it and then show it in the way you like
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)