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

How to increase the number of allowed letters in the ZP menu?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 03-14-2022 , 12:11   How to increase the number of allowed letters in the ZP menu?
Reply With Quote #1

Hello. Can someone explain to me how do i increase the number of allowed letters on a line in the ZP menu?

Look at this image: https://pasteboard.co/hxlPFNu4uIkO.png

This is the full name of the item: Human Marker (Detects Humans) 5$

This is the name shown in the menu: Human Marker (Detects Human 5$

So, as you can see, the last symbols which are "s)" are missing, not because i didn't add them, but because there is a limit to how many symbols/letters can the name of the item have.

As far as i remember, the limit of allowed letters can be increased from the source code of ZP. However, i can't find the option, because i forgot its name, meaning i can't find it using Ctrl+F.

I will upload the default ZPA source code to this thread, so you can see it. Check it, and tell me what exactly i need to change, so the number of allowed letters and symbols can be increased.

Thanks.
Attached Files
File Type: sma Get Plugin or Get Source (DEFAULT_ZPA_SOURCE_CODE.sma - 73 views - 418.1 KB)
GlobalPlague is offline
Perfect Scrash
Senior Member
Join Date: Aug 2013
Location: Brazil
Old 03-14-2022 , 20:43   Re: How to increase the number of allowed letters in the ZP menu?
Reply With Quote #2

Find:
Quote:
g_extraitem_name = ArrayCreate(32, 1)
....
g_extraitem2_realname = ArrayCreate(32, 1)
g_extraitem2_name = ArrayCreate(32, 1)
Change to:
Quote:
g_extraitem_name = ArrayCreate(64, 1)
...
g_extraitem2_realname = ArrayCreate(64, 1)
g_extraitem2_name = ArrayCreate(64, 1)
After this Find:
Quote:
// Extra Items Menu
show_menu_extras(id)
{
static menuid, menu[128], item, team, buffer[32]
And Change to:
Quote:
// Extra Items Menu
show_menu_extras(id)
{
static menuid, menu[128], item, team, buffer[64]
After this find:
Quote:
// Override extra items data with our customizations
new i, buffer[32], size = ArraySize(g_extraitem2_realname)
And change to:
Quote:
// Override extra items data with our customizations
new i, buffer[64], size = ArraySize(g_extraitem2_realname)
After this find:
Quote:
// Loop through every item
static i, item_name[32]
And change to:
Quote:
// Loop through every item
static i, item_name[64]
Attached Files
File Type: sma Get Plugin or Get Source (DEFAULT_ZPA_SOURCE_CODE.sma - 54 views - 418.1 KB)
__________________
Perfect Scrash is offline
Send a message via Skype™ to Perfect Scrash
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 03-15-2022 , 05:56   Re: How to increase the number of allowed letters in the ZP menu?
Reply With Quote #3

Thanks.
GlobalPlague is offline
Reply



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:11.


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