Jump to content

Need a little help!


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...