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

Solved how to add item for the category number 8 of the menu


Post New Thread Reply   
 
Thread Tools Display Modes
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-24-2022 , 18:46   Re: how to add item for the category number 8 of the menu
Reply With Quote #21

Quote:
Originally Posted by Craxor View Post
So you are basicaly want to create Menu Inside menu .

1.There is no point in using an Array, il show you later .
2. I still see no point in hacking item number 8, after all, you hae 7 items per page and then the user will go on next page right? So, why do you wanna so hard to modify the item number 8? Even if you do , you have EFFx reply, i already told you to check it .
3. I see no point in using the old menu at all . If im not wrong in effx link, arkshine show an example using the neu menus

Edit: if you wann set 8 as Back thats also pointlrss, 0 Become back when you go to next page and Exit when.you are on the main page . So why??
I already know about it before from this tutorial but they are talking about how to make the menu appear more items and if you read my first post, i typed i want to use array with replacing an item instead of category number 8 and I tried some methods with the new menu style but it didn't work so the link you are talking about won't help me.

Quote:
Originally Posted by CrazY. View Post
menu_additem doesn't actually add an item to the menu, it just stores it to a list of items to be used later when you call menu_display.

The problem with the oldmenu approach is that it assumes all items to be available in the menu when calculating the pagination, no matter the location, for that reason, skipping an item from being added won't behave as newmenus.

To get that done, you first have to define which items should be skipped. A solution would be to loop through all items and store the indexes of the ones to be added in a temporary array and use that array to create the menu instead of the g_menuItems one.
I know but I have no idea how to do it anyway I will test your code.
Edit: Thanks Crazy it's fixed
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 04-25-2022 at 17:19.
Supremache is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-25-2022 , 00:03   Re: how to add item for the category number 8 of the menu
Reply With Quote #22

Supremache

I still dont understand WHY?

1. Why do you wanna make it an array insteand of doing it normaly and easy?
2. Why do you wanna replace the number 8, when the user simply can go on the next page?
I know what you writed, im asking why?

Crazy- i said i dont trust your code because you have an habit of posting overvomplicated codes wich you dont test them, and i know abou newmenu, thats ive been saying too.
__________________
Project: Among Us

Last edited by Craxor; 04-25-2022 at 00:05.
Craxor is offline
Send a message via ICQ to Craxor
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-25-2022 , 17:17   Re: how to add item for the category number 8 of the menu
Reply With Quote #23

Quote:
Originally Posted by Craxor View Post
Supremache

I still dont understand WHY?

1. Why do you wanna make it an array insteand of doing it normaly and easy?
2. Why do you wanna replace the number 8, when the user simply can go on the next page?
I know what you writed, im asking why?
The new style of the menu has only 7 items and 3 categories for back/more/exit so if you use the method posted by EFFx, it won't make any sense and I think 'crazy' had replied to you.
In the new style of the menu it is only allowed to rename these three categories but cannot handle them So I have to use the old style, As I said I created an API plugin with many menus and I want to make the shop only check the price and then control the data by forward, I use a single array to return the menu data quickly without typing many lines, Anyway it is fixed by Crazy.
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache 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 06:40.


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