Dzsozi (h03) Posted March 10, 2014 Share Posted March 10, 2014 Hey everyone! So I'm trying to make a "dashboard" for cars, when you click on a gui button it should turn on and off vehicle engines and lights if you are in the car and you are sitting on the driver seat. But I can't decide and make this. It doesn't work when I click on a gui button, so can anybody help me with this? I've got a half script, but the engine and light turn on and off and the other things like handbrake are doesn't work. I would be grateful if anyone could help me in this. Thank you! Link to comment
Moderators Citizen Posted March 10, 2014 Moderators Share Posted March 10, 2014 Sure, here is how to add a click listener on a gui element: function onMyButtonClicked( button ) outputChatBox("Hey you clicked on myButton with the "..button.." mouse button.") end local myButton = guiCreateButton( ... ) addEventHandler("onClientGUIClick", myButton, onMyButtonClicked, false) If the problem is somewhere else, please show us the code. 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