Hero192 Posted July 22, 2015 Share Posted July 22, 2015 What's the meaning of this type: button == "left" and state == "up" Why we uses that and what does that mean if button == "left" and state == "up" then --code end Link to comment
Gr0x Posted July 22, 2015 Share Posted July 22, 2015 For clicking i guess. For example, onClientGUIClick triggers when you press the left, right, or middle mouse button, and the state will be "down" in this case. If you press the left, obviously button will be equal to "left", if you press right, it will be "right", if you press the middle one (the scrollwheel) it will be "middle". It also triggers, when you release the button, which makes the state variable "up". With this, you will only trigger the event once, and you will only be able to click a button for example with the left click, instead of triggering it twice. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now