Hugos Posted September 4, 2019 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?
Ceeser Posted September 4, 2019 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
Hugos Posted September 4, 2019 Author 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
Ceeser Posted September 4, 2019 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
Moderators IIYAMA Posted September 4, 2019 Moderators Posted September 4, 2019 He probably means: https://wiki.multitheftauto.com/wiki/RemoveEventHandler Or just destroy the function: trigger = nil 1
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