Show dialog for all
#1

Hi sa-mp.com. I got a problem when I try to show a dialog for all players:
Код:
if(strcmp(cmd, "/event", true) == 0)
	{
	    ShowPlayerDialog(playerid, 6987, DIALOG_STYLE_LIST, "Ce fel de event vrei?", "1:Deagle\n2:LCS\n3:CTvsTT\n4:Race\n5:Altul", "OK", "Renunta");
	    return 1;
	}
Код:
if(dialogid == 6987)
        {
            for(new i=0;i<MAX_PLAYERS;i++)
            {
            	if(response)
            	{
                	if(listitem == 0)
                	{
                	    format(string, sizeof(string),""#COL_WHITE"Adminul "#COL_RED"%s, "#COL_WHITE"organizeaza un event "#COL_GREEN"Deagle. "#COL_WHITE"Participi?",sendername);
                        ShowPlayerDialog(i, 6988, DIALOG_STYLE_MSGBOX,"Doresti sa participi?",string, "DA", "NU");
                    }
                	if(listitem == 1)
                	{
                	    format(string, sizeof(string),""#COL_WHITE"Adminul "#COL_RED"%s, "#COL_WHITE"organizeaza un event "#COL_GREEN"LCS. "#COL_WHITE"Participi?",sendername);
                	    ShowPlayerDialog(i, 6988, DIALOG_STYLE_MSGBOX,"Doresti sa participi?", string, "DA", "NU");
                	}
                	if(listitem == 2)
                	{
                	    format(string, sizeof(string),""#COL_WHITE"Adminul "#COL_RED"%s, "#COL_WHITE"organizeaza un event "#COL_GREEN"CTvsTT. "#COL_WHITE"Participi?",sendername);
                	    ShowPlayerDialog(i, 6988, DIALOG_STYLE_MSGBOX,"Doresti sa participi?", string, "DA", "NU");
                	}
                	if(listitem == 3)
                	{
                	    format(string, sizeof(string),""#COL_WHITE"Adminul "#COL_RED"%s, "#COL_WHITE"organizeaza un event "#COL_GREEN"Race. "#COL_WHITE"Participi?",sendername);
                	    ShowPlayerDialog(i, 6988, DIALOG_STYLE_MSGBOX,"Doresti sa participi?", string, "DA", "NU");
                	}
                 	if(listitem == 4)
                	{
                	    format(string, sizeof(string),""#COL_WHITE"Adminul "#COL_RED"%s, "#COL_WHITE"organizeaza un event "#COL_GREEN"Necunoscut. "#COL_WHITE"Participi?",sendername);
                	    ShowPlayerDialog(i, 6988, DIALOG_STYLE_MSGBOX,"Doresti sa participi?", string, "DA", "NU");
                	}
                }
                return 1;
           }
        }
But it shows the dialog only for player with id 0
Where is the problem?
I have one more problem.
Код:
if(dialogid == 6988)
        {
            if(response)
            {
          -->>How do I get the position of the admin who started the event<<-----?      
                SetPlayerPos(playerid, Float:XX, Float:YY, Float:ZZ);
            }
            else
            {
                return 1;
            }
            return 1;
        }
Thanks in advance
Reply


Messages In This Thread
Show dialog for all - by Angel.Why - 03.12.2012, 19:09
Re: Show dialog for all - by DaRk_RaiN - 03.12.2012, 19:22
Re: Show dialog for all - by Konstantinos - 03.12.2012, 19:23
Re: Show dialog for all - by Angel.Why - 03.12.2012, 19:37
Re: Show dialog for all - by Konstantinos - 03.12.2012, 19:40
Re: Show dialog for all - by Angel.Why - 03.12.2012, 19:44
Re: Show dialog for all - by Konstantinos - 03.12.2012, 19:57
Re: Show dialog for all - by Angel.Why - 03.12.2012, 20:04
Re: Show dialog for all - by NeroX98 - 03.12.2012, 20:04
Re: Show dialog for all - by Angel.Why - 03.12.2012, 20:18

Forum Jump:


Users browsing this thread: 3 Guest(s)