Deepu Posted February 25, 2014 Share Posted February 25, 2014 How to show in lua that if the text in the gui is a number then set element's Data to that number written in the edit box ? URGENT PLS HELP Link to comment
Anubhav Posted February 25, 2014 Share Posted February 25, 2014 text = guiGetText(EditBoxName) function addText() if text then tonumber(text) setElementData(localPlayer, "drugs", text) end Not sure about this script Link to comment
Moderators IIYAMA Posted February 25, 2014 Moderators Share Posted February 25, 2014 You have to return the result of the tonumber function back in to the variable text. text = tonumber(text) end -- and "end" @Deepu Also you have to call the function. It would be better by setting the elementdata at serverside. 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