Raised This Month: $ Target: $400
 0% 

new style menu problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 02-07-2013 , 22:17   new style menu problem
Reply With Quote #1

hi, sorry for my english, i have a problem with new style menu, I do not like the old menu(sucks), I would like to put six options per page(with back, next and exit options) in the new menu system, but I fail.

PHP Code:
public show_menu_armasrr(id)
{
    
    if (!
g_isalive[id]) return PLUGIN_HANDLED
    
    
if (g_zombie[id] || g_survivor[id]) return PLUGIN_HANDLED
     
    
new len[999] , temp[52
    new 
menu_armasrr menu_create("\w[\rA\w]rmas Primarias" "handler_primarias"
    
    if(
recordo[id])
    {
    for(new 
i3i++){
        if(
g_recordar_armas[id][i] > 0)
        { 
            
handler_primarias(id menu_armasrr g_recordar_armas[id][0])
            
handler_pistolas(id menu_armasrr g_recordar_armas[id][1])
            
mh_yo(id menu_armasrr g_recordar_armas[id][2])
            
handler_cuchis(id menu_armasrr g_recordar_armas[id][3])
            return 
PLUGIN_HANDLED 
        
}
    }
    } 
    
    for(new 
min(6sizeof g_misarmas) ; i++) 
    { 
        if(
g_level[id] >= g_misarmas[i][item_level] && g_mejoras_armas[id][2] >= g_misarmas[i][item_puntos]) 
            
formatex(len charsmax(len) , "\w%s \r[Disponible]" g_misarmas[i][item_name_v2]) 
        else 
            
formatex(len charsmax(len) , "\d%s \r[Nivel Requerido : %d]\r[Bloqueado]" g_misarmas[i][item_name_v2] , g_misarmas[i][item_level]) 

        
num_to_str(i,temp51
        
menu_additem(menu_armasrr len temp)
    }
    
    if(
recordo[id]) formatex(len charsmax(len) , "Recordar Seleccion: Habilitado")
    else 
formatex(len charsmax(len) , "Recordar Seleccion: Desabilitado")   
    
menu_additem(menu_armasrrlen"7"0)
    
    
menu_setprop(menu_armasrr MPROP_BACKNAME,"Atras")  
    
menu_setprop(menu_armasrr MPROP_NEXTNAME,"Siguiente"
    
menu_setprop(menu_armasrr MPROP_EXITNAME,"Salir"
    
menu_display(idmenu_armasrr
     
    return 
PLUGIN_HANDLED
}

public 
handler_primarias(id menu_armasrs item

    if(
item == MENU_EXIT || !g_isalive[id] || g_zombie[id] || g_survivor[id] || g_nemesis[id])     
    { 
        
menu_destroy(menu_armasrs
        return 
PLUGIN_HANDLED 
    

    
    if(
item == 7){
            if(
recordo[id]) recordo[id] = true
            
else recordo[id] = false
    
}
    
    if(
g_level[id] >= g_misarmas[item][item_level] && g_mejoras_armas[id][2] >= g_misarmas[item][item_puntos])
    { 
        
drop_weapons(id 1)
        
g_arma_prim[id] = item
        g_recordar_armas
[id][0] = item
        fm_give_item
(id g_misarmas[item][item_csname])
        
ExecuteHamB(Ham_GiveAmmoidMAXBPAMMO[g_misarmas[item][item_id]], AMMOTYPE[g_misarmas[item][item_id]], MAXBPAMMO[g_misarmas[item][item_id]]) 
        
g_canbuy[id] = false
    
        show_menu_pistolas
(id)
    } 
    else 
    { 
        
zp_colored_print(id "^x04%s ^x01Necesitas Ser Nivel %d Para Comprar Esta Arma o no la desbloqueaste." g_tipopr g_misarmas[item][item_level]) 
        
show_menu_armasrr(id)
        return 
PLUGIN_HANDLED 
    

    
    return 
PLUGIN_HANDLED 

Thanks for read this
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 02-07-2013 , 23:05   Re: new style menu problem
Reply With Quote #2

1. ENGLISH PLZ!!!!
2. where rest of code.... needfull code to know what the other variables do.
Blizzard_87 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-08-2013 , 00:23   Re: new style menu problem
Reply With Quote #3

MPROP_PERPAGE, newmenus.inc
__________________
fysiks is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-08-2013 , 02:50   Re: new style menu problem
Reply With Quote #4

I have a problem too. I don't know how to check if menu display exist. Something like
PHP Code:
if(menu_display true
or something like that.

Last edited by Unkolix; 02-08-2013 at 02:53.
Unkolix is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-08-2013 , 12:31   Re: new style menu problem
Reply With Quote #5

Quote:
Originally Posted by Unkolix View Post
I have a problem too. I don't know how to check if menu display exist. Something like
PHP Code:
if(menu_display true
or something like that.
This is not your thread. Read through the tutorial. If it's not there read through the include file.
__________________
fysiks is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 02-08-2013 , 13:02   Re: new style menu problem
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
MPROP_PERPAGE, newmenus.inc
thx you
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
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 20:34.


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