Jump to content

Help - Filling Labels


manve1

Recommended Posts

Posted

I am trying to make a script which set one label to a random number between 1 and 90, but when i set it using math.random it sets it only to 1 number, and i want like to expand it, and have it like filled fully, till the end of the label, not just one number

local rp = guiCreateWindow( 0.1, 0.15, 0.8, 0.75, '', true ) 
local troll = guiCreateLabel( 0.05, 0.05, 0.9, 0.05, '', true, rp) 
  
setTimer( 
function() 
guiSetText( troll, math.random( 1, 90 ) ) 
end, 5000, 1 
) 

Edit: would it be possible to make all numbers different?

Posted

Not adding to the label numbers, but like if i created a label at a wide of '0.8' i want to fill all of it in but with random numbers till 90

Posted

He already knows that Teteomar, he wants to fill all the label with random numbers.

@Manve: Maybe you can use this function:

guiLabelGetTextExtent 

Posted

@Solidsnake14

Thanx

@Teteomar

have you looked at my first (( the topic )) post?

it already has math.random( 1, 90 )

:)

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