steadyfi Posted March 8, 2015 Posted March 8, 2015 Hello I was wondering if I can refresh a IF statement in a function that is triggered ONE TIME. For example a GUI. I draw the first tab, but the second requires a getElementData == true, and I can change that from the first tab. How can I make it recheck the elementData without re-triggering the function ? Example: function example() outputChatBox("This is triggered without any conditions") --more code that can change the element data if getElementData(localPlayer, "canITriggerIt") == true then outputChatBox("Horay, i was triggered") end end It's a GUI with 2 tabs, I don't want to re-trigger the function to recheck the getElementData Thank you My Work: OpenTeams | DayZ Admin Panel | vAuth Must-Have Library: MTA Lua Async ApocalipZ Owner coming back soon!
Castillo Posted March 8, 2015 Posted March 8, 2015 onClientElementDataChange San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
steadyfi Posted March 8, 2015 Author Posted March 8, 2015 onClientElementDataChange That is not what I want but ok. I was asking if I can refresh that IF statement even if I DON'T RE-TRIGGER the function. Like i said, it's a GUI and I don't want to reopen it My Work: OpenTeams | DayZ Admin Panel | vAuth Must-Have Library: MTA Lua Async ApocalipZ Owner coming back soon!
JR10 Posted March 8, 2015 Posted March 8, 2015 That is exactly what you need. You can't "refresh" a statement. onClientElementDataChange will be triggered whenever an element's data change. You can detect when canITriggerIt gets changed and recheck the value. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
steadyfi Posted March 8, 2015 Author Posted March 8, 2015 That is exactly what you need. You can't "refresh" a statement. onClientElementDataChange will be triggered whenever an element's data change. You can detect when canITriggerIt gets changed and recheck the value. Alright, thanks My Work: OpenTeams | DayZ Admin Panel | vAuth Must-Have Library: MTA Lua Async ApocalipZ Owner coming back soon!
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