Weapons in dialog list with keystatechange
#6

Quote:
Originally Posted by Aleksabre
Посмотреть сообщение
I'm just curious about this;
Код:
{
		if(! response ) {
			// what happens, if player clicks right button?
		}
Do I really have to add something in there? If so, what exactly? Or, can I remove it?
Well, it depends on how do You want your dialog window to act when player press one of two buttons.

So, therefore, if You have:
pawn Код:
ShowPlayerDialog( playerid, ID, DIALOG_STYLE_TEXT, "Header", "Content", "Button_A", "Button_B" );
Then:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == ID)
    {
        if( !response ) {
            //Player pressed either ESC button or Button_B
        } else {
            //Player pressed either ENTER button or Button_A
        }
       
    }
    // or alternate form    
    if(dialogid == ID)
    {
        if( !response ) {
            //Player pressed either ESC button or Button_B
            return 1;
        }
        // Player pressed either ENTER or Button_A
    }
   
// and so on.
But, in Your case, everything what's in
pawn Код:
{
        if(! response ) {
            // HERE
        }
will be executed when player clicks "Cancel" button (or ESC).

Greetings.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)