03.12.2012, 19:09
Hi sa-mp.com. I got a problem when I try to show a dialog for all players:
But it shows the dialog only for player with id 0
Where is the problem?
I have one more problem.
Thanks in advance
Код:
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; } }
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; }