• Expanding HUD if the text is longer then the HUD Box?
    5 replies, posted
Hello, I just finished my HUD to 99%.. Except that when your Job Name is longer than the box, the text will go outside. I need the box to expand, I tried RelativeX and Y stuff but didn't work, I am not a pro in lua.. Just started. Thx.
You would use this: [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index2ce8-2.html"]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index2ce8-2.html[/URL]
-snip- Can't get it to work online, it works on singleplayer.. I get [code][ERROR] gamemodes/darkrp/gamemode/client/hud.lua:190: bad argument #1 to 'GetTextSize' (string expected, got nil)[/code] Line 189 - 190: [lua] local job = LocalPlayer().DarkRPVars.job Width, Height = surface.GetTextSize( job ) [/lua]
Do print(LocalPlayer().DarkRPVars.job) See what it returns
Try removing 'local' from in front of job variable. You might be calling Width or Height from somewhere you shouldn't.
[QUOTE=Science;39470672]Do print(LocalPlayer().DarkRPVars.job) See what it returns[/QUOTE] Still the same bro.. :/
Sorry, you need to Log In to post a reply to this thread.