28.08.2015, 17:09
1) Dialog ids must be unique.
2) Read the comments in the following code, it illustrates it better than i can explain it.
If you return '1' from OnDialogResponse in your gamemmode, then OnDialogResponse will NOT get executed in your filterscripts.
2) Read the comments in the following code, it illustrates it better than i can explain it.
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_RULES) { if(response) { SendClientMessage(playerid, COLOR_GREEN, "Thank you for agreeing to the server rules!"); } else // Pressed ESC or clicked cancel { Kick(playerid); } return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText. <<<<< } return 0; // You MUST return 0 here! Just like OnPlayerCommandText. <<<<< }