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

Infinity menu cases?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Baws
Veteran Member
Join Date: Oct 2012
Old 01-05-2016 , 20:06   Infinity menu cases?
Reply With Quote #1

What's the infinity menu case? Like we have case 0, case 1..etv what's the infinity one?

And for a little bit of garniture, make a menu with 2 cases, 1 name is banana and the other are all the players names.

Love Baws.
__________________
Like my clean plugins and work?
Baws is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 01-05-2016 , 23:38   Re: Infinity menu cases?
Reply With Quote #2

What you mean with "infinity one"
Syturi0 is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 01-06-2016 , 00:22   Re: Infinity menu cases?
Reply With Quote #3

Like: case ..: ?
case infinitty?:

I don't know?
__________________
Like my clean plugins and work?
Baws is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 01-06-2016 , 00:25   Re: Infinity menu cases?
Reply With Quote #4

If you want a menu with 2 cases, why you need "infinity case"?
Syturi0 is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 01-06-2016 , 00:27   Re: Infinity menu cases?
Reply With Quote #5

Just for testing basically and see what can be done, but I need a menu with 2 cases. 1 is the banana and the other is a list of all players.

1. banana
menu_addblank2( bananamenu );
2. Baws
3.Syturi0
4. Bailopan
5. Babe
6. player 6...etc

Depends on how many players in are in the server. There will be other pages obviously if there's more than 7 players.
__________________
Like my clean plugins and work?

Last edited by Baws; 01-06-2016 at 00:27.
Baws is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 01-06-2016 , 00:31   Re: Infinity menu cases?
Reply With Quote #6

PHP Code:
public Yo(id)
{
    new 
players[32], szTempid[7], num
    get_players
(playersnum"chi")

    new 
szMenu[200]
    
formatex(szMenucharsmax(szMenu), "Title Menu")
    new 
Menu menu_create(szMenu"Yo_Handler")
    
menu_additem(Menu"Banana 1"""0)
menu_additem(Menu"Banana 2"""0)
menu_additem(Menu"Banana 3"""0)
menu_additem(Menu"Banana 4"""0)

    for(new 
0numi++)
    {
        new 
tempid players[i]

        if(
tempid != id)
        {
            new 
szName[32]
            
get_user_name(tempidszNamecharsmax(szName))
    
            
num_to_str(tempidszTempid6)
            
            
formatex(szMenucharsmax(szMenu), "%s"szName)
            
menu_additem(MenuszMenuszTempid0)
        }
    }
        
    
menu_setprop(MenuMPROP_BACKNAME"\yAnterior")
    
menu_setprop(MenuMPROP_NEXTNAME"\yProximo")
    
menu_setprop(MenuMPROP_EXITNAME"\yRetroceder")
    
menu_setprop(MenuMPROP_EXITMEXIT_ALL)
    
menu_setprop(MenuMPROP_PERPAGE6)

    
menu_display(idMenu0)
    return 
PLUGIN_HANDLED

Something like that.

Last edited by Syturi0; 01-06-2016 at 00:31.
Syturi0 is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 01-06-2016 , 00:54   Re: Infinity menu cases?
Reply With Quote #7

Yes, but where's the handler for it?
__________________
Like my clean plugins and work?
Baws is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 01-06-2016 , 02:17   Re: Infinity menu cases?
Reply With Quote #8

PHP Code:
new Data[6], Name[64]
    new 
AccessCallback
    menu_item_getinfo
(MenuitemAccessData5Name63Callback)

    new 
tempid str_to_num(Data)
    
gidPlayer[id] = tempid

    get_user_name
(gidPlayer[id], g_NickReceptorcharsmax(g_NickReceptor))
    
g_Escolhido[id] = true

    menu_destroy
(Menu)
    return 
PLUGIN_HANDLED 
something like that
Syturi0 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 01-06-2016 , 09:48   Re: Infinity menu cases?
Reply With Quote #9

Just add banana as case 0, then with a loop for players just set their index.
In the handler check if item is higher than 0 for player.
Anyway, you should also pass their userid just to make sure it's the same player. (For the case the player choosen disconnects and a new player that connects gets his index)
Jhob94 is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 01-06-2016 , 17:08   Re: Infinity menu cases?
Reply With Quote #10

Quote:
Originally Posted by Jhob94 View Post
Just add banana as case 0, then with a loop for players just set their index.
In the handler check if item is higher than 0 for player.
Anyway, you should also pass their userid just to make sure it's the same player. (For the case the player choosen disconnects and a new player that connects gets his index)
I want it like banana1 or banana2 is chosen for x player. You get what I mean? But I want that to be in the same menu and not doing multiple menus. Like I chose banana in the same menu I will chose the player.
__________________
Like my clean plugins and work?
Baws 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 22:56.


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