AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu spacing problem (https://forums.alliedmods.net/showthread.php?t=11099)

knekter 03-09-2005 17:20

Menu spacing problem
 
ok I have a menu that contains integers that change. I want them to all line up after some text, but im having some problrems.. Heres the code:

Code:
new len = format(szMenu2, 255, "\rChoose your upgrades:\R^n^n") len += format(szMenu2[len], 255 - len, "\y1.%s Hardrive         %i^n", COLOR[UPGRADES[id][0]], UPGRADES[id][0]) len += format(szMenu2[len], 255 - len, "\y2.%s Hover Boost      %i^n", COLOR[UPGRADES[id][1]], UPGRADES[id][1]) len += format(szMenu2[len], 255 - len, "\y3.%s Processor        %i^n", COLOR[UPGRADES[id][2]], UPGRADES[id][2]) len += format(szMenu2[len], 255 - len, "\y4.%s Damage Amplifier %i", COLOR[UPGRADES[id][3]], UPGRADES[id][3])

Its showing up like this:

Code:

Hardrive 0
Hover Boost      0
Processor      0
Damage Amplifier 0

Its very odd, and I want to be able to fix it... Anyone have any ideas?

TotalNoobScripter 03-09-2005 19:03

looks a bit advanced...

COLOR[UPGRADES[id][0]]


is it a float? or maybe there is nothing in COLOR[UPGRADES[id][0]] that isnt 0 :p

xeroblood 03-09-2005 19:11

You could Right-Align them using \R
Code:
len += format(szMenu2[len], 255 - len, "\y1.%s Hardrive\R%i^n", COLOR[UPGRADES[id][0]], UPGRADES[id][0])

XxAvalanchexX 03-10-2005 21:59

I'm not sure if it works in Small/AMXx, but you could try \t, the tab character in C++.


All times are GMT -4. The time now is 14:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.