18.05.2016, 21:06
Dialog 1:
Dialog 2:
So the problem is really strange "dialog 2" response buttons are responding with things scripted in "dialog 1"... I mean i don't get it how is that possible.
Here is when I show dialogs:
If you need any other part of the code just let me know.
Код:
if(dialogid == DIALOG_EVENTJOIN+1) { if(response) { PeopleInEvent ++; IsInEvent[playerid] = 1; TogglePlayerControllable(playerid,0); new Float:X,Y,Z; GetPlayerPos(playerid,Float:X,Float:Y,Float:Z); new Random = random(sizeof(StartPositions)); SetPlayerPos(playerid, StartPositions[Random][0], StartPositions[Random][1], StartPositions[Random][2]); } else { SendClientMessage(playerid, -1, "You declined to join an event."); VotedFor[playerid][1] = 0; EventVoteType[1] -= 1; HasVoted[playerid] = 0; WillParticipate[playerid] = 0; } return 1; }
Код:
if(dialogid == DIALOG_TVCT) // Terrorists vs Counter Terrorists { if(response) // voted { HasVoted[playerid] = 1; SendClientMessage(playerid, -1, "Thanks for the Vote! You voted for 'Terrorists vs Counter Terrorists'."); EventVoteType[0] += 1; VotedFor[playerid][0] = 1; WillParticipate[playerid] = 1; } else { strcat(szDialog, "{8585C2}Event Name\t{8585C2}Event Type\t{8585C2}Current Votes"); format(String, sizeof String, "\n{008000}Terrorists vs Counter Terrorists\t {800080}TDM\t{FF8000}%d Votes", EventVoteType[0]); strcat(szDialog, String); format(String, sizeof String, "\n{008000}I the Conquer\t {800080}DM\t{FF8000}%d Votes",EventVoteType[1]); strcat(szDialog, String); format(String, sizeof String, "\n{008000}Don't let them take it!\t {800080}TDM\t{FF8000}%d Votes",EventVoteType[2]); strcat(szDialog, String); ShowPlayerDialog(playerid, DIALOG_EVENT, DIALOG_STYLE_TABLIST_HEADERS, "{0080FF}Vote for your favorite event", szDialog, "Next", "Close"); } return 1; }
Here is when I show dialogs:
Код:
if(dialogid == DIALOG_EVENT) { if(response) { if(listitem == 0) // Terrorists vs Counter Terrorists { ShowPlayerDialog(playerid, DIALOG_TVCT, DIALOG_STYLE_MSGBOX, "{0080FF}Event Description", "{0080FF}Event Name: {008000}Terrorists vs Counter Terrorists!\n{0080FF}Event Type: {800080}Team Deathmatch", "Vote", "Back"); } if(listitem == 1) // / I the conquer { ShowPlayerDialog(playerid, DIALOG_ITC, DIALOG_STYLE_MSGBOX, "{0080FF}Event Description", "{0080FF}Event Name: {008000}I the Conquer!\n{0080FF}Event Type: {800080}Deathmatch", "Vote", "Back"); } if(listitem == 2) // Don't let them take it! { ShowPlayerDialog(playerid, DIALOG_DLTTI, DIALOG_STYLE_MSGBOX, "{0080FF}Event Description", "{0080FF}Event Name: {008000}Don't let them take it!\n{0080FF}Event Type: {800080}Team Deathmatch", "Vote", "Back"); } } else { SendClientMessage(playerid, -1, "You closed the dialog."); } return 1; }