![]() |
Limiting options
Okay, so I have this lovely GUI I'm working on, everything works wonders, except this one issue. I want to limit what a player can enter in the GuiTextEditCtrl.
This is the only thing I've been able to get working.. PHP Code:
PHP Code:
|
Remove all characters that aren't numbers, and use int to convert the leftovers to a valid integer.
Store the integer in your database and just reformat it when you display it in your GUIs. You can use this to format the number 1000 to 1,000 for example: http://forums.graalonline.com/forums...hp?t=134262839 Just append a $ at the front. Also it's == not = in your if statement there. |
Thanks, that worked. I'm using the class func_numbers on Era though.
|
PHP Code:
|
Yes it would, but I was trying to go for something a long the lines of this.
PHP Code:
|
That's a really weird way to write it. Why not
PHP Code:
|
Quote:
|
Quote:
|
Man need to concentrate more
|
| All times are GMT +2. The time now is 11:25 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.