Dialog, if second button is pressed, kick player
#1

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");
Reply
#2

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

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;
}
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)