Hugos Posted September 4, 2019 Share Posted September 4, 2019 I have such trigger: triggerEvent("tigger", root) addEvent("tigger", true) function tigger() label = guiCreateLabel(...) addEventHandler("onClientGUIClick", label, function_label) end addEventHandler("tigger", root, tigger) How to me to remove this trigger? Link to comment
Ceeser Posted September 4, 2019 Share Posted September 4, 2019 (edited) function trigger() label = guiCreateLabel(...) addEventHandler("onClientGUIClick", label, function_label) end -- and now call the function like this: trigger() Idk if thats what you want but if so.. Instead of the triggerEvent just call the function itself Also you are talking about trigger in your post but in the code snipped you have "tigger" everywhere Edited September 4, 2019 by Ceeser Link to comment
Hugos Posted September 4, 2019 Author Share Posted September 4, 2019 59 minutes ago, Ceeser said: function trigger() label = guiCreateLabel(...) addEventHandler("onClientGUIClick", label, function_label) end -- and now call the function like this: trigger() Idk if thats what you want but if so.. Instead of the triggerEvent just call the function itself Also you are talking about trigger in your post but in the code snipped you have "tigger" everywhere The name is just for example, but I need to REMOVE the trigger Link to comment
Ceeser Posted September 4, 2019 Share Posted September 4, 2019 Either im just dumb or others dont get this as well.. What do you mean by "REMOVE the trigger"? remove the eventHandler? remove the function? remove the triggerEvent? its still unclear what you exactly mean by remove trigger 1 Link to comment
Moderators IIYAMA Posted September 4, 2019 Moderators Share Posted September 4, 2019 He probably means: https://wiki.multitheftauto.com/wiki/RemoveEventHandler Or just destroy the function: trigger = nil 1 Link to comment
Hugos Posted September 4, 2019 Author Share Posted September 4, 2019 Thanks! Sorry... my bad english 1 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