SA-MP Forums Archive
Dialog, if second button is pressed, kick player - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog, if second button is pressed, kick player (/showthread.php?tid=509446)



Dialog, if second button is pressed, kick player - NoahF - 26.04.2014

Sorry for creating yet ANOTHER topic but, I have a question.

How would I make it so when the player presses the second button (Quit) They get kicked from the game?

Код:
ShowPlayerDialog(playerid, 2013, DIALOG_STYLE_LIST, "Select a Class", "Assault\nSniper", "Select", "Quit");



Re: Dialog, if second button is pressed, kick player - NewerthRoleplay - 26.04.2014

Consider checking the wiki, https://sampwiki.blast.hk/wiki/OnDialogResponse


Re: Dialog, if second button is pressed, kick player - awsomedude - 26.04.2014

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 2013)
    {
        if(response) // Clicked class
        {
            //Clicked class
        }
        else // Pressed ESC or clicked quit
        {
            //Kick Player
        }
        return 1;
    }
 
    return 0;
}



Re: Dialog, if second button is pressed, kick player - NoahF - 26.04.2014

I'm stupid, was looking right at it lol. Thanks