AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu pages (https://forums.alliedmods.net/showthread.php?t=147545)

rodrigo286 01-10-2011 14:37

Menu pages
 
I have a menu of the plugin class as a human but has more than 9 menu items he creates a second page, but does not appear the next option.
Only a 9.

PHP Code:

public fwHamPlayerSpawnPost(id

        
set_task(get_cvar_float("zp_delay")+5.0"ClCmdSelectModel",id


public 
ClCmdSelectModel(idmenuid

        if(
zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_survivor(id)) 
        { 
                return 
PLUGIN_HANDLED
        } 
         
        else if(!
is_user_alive(id)) 
        { 
                return 
PLUGIN_HANDLED
        } 
        else 
        { 
                
human_menu(id
        } 
        return 
PLUGIN_CONTINUE


public 
human_menu(id

        new 
menu menu_create("\rEscolha seu Personagem:""human_menu_handler")
        
menu_additem(menu"\wLeon - A coragem biba (50 de Colete)""1"0)
        
menu_additem(menu"\wWesker - A biba Gato Rapido (300 de Vida + 30 colete)""2"0
        
menu_additem(menu"\wJill - A Piriguete Saltadora (Gravidade ++ + 30 colete)""3"0
        
menu_additem(menu"\wChoijiyoon - Rosquinha Gelada (FrostNade X 5 + 30 colete)""4"0
        
menu_additem(menu"\wYuri - Rosquinha Quente (NapalmNade X 5 + 30 colete)""5"0
        
menu_additem(menu"\wAda - A piriguete Iluminada (FlareNade X 5 + Aura de Luz + 35 colete)""6"0)
        
menu_additem(menu"\w[ADM] Nano Suit - A armadura power color (Alta velocida + 70 colete)""7"ADMIN_IMMUNITY)
        
menu_additem(menu"\w[ADM] Homens de Preto - Os bibas bem trajados (NapalmNade X 6 + 70 colete)""8"ADMIN_IMMUNITY)
        
menu_additem(menu"\w[VIP] Sakura - A piriguete das cartas (NapalmNade X 5 + 60 colete)""9"VIP1_FLAG)
        
menu_additem(menu"\w[VIP] VIP - O filhinho de papai (70 colete)""10"VIP1_FLAG)
        
menu_setprop(menuMPROP_EXITMEXIT_ALLMPROP_PERPAGE)
        
menu_display(idmenu0
         

public 
human_menu_handler(idmenuitem

        if( 
item == MENU_EXIT 
        { 
                
menu_destroy(menu
                return 
PLUGIN_HANDLED 
        

        new 
data[6], iName[64
        new 
accesscallback 
        menu_item_getinfo
(menuitemaccessdata5iName63callback
        new 
key str_to_num(data
        switch(
key
        { 

Thanks!

fysiks 01-10-2011 21:59

Re: Menu pages
 
:arrow:
PHP Code:

menu_setprop(menuMPROP_EXITMEXIT_ALL


rodrigo286 01-11-2011 12:38

Re: Menu pages
 
=(

[IMG]http://img21.**************/img21/9310/dedust20002sd.png[/IMG]

Emp` 01-11-2011 14:14

Re: Menu pages
 
That's most likely because your item names are so long. You could try changing back to the old menu system, but if you want to stick with the new menu system, you'll most likely need to shorten some of those names. Try removing some spaces between the + and # or the X and #.


All times are GMT -4. The time now is 02:05.

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