Dialog
#1

Hi, I have one question about dialogs and a loop in it.

So, If I do something like this:

pawn Код:
foreach(Player, i)
{
    new
        count = 0
    ;
    if( pDB[ i ][ Admin ] > 0 )
    {
        count ++;
        format( str, lenght, "%d %s", count, name lalalala.. );
        ShowPlayerDialog( playerid, DIALOG_STYLE_LIST, "smth", str, "..", "" );
    }
}
It will shot only one player? Because if I do SendClientMessage but not ShowPlayerDialog - its sends me a lot of message, if there are 1+ adm
Reply
#2

Replace playerid with i in ShowPlayerDialog.
Reply
#3

pawn Код:
ShowPlayerDialog( i, DIALOG_STYLE_LIST, "smth", str, "..", "" );
same for SendClientMessage... you need to use "i" to send it to each single player that fits into your if statements...
playerid will send it to the playerid (which always stays the same) everytime instead

edit: too slow^^
Reply
#4

I know, this post will suck but..


There was a filterscript. There was one cmd, where can you control all server players in dialog. I can't remember its name, maybe someone knows its.. :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)