Raised This Month: $ Target: $400
 0% 

new style menu problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


Thread Tools
Display Modes

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