Deepu Posted February 25, 2014 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
Anubhav Posted February 25, 2014 Posted February 25, 2014 text = guiGetText(EditBoxName) function addText() if text then tonumber(text) setElementData(localPlayer, "drugs", text) end Not sure about this script
Moderators IIYAMA Posted February 25, 2014 Moderators 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.
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