Jump to content

MTA GUI Buttons


Recommended Posts

Posted

add a number to the table like this:

local numberTable = {} 
addEventHandler("onClientGUIClick", Button1, function() 
   if #numberTable < 6 then 
      table.insert(numberTable, 1) 
   end 
end) 
  

i dont know why are you using edit box, just simply write out with a label. You can write out like this:

  
 addEventHandler("onClientRender", root, function() 
 dxDrawText(table.concat(numberTable), --rest of dxText) 
end) 
  

Or you can use guilabel or set the text of the edit box without onClientRender.

Posted
Dont understand what you're trying to do.

Explain your problem better , if you are talking about the maximum text length that can be typed into an edit box use

guiEditSetMaxLength() 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

Hmmm.. Why don't you get the text and set the text with the old one plus the new one??

local oldText = guiGetText( gui-edit ); 
local newText = guiSetText( gui-edit, oldText .. "1" ); 

Posted

i said it right then...

local table = {} 
addEventHandler("onClientGUIClick", button1, function() 
  if #table <= 5 then 
     table.insert(table, 5) 
  end 
end) 

wirte the value...

  
 dxDrawText(table.concat(table)) -- write it like this: table.concat(tablename) 
  

you can do this with edit box, just set the text of the edit box like this

  
 guiSetText(edit, table.concat(table)) 
  

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...