Only 1 player will be shown from loop result
#1

pawn Код:
for(new i; i < MAX_PLAYERS; i++)
    {
        new string[500];
        format(string, 500, "%s%s (ID: %d) - Kills %d - Deaths X\n", string, GetName(i), i, PlayerInfo[i][pRKills]);
        ShowPlayerDialog(i, DIALOG_ROUNDEND, DIALOG_STYLE_LIST, "Round end - Player stats", string, "Continue", "");
        PlayerInfo[i][pRKills] = 0;
    }
That's my code. The loop will get player result and put them into the dialog, but for some reasons, the dialog is not going to show everyone's name. It is going to show only one player's name, mine.

So, if there are 2 people in the server, for example, iPrivate and Gregory, it will show me name, while for Gregory, it will show his name.

I hope you understand, thanks,
Reply
#2

can you give us Dialog : DIALOG_ROUNDEND
Reply
#3

Are you actually using a response for it?
Reply
#4

I am not using a response for dialog, so I don't have an DIALOG_ROUNDEND under OnDialogResponse.
Reply
#5

i think i dident understand your Request then , can you explain again ( good explaination = Good help)
Reply
#6

There are 2 players in the server. Me and my friend, Gregory.

Every 15 seconds, the dialog will appear. The dialog will show my name and my score. This happens for me ONLY.

The dialog for Gregory will show his name and his score.

So the dialog wont show us both, but only our selves. If you join, the dialog will show your name and your score, not all of us.
Reply
#7

You want evry one will see your score and you info ? and you'll see georgy's infos and score like this ?
Reply
#8

Yes, as I see my information, it has to be seen for everyone.
Reply
#9

can you give me DIALOG DIALOG_ROUNDEND ?
Reply
#10

If you use ShowPlayerDialog in the loop, it will just open a new dialog every time it moves to the next player...
pawn Код:
new string[500];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        format(string, sizeof(string), "%s%s (ID: %d) - Kills %d - Deaths X\n", string, GetName(i), i, PlayerInfo[i][pRKills]);
        PlayerInfo[i][pRKills] = 0;
    }
    ShowPlayerDialog(i, DIALOG_ROUNDEND, DIALOG_STYLE_LIST, "Round end - Player stats", string, "Continue", "");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)