Dialogs Dissapearing(Script noob)
#8

1) Dialog ids must be unique.

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. <<<<<
}
If you return '1' from OnDialogResponse in your gamemmode, then OnDialogResponse will NOT get executed in your filterscripts.
Reply


Messages In This Thread
Dialogs Dissapearing(Script noob) - by TofuWarrior - 28.08.2015, 16:09
Re: Dialogs Dissapearing(Script noob) - by iggy1 - 28.08.2015, 16:52
Re: Dialogs Dissapearing(Script noob) - by TofuWarrior - 28.08.2015, 16:59
Re: Dialogs Dissapearing(Script noob) - by iggy1 - 28.08.2015, 17:02
Re: Dialogs Dissapearing(Script noob) - by TofuWarrior - 28.08.2015, 17:03
Re: Dialogs Dissapearing(Script noob) - by iggy1 - 28.08.2015, 17:05
Re: Dialogs Dissapearing(Script noob) - by TofuWarrior - 28.08.2015, 17:06
Re: Dialogs Dissapearing(Script noob) - by iggy1 - 28.08.2015, 17:09
Re: Dialogs Dissapearing(Script noob) - by TofuWarrior - 28.08.2015, 17:10

Forum Jump:


Users browsing this thread: 1 Guest(s)