heroes9898 Posted June 6, 2014 Share Posted June 6, 2014 i've got the following code: function buttonClicked(button, state) if button == oyuncuYonetimiBtn then --- elseif button == aracYonetimiBtn then --- elseif button == sunucuYonetimiBtn then --- elseif button == sirketYonetimiBtn then --- end end addEventHandler("onClientGUIClick", anyButton, buttonClicked, false) if the function "buttonClicked" called, will be that eventHandler deleted? Or should I remove that eventHandler manually? and how? --and second question: in the function "buttonClicked", should I set the button "anyButton" invisible and set it as nil? do I need it? Link to comment
Castillo Posted June 6, 2014 Share Posted June 6, 2014 'button' isn't the GUI element, is the mouse button clicked ( right, left ). 'source' would be the GUI element. And no, the event handler remains. Link to comment
heroes9898 Posted June 6, 2014 Author Share Posted June 6, 2014 i have got guiCreateButton. how can i remove both, the button and eventhandler? (in that function) Link to comment
Castillo Posted June 7, 2014 Share Posted June 7, 2014 destroyElement -- To destroy the button. removeEventHandler -- To remove the event handler. 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