SA-MP Forums Archive
Dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog (/showthread.php?tid=254178)



Dialog - Gh0sT_ - 09.05.2011

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


Re: Dialog - Vince - 09.05.2011

Replace playerid with i in ShowPlayerDialog.


Re: Dialog - Sascha - 09.05.2011

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^^


Re: Dialog - Gh0sT_ - 09.05.2011

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