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

Pull apart zombies extra items and humans extra items.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ADD47
Junior Member
Join Date: May 2014
Old 07-17-2016 , 10:06   Pull apart zombies extra items and humans extra items.
Reply With Quote #1

PHP Code:
show_menu_extras(id)
{
    static 
menu[400], lenitem
    len 
0
    
    len 
+= formatex(menu[len], sizeof menu len"\y%L [%L] \r[%d-%d]^n^n"id"MENU_EXTRA_TITLE"id, (g_zombie[id]) ? "CLASS_ZOMBIE" "CLASS_HUMAN"EXTRAS_STARTID+1min(EXTRAS_STARTID+7g_extraitem_i))
    
    for (
item EXTRAS_STARTIDitem min(EXTRAS_STARTID+7g_extraitem_i); item++)
    {
        if ((
g_zombie[id] && g_extraitem_team[item] == ZP_TEAM_HUMAN) || (!g_zombie[id] && g_extraitem_team[item] == ZP_TEAM_ZOMBIE) || (item == EXTRA_ANTIDOTE && !get_pcvar_num(cvar_extraantidote)) || (item == EXTRA_INFBOMB && (!get_pcvar_num(cvar_extrainfbomb)) || g_infbombcounter >= get_pcvar_num(cvar_infbomblimit)))
        {
            switch(
item)
            {
                case 
EXTRA_ANTIDOTElen += formatex(menu[len], sizeof menu len"\d%d. %L"item-EXTRAS_STARTID+1id"MENU_EXTRA2")
                case 
EXTRA_INFBOMBlen += formatex(menu[len], sizeof menu len"\d%d. %L"item-EXTRAS_STARTID+1id"MENU_EXTRA4")
                default: 
len += formatex(menu[len], sizeof menu len"\d%d. %s"item-EXTRAS_STARTID+1g_extraitem_name[item])
            }
            
len += formatex(menu[len], sizeof menu len" \r[ %d de Oro ]^n"g_extraitem_cost[item])
        }
        else
        {
            switch(
item)
            {
                case 
EXTRA_ANTIDOTElen += formatex(menu[len], sizeof menu len"\r%d.\w %L"item-EXTRAS_STARTID+1id"MENU_EXTRA2")
                case 
EXTRA_INFBOMBlen += formatex(menu[len], sizeof menu len"\r%d.\w %L"item-EXTRAS_STARTID+1id"MENU_EXTRA4")
                default: 
len += formatex(menu[len], sizeof menu len"\r%d.\w %s"item-EXTRAS_STARTID+1g_extraitem_name[item])
            }
            
len += formatex(menu[len], sizeof menu len" \r[ %d de Oro ]^n"g_extraitem_cost[item])
        }
    }
    
    
len += formatex(menu[len], sizeof menu len"^n\r8.\y Anterior^n\r9.\y Siguiente^n^n\r0.\y Salir")
    
    
show_menu(idKEYSMENUmenu, -1"Extra Items")

Hello, I have this code and need to know how to separate extra items for humans and extra items for zombies.


Thanks.
__________________
Editando Zombie Plague ;)
ADD47 is offline
E.bo
Member
Join Date: Aug 2014
Old 07-17-2016 , 20:26   Re: Pull apart zombies extra items and humans extra items.
Reply With Quote #2

Humans
if ( cs_get_user_team(id) == CS_TEAM_CT)

Zombie
if ( cs_get_user_team(id) == CS_TEAM_T)
E.bo 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 21:30.


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