AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   menu addtext (https://forums.alliedmods.net/showthread.php?t=244644)

JohnBloper 07-21-2014 12:58

menu addtext
 
http://i.imgur.com/dvLRKfA.jpg


How can do you do this?
I thought you need a item before add a menu_addtext.

mottzi 07-21-2014 13:26

Re: menu addtext
 
This is most likely the whole title of the menu. With ^n you can add a new line.

klippy 07-21-2014 13:56

Re: menu addtext
 
Quote:

Originally Posted by mottzi (Post 2171454)
This is most likely the whole title of the menu. With ^n you can add a new line.

I don't think so, I am sure it is old style menu.

JohnBloper 07-21-2014 14:09

Re: menu addtext
 
Quote:

Originally Posted by KliPPy (Post 2171468)
I don't think so, I am sure it is old style menu.

Is there a tut on old menu style?

or maybe you could help me here.
PHP Code:

formatexszItemcharsmaxszItem ), "\r[yMsy] \wJailbreak Shop^n^n\y%s \wStats^n^n\y-\d Bonus health:\r %i^n\y-\d Bonus armour:\r %i^n\y-\d Bonus damage:\r %i^n\y-\d Knife Price:\r %i^n\y-\d Exp Needed:\y %i^n"
,szKnivesItem ], kCvarkCvarsHealthItem ] ), kCvarkCvarsArmorItem ] ), kCvarkCvarsDamageItem ]), kCvarkCvarsCostItem ] ), kCvarkCvarsExpItem ] )); 

After bonus damage nothing will appear.

klippy 07-21-2014 15:46

Re: menu addtext
 
Here I found a random post which contains how it is done, look at the code: https://forums.alliedmods.net/showth...ght=style+menu
Or you could take a look at Zombie Plague 4.3 code, main menu is done as an old style menu there. :)

NikKOo31 07-21-2014 15:50

Re: menu addtext
 
Quote:

Originally Posted by JohnBloper (Post 2171471)
Is there a tut on old menu style?

or maybe you could help me here.
PHP Code:

formatexszItemcharsmaxszItem ), "\r[yMsy] \wJailbreak Shop^n^n\y%s \wStats^n^n\y-\d Bonus health:\r %i^n\y-\d Bonus armour:\r %i^n\y-\d Bonus damage:\r %i^n\y-\d Knife Price:\r %i^n\y-\d Exp Needed:\y %i^n"
,szKnivesItem ], kCvarkCvarsHealthItem ] ), kCvarkCvarsArmorItem ] ), kCvarkCvarsDamageItem ]), kCvarkCvarsCostItem ] ), kCvarkCvarsExpItem ] )); 

After bonus damage nothing will appear.

Increase size of szItem, you are adding a bunch of data there. And if you want more help post full code :/

mottzi 07-21-2014 16:20

Re: menu addtext
 
Theres no need at all to swap back to the old system only to have a multiline title.

Fuck For Fun 07-21-2014 21:15

Re: menu addtext
 
Do not understand why everyone in formatex one?

Just do this:
Code:

formatex (szItem, charsmax ( szItem ), "\y%s", szKnives [ Item ] )
menu_additem (iMenu, szItem);

formatex (szItem, charsmax ( szItem ), "\d Bonus health: \r%i", kCvar( kCvarsHealth[ Item ] )
menu_additem (iMenu, szItem);



All times are GMT -4. The time now is 13:12.

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