Dialogs Dissapearing(Script noob)
#4

No.

Код:
ShowPlayerDialog(playerid, DIALOG_ID, ...)
Make sure all your DIALOG_ID are unique cross script.

And return 0 if a dialog isnt executed in a script. See comments on the wiki.
Quote:
Originally Posted by samp wiki
Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_RULES)
    {
        if(response) // If they clicked 'Yes' or pressed enter
        {
            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.
}
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: 3 Guest(s)