Raised This Month: $12 Target: $400
 3% 

new menu problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Adomaz1
Senior Member
Join Date: Feb 2014
Old 01-19-2017 , 10:21   new menu problem
Reply With Quote #1

I have created a menu and I want to make it multilined, like to add a couple of lines in the title, but it makes extra line, like this:

Code:
Menu Title:

Extra Line
Extra Line




1. 1st option
2. 2nd option
3. 3rd option

0. Exit
I tried changing the charsmax but then it removes some letters or makes new lines. And another problem is that the Exit line ML doesn't work.

code:
Code:
public test(id)
{
	new szInfo[256];
	formatex(szInfo, charsmax(szInfo), "%L", id, "multilanguage")
	
	new menu = menu_create(szInfo, "menu_handle");
	
	formatex(szInfo, charsmax(szInfo), "%L", id, "multilanguage1")
	menu_additem(menu, szInfo, "1");
        formatex(szInfo, charsmax(szInfo), "%L", id, "multilanguage1")
	menu_additem(menu, szInfo, "2");
	
	new szExit[15];
	formatex(szExit, charsmax(szExit), "%L", id, "EXIT_MENU")
	menu_setprop(menu, MPROP_EXIT, szExit);
	
	menu_display(id, menu, 0);
	
	return PLUGIN_HANDLED;
}
What could be the problem?
Adomaz1 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-19-2017 , 10:28   Re: new menu problem
Reply With Quote #2

Please explain better what you're trying to do and what you have currently done (the lang file).
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-19-2017 , 10:59   Re: new menu problem
Reply With Quote #3

menu_additem(menu, szInfo, "1");

-->

menu_additem(menu, szInfo, "");
__________________
edon1337 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-19-2017 , 12:36   Re: new menu problem
Reply With Quote #4

That will change precisely nothing.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Adomaz1
Senior Member
Join Date: Feb 2014
Old 01-19-2017 , 13:02   Re: new menu problem
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Please explain better what you're trying to do and what you have currently done (the lang file).
I'm making a menu, and I want that the menu would look like this:
Code:
Menu title:

Extra text
Extra text

1. 1st Option
2. 2nd Option
3. 3rd Option

0. Exit
But the charsmax adds a lot of lines and half of the menu is empty(it looks like this):
Code:
Menu title:

Extra text
Extra text




1. 1st Option
2. 2nd Option
3. 3rd Option

0. Exit
ML line:
Code:
\rMenu title\r:^n^n \r- \yExtra text\r:^n \r- \yExtra text\r:^n^n
If I change the charsmax, it will look ok with the English ML, but it would remove other ML letters if it will have more symbols. And another problem is that Exit doesn't change, even if I have a translate for it.

Last edited by Adomaz1; 01-19-2017 at 13:03.
Adomaz1 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-19-2017 , 13:33   Re: new menu problem
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
That will change precisely nothing.
That would send an irrelevant info
PHP Code:
const info[]="" 
Quote:
Originally Posted by Adomaz1 View Post
I'm making a menu, and I want that the menu would look like this:
Code:
Menu title:

Extra text
Extra text

1. 1st Option
2. 2nd Option
3. 3rd Option

0. Exit
But the charsmax adds a lot of lines and half of the menu is empty(it looks like this):
Code:
Menu title:

Extra text
Extra text




1. 1st Option
2. 2nd Option
3. 3rd Option

0. Exit
ML line:
Code:
\rMenu title\r:^n^n \r- \yExtra text\r:^n \r- \yExtra text\r:^n^n
If I change the charsmax, it will look ok with the English ML, but it would remove other ML letters if it will have more symbols. And another problem is that Exit doesn't change, even if I have a translate for it.
Remove the ^n^n after Extra text.
__________________
edon1337 is offline
Adomaz1
Senior Member
Join Date: Feb 2014
Old 01-19-2017 , 13:58   Re: new menu problem
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
That would send an irrelevant info
PHP Code:
const info[]="" 


Remove the ^n^n after Extra text.
nothing changed :/
Adomaz1 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-19-2017 , 14:27   Re: new menu problem
Reply With Quote #8

Try removing every ^n then try adding them again one by one. You'll detect the mistake by doing that.
__________________
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-19-2017 , 14:34   Re: new menu problem
Reply With Quote #9

You need to make a menu with old format.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-19-2017 at 14:34.
EFFx is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-19-2017 , 15:10   Re: new menu problem
Reply With Quote #10

Quote:
Originally Posted by EFFx View Post
You need to make a menu with old format.
Why?!
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:22.


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