If player presses "I Disagree" how do I make it kick them?
#7

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    // This looks trough all the dialog IDs
    switch(dialogid)
        {
        // If the dialogid is 1.
        case 1:
            {
            // If the player presses the 2nd button.
            if(!response)
                {
                // This kicks the player.
                Kick(playerid);
                // This stops the code reading.
                return 1;
                }
            // If the player presses the 1st button.
            else if(response)
                {
                // This stops the code reading.
                return 1;
                }
            }
        }
    return 1;
}
That was all I need to know, if this is your only dialog just replace the 'OnDialogResponse' area with the one above.

Best regards,
Jesse

EDIT:
Cleared out the code.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)