Dialog cancel and select button
#1

Guys how do i make the select and cancel button work correctly?
Currently: press select; spawn you, press cancel; kick you
What I want: press select; buy the weapon if enough money, press cancel; close dialog
script: http://pastebin.com/v7yHH7fj
Reply
#2

Like a login dialogue?
Reply
#3

response = 1 if you press the left button, and response = 0 if you press the right one.

If you have the buttons "Select" and "Cancel", you would have to do the code for "Select" when response == 1, and the code for "Cancel" when response == 0.

In your code you already do the check if( response ) - which checks if it's 1. If you want to close it when a player presses "Cancel", simply add this after the if( response )-statement has ended:
pawn Код:
else
{
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)