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

Solved Menu items limit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-06-2019 , 09:00   Menu items limit
Reply With Quote #1

EDIT: I found this https://forums.alliedmods.net/showthread.php?t=259846 , any idea what to do, cuz I can't force next page.

This looks like menus have a 'total' limit, basically you can only show a limited number of text in one page, is that true?
When I click '7' on my keyboard, it unbans someone that I don't even see in the menu, that makes me think there's a visual limit but the items still actually exist.

__________________

Last edited by edon1337; 08-06-2019 at 09:38.
edon1337 is offline
Mistrick
Senior Member
Join Date: Aug 2012
Location: Russia
Old 08-06-2019 , 09:13   Re: Menu items limit
Reply With Quote #2

512 bytes limit for menu.
Mistrick is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-06-2019 , 09:16   Re: Menu items limit
Reply With Quote #3

Quote:
Originally Posted by Mistrick View Post
512 bytes limit for menu.
Yes, I just found that out, is there any workaround for it? My idea would be to force the next page but that's not possible. I'm thinking of using menu_addblank so I can trick it into going to the next page.
__________________
edon1337 is offline
shauli
Member
Join Date: Jun 2018
Old 08-06-2019 , 09:20   Re: Menu items limit
Reply With Quote #4

Quote:
Originally Posted by edon1337 View Post
Yes, I just found that out, is there any workaround for it? My idea would be to force the next page but that's not possible. I'm thinking of using menu_addblank so I can trick it into going to the next page.
You can't bypass that limit. Maybe the item will work, but it will still be invisible.
Best thing to do is to remove some characters and colors. In your case i'd make an header of "Name | SteamID | IP" instead of formatting it again each row.

Last edited by shauli; 08-06-2019 at 09:20.
shauli is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-06-2019 , 09:24   Re: Menu items limit
Reply With Quote #5

Quote:
Originally Posted by shauli View Post
You can't bypass that limit. Maybe the item will work, but it will still be invisible.
Best thing to do is to remove some characters and colors. In your case i'd make an header of "Name | SteamID | IP" instead of formatting it again each row.
I like that idea, I'll try it right now. Thanks.

EDIT: Seems like it's enough, let me do some exact calculations if it will be enough if there's maxname, maxsteamid, maxip for each player

EDIT2:

Code:
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | IIIIIIIIIIIIIIII
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | IIIIIIIIIIIIIIII
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | IIIIIIIIIIIIIIII
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | IIIIIIIIIIIIIIII
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | IIIIIIIIIIIIIIII
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | IIIIIIIIIIIIIIII
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | IIIIIIIIIIIIIIII

Back
More
Exit
Total: 648

Too bad
__________________

Last edited by edon1337; 08-06-2019 at 09:36.
edon1337 is offline
Mistrick
Senior Member
Join Date: Aug 2012
Location: Russia
Old 08-06-2019 , 09:53   Re: Menu items limit
Reply With Quote #6

Set 5 items per page or rework menu. Remove steamid, ip. After choosing nick show new menu with additional info(steamid, ip, ban date, etc.).
Mistrick is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 08-06-2019 , 10:19   Re: Menu items limit
Reply With Quote #7

You'd save a lot of digits by removing the IP. Why do you always want to show it?
Ah, sorry, i forgot, non-steamer....
__________________

Mordekay is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-06-2019 , 10:30   Re: Menu items limit
Reply With Quote #8

Quote:
Originally Posted by Mistrick View Post
Set 5 items per page or rework menu. Remove steamid, ip. After choosing nick show new menu with additional info(steamid, ip, ban date, etc.).
Thank you, using MPROP_PERPAGE was the best option.

Quote:
Originally Posted by Mordekay View Post
You'd save a lot of digits by removing the IP. Why do you always want to show it?
Ah, sorry, i forgot, non-steamer....
You're deluded.
__________________

Last edited by edon1337; 08-06-2019 at 10:31.
edon1337 is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 08-06-2019 , 10:48   Re: Menu items limit
Reply With Quote #9

Quote:
Originally Posted by edon1337 View Post
You're deluded.
Really?
Unban Menu 3/3, Ban #1 shows a 10 digit STEAM_ID. If there haven't been created 500.000.000 new accounts in the last few days this is not a real STEAM_ID.
__________________

Mordekay is offline
shauli
Member
Join Date: Jun 2018
Old 08-06-2019 , 10:48   Re: Menu items limit
Reply With Quote #10

Quote:
Originally Posted by edon1337 View Post
I like that idea, I'll try it right now. Thanks.

EDIT: Seems like it's enough, let me do some exact calculations if it will be enough if there's maxname, maxsteamid, maxip for each player

Total: 648

Too bad
Don't forget to include colors, numbers and menu title. This is client limitation, not amxx. Everything counts.
Each item starts with "\r1. \w" which is 7 extra characters.

Last edited by shauli; 08-06-2019 at 10:49.
shauli is offline
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 05:20.


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