Jump to content

number.....


Deepu

Recommended Posts

Posted

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

Posted
  
text = guiGetText(EditBoxName) 
  
function addText() 
if text then  
tonumber(text) 
setElementData(localPlayer, "drugs", text) 
end 
  

Not sure about this script

  • Moderators
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...