Raised This Month: $ Target: $400
 0% 

[HELP] Exit Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Cheezpuff
BANNED
Join Date: Oct 2012
Location: City of the Dead
Old 09-01-2013 , 18:04   [HELP] Exit Menu
Reply With Quote #1

How to add that menu exit.
0: exit
Code:
    format(menu,511,"\r[4Honor`] \wZombies Selection Menu^nSelect your favorite \yZombie \wClass:^n\w%s^n", menu)
    if(curnum==8 && offset<12)
    {
        keys += (1<<8)
        format(menu,511,"%s^n\w9. Next",menu)
    }
    if(offset)
    {
        keys += (1<<9)
        format(menu,511,"%s^n\w0. Back",menu)
    }

    show_menu(id,keys,menu,-1,"ZClassSelect")
}

public zclass_pushed(id,key)
{
    if(key<8)
    {
        if (g_iMenuOptions[id][key] == g_iZombieClass[id])
        {
            client_cmd(id, "spk %s", LOCK_FAIL);
            
            print_color(id, "%s %L", MODNAME, LANG_SERVER, "CLASS_CURRENT")
            show_zclass_menu(id,g_iMenuOffset[id])
            return ;
        }
        
        new iCache3 = ArrayGetCell(g_zclass_admin, g_iMenuOptions[id][key])
        
        if ((iCache3 != ADMIN_ALL || !iCache3) && !access(id, iCache3))
        {
            print_color(id, "%s %L", MODNAME, LANG_SERVER, "CLASS_NO_ACCESS")
            show_zclass_menu(id,g_iMenuOffset[id])
            return ;
        }
        
        g_iNextClass[id] = g_iMenuOptions[id][key]
    
        new szCache1[32]
        ArrayGetString(g_zclass_name, g_iMenuOptions[id][key], szCache1, charsmax(szCache1))
        
        if (!g_isZombie[id] || (g_isZombie[id] && (g_boolCanBuild || g_boolPrepTime)))
            ColorChat(id, RED, "^4%s ^1You have selected^4 %s^1 as your next class", MODNAME, szCache1)
        if (!g_isAlive[id])
            ColorChat(id, RED, "%s %L", MODNAME, LANG_SERVER, "CLASS_RESPAWN")
        g_iMenuOffset[id] = 0
        
        if (g_isZombie[id] && (g_boolCanBuild || g_boolPrepTime))
            ExecuteHamB(Ham_CS_RoundRespawn, id)
            
        ExecuteForward(g_fwClassPicked, g_fwDummyResult, id, g_iZombieClass[id]);
    }
    else
    {
        if(key==8)
            g_iMenuOffset[id] += 8
        if(key==9)
            g_iMenuOffset[id] -= 8
        show_zclass_menu(id,g_iMenuOffset[id])
    }

    return ;
}

Last edited by Cheezpuff; 09-01-2013 at 18:08.
Cheezpuff is offline
Send a message via Skype™ to Cheezpuff
 



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 19:14.


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