Drakath Posted January 12, 2014 Posted January 12, 2014 MTA gui system could really use an update. Sometimes when you place a button and press on the window, the button is pressed.
Castillo Posted January 12, 2014 Posted January 12, 2014 They plan on creating their own GUI, it's aimed for MTA 2.0 though.
Piorun Posted January 13, 2014 Posted January 13, 2014 Add false on last parametr in addEventHandler (i mean after function name) and it should work
MTA Team qaisjp Posted January 13, 2014 MTA Team Posted January 13, 2014 For example, instead of addEventHandler("onClientGUIClick", loginbutton, doLogin) you need to do addEventHandler("onClientGUIClick", loginbutton, doLogin,false)
Noki Posted January 16, 2014 Posted January 16, 2014 Or, function closeGUI() if (source == buttonName) then guiSetVisible(myAwesomeWindow, false) end end addEventHandler("onClientGUIClick", guiRoot, closeGUI)
MTA Team qaisjp Posted January 16, 2014 MTA Team Posted January 16, 2014 That's only if you're using multiple buttons that do small simple things. One medium sized function for lots of small things for different buttons is a better idea than using lots of different functions for each button.
Recommended Posts