Resolved Skin Menu with VIP

Coding Help/Re-API Supported
User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1791
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 88 times
Age: 21
Contact:

Re: Skin Menu with VIP

#11

Post by Raheem » 9 Months Ago

You should set player models at start of every new round, on user humanized forward.

Here it's:
  • Code: Select all

    #include <zombie_escape>
    #include <ze_vip>
     
     
    #define PLUGIN "Admin Model Menu"
    #define VERSION "1.0"
    #define AUTHOR "Mark"
     
    new const Asasin_Models[][] =
    {
        "models/player/Asasin/Asasin.mdl"
    }
     
    new const Death_Models[][] =
    {
        "models/player/Death/Death.mdl"
    }
     
    new const Dobby_Models[][] =
    {
        "models/player/Dobby/Dobby.mdl"
    }
     
    new const Sonic_Models[][] =
    {
        "models/player/Sonic/Sonic.mdl"
    }
     
    new const Fiftycent_Models[][] =
    {
        "models/player/50cent/50cent.mdl"
    }
     
    new const Joker_Models[][] =
    {
        "models/player/Joker/Joker.mdl"
    }
     
    new const Iron_Models[][] =
    {
        "models/player/Iron/Iron.mdl"
    }
     
    new const DeadSpace2_Models[][] =
    {
        "models/player/DeadSpace2/DeadSpace2.mdl"
    }
     
    new const Trump_Models[][] =
    {
        "models/player/Trump/Trump.mdl"
    }
     
    new const Trollface_Models[][] =
    {
        "models/player/Trollface/Trollface.mdl"
    }
     
    new const Phantom_Models[][] =
    {
        "models/player/Phantom/Phantom.mdl"
    }
     
    new const Pirategirl_Models[][] =
    {
        "models/player/Pirategirl/Pirategirl.mdl"
    }
     
    new const Leo_Models[][] =
    {
        "models/player/leo/leo.mdl"
    }
     
    new const Mike_Models[][] =
    {
        "models/player/mike/mike.mdl"
    }
     
    new const Donatello_Models[][] =
    {
        "models/player/don/don.mdl"
    }
     
    new const Raphael_Models[][] =
    {
        "models/player/raphael/raphael.mdl"
    }
     
    new const Capamerica_Models[][] =
    {
        "models/player/capamerica/capamerica.mdl"
    }
     
    new const Batman_Models[][] =
    {
        "models/player/batman/batman.mdl"
    }
     
    new g_pCvarUseTimes
    new g_iUsedTimes[33]
     
    new bool:g_bAssasin[33], bool:g_bDeath[33], bool:g_bDobby[33], bool:g_bSonic[33],
    bool:g_b50cent[33], bool:g_bJoker[33], bool:g_bIron[33], bool:g_bDeadSpace2[33],
    bool:g_bTrump[33], bool:g_bTrollface[33], bool:g_bPhantom[33], bool:g_bPirategirl[33],
    bool:g_bLeo[33], bool:g_bMike[33],bool:g_bDon[33], bool:g_bRaphael[33], bool:g_bCapamerica[33],
    bool:g_bBatman[33]
     
     
    public plugin_natives()
    {
        register_native("ze_open_hskin_menu", "native_ze_open_hskin_menu", 1)
    }
     
    public plugin_precache()
    {
        new i
     
        for (i = 0; i <= charsmax(Asasin_Models); i++)
            precache_model(Asasin_Models[i])
     
        for (i = 0; i <= charsmax(Death_Models); i++)
            precache_model(Death_Models[i])
     
        for (i = 0; i <= charsmax(Dobby_Models); i++)
            precache_model(Dobby_Models[i])
     
        for (i = 0; i <= charsmax(Sonic_Models); i++)
            precache_model(Sonic_Models[i])
     
        for (i = 0; i <= charsmax(Fiftycent_Models); i++)
            precache_model(Fiftycent_Models[i])
     
        for (i = 0; i <= charsmax(Joker_Models); i++)
            precache_model(Joker_Models[i])
     
        for (i = 0; i <= charsmax(Iron_Models); i++)
            precache_model(Iron_Models[i])
     
        for (i = 0; i <= charsmax(DeadSpace2_Models); i++)
            precache_model(DeadSpace2_Models[i])
     
        for (i = 0; i <= charsmax(Trump_Models); i++)
            precache_model(Trump_Models[i])
     
        for (i = 0; i <= charsmax(Trollface_Models); i++)
            precache_model(Trollface_Models[i])
     
        for (i = 0; i <= charsmax(Phantom_Models); i++)
            precache_model(Phantom_Models[i])
     
        for (i = 0; i <= charsmax(Pirategirl_Models); i++)
            precache_model(Pirategirl_Models[i])
           
        for (i = 0; i <= charsmax(Leo_Models); i++)
            precache_model(Leo_Models[i])
     
        for (i = 0; i <= charsmax(Mike_Models); i++)
            precache_model(Mike_Models[i])
     
        for (i = 0; i <= charsmax(Donatello_Models); i++)
            precache_model(Donatello_Models[i])
     
        for (i = 0; i <= charsmax(Raphael_Models); i++)
            precache_model(Raphael_Models[i])
     
        for (i = 0; i <= charsmax(Capamerica_Models); i++)
            precache_model(Capamerica_Models[i])
     
        for (i = 0; i <= charsmax(Batman_Models); i++)
            precache_model(Batman_Models[i])
    }
     
    public plugin_init()
    {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        g_pCvarUseTimes = register_cvar("ze_hskin_menu_used", "1")
    }
     
    public ze_user_humanized(id)
    {
    	if (g_bAssasin[id])
    	{
    		rg_set_user_model(id, "Asasin")
    	}
    	else if (g_bDeath[id])
    	{
    		rg_set_user_model(id, "Death")
    	}
    	else if (g_bDobby[id])
    	{
    		rg_set_user_model(id, "Dobby")
    	}
    	else if (g_bSonic[id])
    	{
    		rg_set_user_model(id, "Sonic")
    	}
    	else if (g_b50cent[id])
    	{
    		rg_set_user_model(id, "50cent")
    	}
    	else if (g_bJoker[id])
    	{
    		rg_set_user_model(id, "Joker")
    	}
    	else if (g_bIron[id])
    	{
    		rg_set_user_model(id, "Iron")
    	}
    	else if (g_bDeadSpace2[id])
    	{
    		rg_set_user_model(id, "DeadSpace2")
    	}
    	else if (g_bTrump[id])
    	{
    		rg_set_user_model(id, "Trump")
    	}
    	else if (g_bTrollface[id])
    	{
    		rg_set_user_model(id, "Trollface")
    	}
    	else if (g_bPhantom[id])
    	{
    		rg_set_user_model(id, "Phantom")
    	}
    	else if (g_bPirategirl[id])
    	{
    		rg_set_user_model(id, "Pirategirl")
    	}
    	else if (g_bLeo[id])
    	{
    		rg_set_user_model(id, "leo")
    	}
    	else if (g_bMike[id])
    	{
    		rg_set_user_model(id, "mike")
    	}
    	else if (g_bDon[id])
    	{
    		rg_set_user_model(id, "don")
    	}
    	else if (g_bRaphael[id])
    	{
    		rg_set_user_model(id, "raphael")
    	}
    	else if (g_bCapamerica[id])
    	{
    		rg_set_user_model(id, "capamerica")
    	}
    	else if (g_bBatman[id])
    	{
    		rg_set_user_model(id, "batman")
    	}
    	
        g_iUsedTimes[id] = 0
    }
     
    public ze_user_infected(Victim)
    {
        g_bAssasin[Victim] = false
        g_bDeath[Victim] = false
        g_bDobby[Victim] = false
        g_bSonic[Victim] = false
        g_b50cent[Victim] = false
        g_bJoker[Victim] = false
        g_bIron[Victim] = false
        g_bDeadSpace2[Victim] = false
        g_bTrump[Victim] = false
        g_bTrollface[Victim] = false
        g_bPhantom[Victim] = false
        g_bPirategirl[Victim] = false
        g_bLeo[Victim] = false
        g_bMike[Victim] = false
        g_bDon[Victim] = false
        g_bRaphael[Victim] = false
        g_bCapamerica[Victim] = false
        g_bBatman[Victim] = false
        g_iUsedTimes[Victim] = 0
    }
     
    public client_putinserver(id)
    {
        g_bAssasin[id] = false
        g_bDeath[id] = false
        g_bDobby[id] = false
        g_bSonic[id] = false
        g_b50cent[id] = false
        g_bJoker[id] = false
        g_bIron[id] = false
        g_bDeadSpace2[id] = false
        g_bTrump[id] = false
        g_bTrollface[id] = false
        g_bPhantom[id] = false
        g_bPirategirl[id] = false
        g_bLeo[id] = false
        g_bMike[id] = false
        g_bDon[id] = false
        g_bRaphael[id] = false
        g_bCapamerica[id] = false
        g_bBatman[id] = false
        g_iUsedTimes[id] = 0
    }
     
    public client_disconnected(id)
    {
        g_bAssasin[id] = false
        g_bDeath[id] = false
        g_bDobby[id] = false
        g_bSonic[id] = false
        g_b50cent[id] = false
        g_bJoker[id] = false
        g_bIron[id] = false
        g_bDeadSpace2[id] = false
        g_bTrump[id] = false
        g_bTrollface[id] = false
        g_bPhantom[id] = false
        g_bPirategirl[id] = false
        g_bLeo[id] = false
        g_bMike[id] = false
        g_bDon[id] = false
        g_bRaphael[id] = false
        g_bCapamerica[id] = false
        g_bBatman[id] = false
        g_iUsedTimes[id] = 0
    }
     
    public Show_Hmodel_Menu(id)
    {
        if (!is_user_connected(id))
        {
            return PLUGIN_CONTINUE
        }
    	
        if (ze_is_user_zombie(id))
        {
            ze_colored_print(id, "!tYou can't change your skin while zombie!y.")
            return PLUGIN_HANDLED
        }
    	
        if (g_iUsedTimes[id] >= get_pcvar_num(g_pCvarUseTimes))
        {
            ze_colored_print(id, "!tMaximum have been reached !y[!g%d!y]!", get_pcvar_num(g_pCvarUseTimes))
            return PLUGIN_HANDLED
        }
    	
        if (!is_user_alive(id))
        {
            ze_colored_print(id, "!tDead can't open knife menu!y.")
            return PLUGIN_HANDLED
        }
    	
        Hmodel_Menu(id)
        return PLUGIN_CONTINUE
    }
     
    public Hmodel_Menu(id)
    {
        new hmenu = menu_create("\r[\wHuman Models\r]\r", "menu_hskins")
        menu_additem(hmenu, "\wAssasin", "", 0)
        menu_additem(hmenu, "\wDeath", "", 0)
        menu_additem(hmenu, "\wDobby", "", 0)
        menu_additem(hmenu, "\wSonic", "", 0)
        menu_additem(hmenu, "\w50cent", "", 0)
        menu_additem(hmenu, "\wJoker", "", 0)
        menu_additem(hmenu, "\wIronMan", "", 0)
        menu_additem(hmenu, "\wDead Space", "", 0)
     
        if (ze_get_vip_flags(id) & VIP_D)
        {
            menu_additem(hmenu, "\wTrump \r[VIP]", "", 0)
            menu_additem(hmenu, "\wTrollFace \r[VIP]", "", 0)
            menu_additem(hmenu, "\wPhantom \r[VIP]", "", 0)
            menu_additem(hmenu, "\wPirategirl \r[VIP]", "", 0)
        }
     
        if (ze_get_vip_flags(id) & VIP_E)
        {
            menu_additem(hmenu, "\wLeo \r[VIP]", "", 0)
            menu_additem(hmenu, "\wMike \r[VIP]", "", 0)
            menu_additem(hmenu, "\wDon \r[VIP]", "", 0)
            menu_additem(hmenu, "\wRaphael \r[VIP]", "", 0)
            menu_additem(hmenu, "\wCaptain America \r[VIP]", "", 0)
            menu_additem(hmenu, "\wBatman \r[VIP]", "", 0)
        }
     
        menu_setprop(hmenu, MPROP_EXIT, MEXIT_ALL)
        menu_display(id, hmenu, 0)
    }
     
    public menu_hskins(id, hmenu, item)
    {
        if(!is_user_alive(id) || ze_is_user_zombie(id))
            return PLUGIN_HANDLED
     
        switch(item)
        {
            case 0 : // Assassin
            {
                g_bAssasin[id] = true
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Asasin")
                ze_colored_print(id, "You picked the Assassin skin", id)
                g_iUsedTimes[id]++
            }
            case 1 : // Death
            {
                g_bAssasin[id] = false
                g_bDeath[id] = true
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Death")
                ze_colored_print(id, "You picked the Death skin", id)
                g_iUsedTimes[id]++
            }
            case 2 : // Dobby
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = true
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Dobby")
                ze_colored_print(id, "You picked the Dobby skin", id)
                g_iUsedTimes[id]++
            }
            case 3 : // Sonic
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = true
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Sonic")
                ze_colored_print(id, "You picked the Sonic skin", id)
                g_iUsedTimes[id]++
            }
            case 4 : // 50cent
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = true
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "50cent")
                ze_colored_print(id, "You picked the 50cent skin", id)
                g_iUsedTimes[id]++
            }
            case 5 : // Joker
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = true
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Joker")
                ze_colored_print(id, "You picked the Joker skin", id)
                g_iUsedTimes[id]++
            }
            case 6 : //Iron
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = true
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Iron")
                ze_colored_print(id, "You picked the Iron Man skin", id)
                g_iUsedTimes[id]++
            }
            case 7 : // DeadSpace2
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = true
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "DeadSpace2")
                ze_colored_print(id, "You picked the Dead Space skin", id)
                g_iUsedTimes[id]++
            }
            case 8 : // Trump
            {      
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = true
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Trump")
                    ze_colored_print(id, "You picked the Trump skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 9 : // Trollface
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = true
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Trollface")
                    ze_colored_print(id, "You picked the Trollface skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 10 : // Phantom
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = true
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Phantom")
                    ze_colored_print(id, "You picked the Phantom skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 11 : // Pirategirl
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = true
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Pirategirl")
                    ze_colored_print(id, "You picked the Pirategirl skin", id)
                    g_iUsedTimes[id]++
                }                      
            }
            case 12 : //Leonardo
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = true
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "leo")
                    ze_colored_print(id, "You picked the Leonardo skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 13 : // Michelangelo
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = true
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "mike")
                    ze_colored_print(id, "You picked the Michelangelo skin", id)
                    g_iUsedTimes[id]++
                }      
            }
            case 14 : // Donatello
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = true
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "don")
                    ze_colored_print(id, "You picked the Donatello skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 15 : // Raphael
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = true
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "raphael")
                    ze_colored_print(id, "You picked the Raphael skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 16 : // Captian America
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = true
                    g_bBatman[id] = false
                    rg_set_user_model(id, "capamerica")
                    ze_colored_print(id, "You picked the Captian America skin", id)
                    g_iUsedTimes[id]++
                }          
            }
            case 17 : // Batman
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = true
                    rg_set_user_model(id, "batman")
                    ze_colored_print(id, "You picked the Batman skin", id)
                    g_iUsedTimes[id]++
                }            
            }
     
        }    
        menu_destroy(hmenu)
        return PLUGIN_HANDLED
    }
     
    public native_ze_open_hskin_menu(id)
    {
        Show_Hmodel_Menu(id)
    }
Also make sure to place plugin name at the end of plugins-zombie_escape.ini
I removed useless includes and used reapi function for setting models.
You don't know? Learn and you will know.

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 274
Joined: 9 Months Ago
Location: Des Moines/USA
Donation: 1x donated in total €10.00
Has thanked: 6 times
Been thanked: 20 times
Age: 33
Contact:

#12

Post by Mark » 9 Months Ago

Raheem wrote:
9 Months Ago
You should set player models at start of every new round, on user humanized forward.

Here it's:
  • Code: Select all

    #include <zombie_escape>
    #include <ze_vip>
     
     
    #define PLUGIN "Admin Model Menu"
    #define VERSION "1.0"
    #define AUTHOR "Mark"
     
    new const Asasin_Models[][] =
    {
        "models/player/Asasin/Asasin.mdl"
    }
     
    new const Death_Models[][] =
    {
        "models/player/Death/Death.mdl"
    }
     
    new const Dobby_Models[][] =
    {
        "models/player/Dobby/Dobby.mdl"
    }
     
    new const Sonic_Models[][] =
    {
        "models/player/Sonic/Sonic.mdl"
    }
     
    new const Fiftycent_Models[][] =
    {
        "models/player/50cent/50cent.mdl"
    }
     
    new const Joker_Models[][] =
    {
        "models/player/Joker/Joker.mdl"
    }
     
    new const Iron_Models[][] =
    {
        "models/player/Iron/Iron.mdl"
    }
     
    new const DeadSpace2_Models[][] =
    {
        "models/player/DeadSpace2/DeadSpace2.mdl"
    }
     
    new const Trump_Models[][] =
    {
        "models/player/Trump/Trump.mdl"
    }
     
    new const Trollface_Models[][] =
    {
        "models/player/Trollface/Trollface.mdl"
    }
     
    new const Phantom_Models[][] =
    {
        "models/player/Phantom/Phantom.mdl"
    }
     
    new const Pirategirl_Models[][] =
    {
        "models/player/Pirategirl/Pirategirl.mdl"
    }
     
    new const Leo_Models[][] =
    {
        "models/player/leo/leo.mdl"
    }
     
    new const Mike_Models[][] =
    {
        "models/player/mike/mike.mdl"
    }
     
    new const Donatello_Models[][] =
    {
        "models/player/don/don.mdl"
    }
     
    new const Raphael_Models[][] =
    {
        "models/player/raphael/raphael.mdl"
    }
     
    new const Capamerica_Models[][] =
    {
        "models/player/capamerica/capamerica.mdl"
    }
     
    new const Batman_Models[][] =
    {
        "models/player/batman/batman.mdl"
    }
     
    new g_pCvarUseTimes
    new g_iUsedTimes[33]
     
    new bool:g_bAssasin[33], bool:g_bDeath[33], bool:g_bDobby[33], bool:g_bSonic[33],
    bool:g_b50cent[33], bool:g_bJoker[33], bool:g_bIron[33], bool:g_bDeadSpace2[33],
    bool:g_bTrump[33], bool:g_bTrollface[33], bool:g_bPhantom[33], bool:g_bPirategirl[33],
    bool:g_bLeo[33], bool:g_bMike[33],bool:g_bDon[33], bool:g_bRaphael[33], bool:g_bCapamerica[33],
    bool:g_bBatman[33]
     
     
    public plugin_natives()
    {
        register_native("ze_open_hskin_menu", "native_ze_open_hskin_menu", 1)
    }
     
    public plugin_precache()
    {
        new i
     
        for (i = 0; i <= charsmax(Asasin_Models); i++)
            precache_model(Asasin_Models[i])
     
        for (i = 0; i <= charsmax(Death_Models); i++)
            precache_model(Death_Models[i])
     
        for (i = 0; i <= charsmax(Dobby_Models); i++)
            precache_model(Dobby_Models[i])
     
        for (i = 0; i <= charsmax(Sonic_Models); i++)
            precache_model(Sonic_Models[i])
     
        for (i = 0; i <= charsmax(Fiftycent_Models); i++)
            precache_model(Fiftycent_Models[i])
     
        for (i = 0; i <= charsmax(Joker_Models); i++)
            precache_model(Joker_Models[i])
     
        for (i = 0; i <= charsmax(Iron_Models); i++)
            precache_model(Iron_Models[i])
     
        for (i = 0; i <= charsmax(DeadSpace2_Models); i++)
            precache_model(DeadSpace2_Models[i])
     
        for (i = 0; i <= charsmax(Trump_Models); i++)
            precache_model(Trump_Models[i])
     
        for (i = 0; i <= charsmax(Trollface_Models); i++)
            precache_model(Trollface_Models[i])
     
        for (i = 0; i <= charsmax(Phantom_Models); i++)
            precache_model(Phantom_Models[i])
     
        for (i = 0; i <= charsmax(Pirategirl_Models); i++)
            precache_model(Pirategirl_Models[i])
           
        for (i = 0; i <= charsmax(Leo_Models); i++)
            precache_model(Leo_Models[i])
     
        for (i = 0; i <= charsmax(Mike_Models); i++)
            precache_model(Mike_Models[i])
     
        for (i = 0; i <= charsmax(Donatello_Models); i++)
            precache_model(Donatello_Models[i])
     
        for (i = 0; i <= charsmax(Raphael_Models); i++)
            precache_model(Raphael_Models[i])
     
        for (i = 0; i <= charsmax(Capamerica_Models); i++)
            precache_model(Capamerica_Models[i])
     
        for (i = 0; i <= charsmax(Batman_Models); i++)
            precache_model(Batman_Models[i])
    }
     
    public plugin_init()
    {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        g_pCvarUseTimes = register_cvar("ze_hskin_menu_used", "1")
    }
     
    public ze_user_humanized(id)
    {
    	if (g_bAssasin[id])
    	{
    		rg_set_user_model(id, "Asasin")
    	}
    	else if (g_bDeath[id])
    	{
    		rg_set_user_model(id, "Death")
    	}
    	else if (g_bDobby[id])
    	{
    		rg_set_user_model(id, "Dobby")
    	}
    	else if (g_bSonic[id])
    	{
    		rg_set_user_model(id, "Sonic")
    	}
    	else if (g_b50cent[id])
    	{
    		rg_set_user_model(id, "50cent")
    	}
    	else if (g_bJoker[id])
    	{
    		rg_set_user_model(id, "Joker")
    	}
    	else if (g_bIron[id])
    	{
    		rg_set_user_model(id, "Iron")
    	}
    	else if (g_bDeadSpace2[id])
    	{
    		rg_set_user_model(id, "DeadSpace2")
    	}
    	else if (g_bTrump[id])
    	{
    		rg_set_user_model(id, "Trump")
    	}
    	else if (g_bTrollface[id])
    	{
    		rg_set_user_model(id, "Trollface")
    	}
    	else if (g_bPhantom[id])
    	{
    		rg_set_user_model(id, "Phantom")
    	}
    	else if (g_bPirategirl[id])
    	{
    		rg_set_user_model(id, "Pirategirl")
    	}
    	else if (g_bLeo[id])
    	{
    		rg_set_user_model(id, "leo")
    	}
    	else if (g_bMike[id])
    	{
    		rg_set_user_model(id, "mike")
    	}
    	else if (g_bDon[id])
    	{
    		rg_set_user_model(id, "don")
    	}
    	else if (g_bRaphael[id])
    	{
    		rg_set_user_model(id, "raphael")
    	}
    	else if (g_bCapamerica[id])
    	{
    		rg_set_user_model(id, "capamerica")
    	}
    	else if (g_bBatman[id])
    	{
    		rg_set_user_model(id, "batman")
    	}
    	
        g_iUsedTimes[id] = 0
    }
     
    public ze_user_infected(Victim)
    {
        g_bAssasin[Victim] = false
        g_bDeath[Victim] = false
        g_bDobby[Victim] = false
        g_bSonic[Victim] = false
        g_b50cent[Victim] = false
        g_bJoker[Victim] = false
        g_bIron[Victim] = false
        g_bDeadSpace2[Victim] = false
        g_bTrump[Victim] = false
        g_bTrollface[Victim] = false
        g_bPhantom[Victim] = false
        g_bPirategirl[Victim] = false
        g_bLeo[Victim] = false
        g_bMike[Victim] = false
        g_bDon[Victim] = false
        g_bRaphael[Victim] = false
        g_bCapamerica[Victim] = false
        g_bBatman[Victim] = false
        g_iUsedTimes[Victim] = 0
    }
     
    public client_putinserver(id)
    {
        g_bAssasin[id] = false
        g_bDeath[id] = false
        g_bDobby[id] = false
        g_bSonic[id] = false
        g_b50cent[id] = false
        g_bJoker[id] = false
        g_bIron[id] = false
        g_bDeadSpace2[id] = false
        g_bTrump[id] = false
        g_bTrollface[id] = false
        g_bPhantom[id] = false
        g_bPirategirl[id] = false
        g_bLeo[id] = false
        g_bMike[id] = false
        g_bDon[id] = false
        g_bRaphael[id] = false
        g_bCapamerica[id] = false
        g_bBatman[id] = false
        g_iUsedTimes[id] = 0
    }
     
    public client_disconnected(id)
    {
        g_bAssasin[id] = false
        g_bDeath[id] = false
        g_bDobby[id] = false
        g_bSonic[id] = false
        g_b50cent[id] = false
        g_bJoker[id] = false
        g_bIron[id] = false
        g_bDeadSpace2[id] = false
        g_bTrump[id] = false
        g_bTrollface[id] = false
        g_bPhantom[id] = false
        g_bPirategirl[id] = false
        g_bLeo[id] = false
        g_bMike[id] = false
        g_bDon[id] = false
        g_bRaphael[id] = false
        g_bCapamerica[id] = false
        g_bBatman[id] = false
        g_iUsedTimes[id] = 0
    }
     
    public Show_Hmodel_Menu(id)
    {
        if (!is_user_connected(id))
        {
            return PLUGIN_CONTINUE
        }
    	
        if (ze_is_user_zombie(id))
        {
            ze_colored_print(id, "!tYou can't change your skin while zombie!y.")
            return PLUGIN_HANDLED
        }
    	
        if (g_iUsedTimes[id] >= get_pcvar_num(g_pCvarUseTimes))
        {
            ze_colored_print(id, "!tMaximum have been reached !y[!g%d!y]!", get_pcvar_num(g_pCvarUseTimes))
            return PLUGIN_HANDLED
        }
    	
        if (!is_user_alive(id))
        {
            ze_colored_print(id, "!tDead can't open knife menu!y.")
            return PLUGIN_HANDLED
        }
    	
        Hmodel_Menu(id)
        return PLUGIN_CONTINUE
    }
     
    public Hmodel_Menu(id)
    {
        new hmenu = menu_create("\r[\wHuman Models\r]\r", "menu_hskins")
        menu_additem(hmenu, "\wAssasin", "", 0)
        menu_additem(hmenu, "\wDeath", "", 0)
        menu_additem(hmenu, "\wDobby", "", 0)
        menu_additem(hmenu, "\wSonic", "", 0)
        menu_additem(hmenu, "\w50cent", "", 0)
        menu_additem(hmenu, "\wJoker", "", 0)
        menu_additem(hmenu, "\wIronMan", "", 0)
        menu_additem(hmenu, "\wDead Space", "", 0)
     
        if (ze_get_vip_flags(id) & VIP_D)
        {
            menu_additem(hmenu, "\wTrump \r[VIP]", "", 0)
            menu_additem(hmenu, "\wTrollFace \r[VIP]", "", 0)
            menu_additem(hmenu, "\wPhantom \r[VIP]", "", 0)
            menu_additem(hmenu, "\wPirategirl \r[VIP]", "", 0)
        }
     
        if (ze_get_vip_flags(id) & VIP_E)
        {
            menu_additem(hmenu, "\wLeo \r[VIP]", "", 0)
            menu_additem(hmenu, "\wMike \r[VIP]", "", 0)
            menu_additem(hmenu, "\wDon \r[VIP]", "", 0)
            menu_additem(hmenu, "\wRaphael \r[VIP]", "", 0)
            menu_additem(hmenu, "\wCaptain America \r[VIP]", "", 0)
            menu_additem(hmenu, "\wBatman \r[VIP]", "", 0)
        }
     
        menu_setprop(hmenu, MPROP_EXIT, MEXIT_ALL)
        menu_display(id, hmenu, 0)
    }
     
    public menu_hskins(id, hmenu, item)
    {
        if(!is_user_alive(id) || ze_is_user_zombie(id))
            return PLUGIN_HANDLED
     
        switch(item)
        {
            case 0 : // Assassin
            {
                g_bAssasin[id] = true
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Asasin")
                ze_colored_print(id, "You picked the Assassin skin", id)
                g_iUsedTimes[id]++
            }
            case 1 : // Death
            {
                g_bAssasin[id] = false
                g_bDeath[id] = true
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Death")
                ze_colored_print(id, "You picked the Death skin", id)
                g_iUsedTimes[id]++
            }
            case 2 : // Dobby
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = true
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Dobby")
                ze_colored_print(id, "You picked the Dobby skin", id)
                g_iUsedTimes[id]++
            }
            case 3 : // Sonic
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = true
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Sonic")
                ze_colored_print(id, "You picked the Sonic skin", id)
                g_iUsedTimes[id]++
            }
            case 4 : // 50cent
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = true
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "50cent")
                ze_colored_print(id, "You picked the 50cent skin", id)
                g_iUsedTimes[id]++
            }
            case 5 : // Joker
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = true
                g_bIron[id] = false
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Joker")
                ze_colored_print(id, "You picked the Joker skin", id)
                g_iUsedTimes[id]++
            }
            case 6 : //Iron
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = true
                g_bDeadSpace2[id] = false
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "Iron")
                ze_colored_print(id, "You picked the Iron Man skin", id)
                g_iUsedTimes[id]++
            }
            case 7 : // DeadSpace2
            {
                g_bAssasin[id] = false
                g_bDeath[id] = false
                g_bDobby[id] = false
                g_bSonic[id] = false
                g_b50cent[id] = false
                g_bJoker[id] = false
                g_bIron[id] = false
                g_bDeadSpace2[id] = true
                g_bTrump[id] = false
                g_bTrollface[id] = false
                g_bPhantom[id] = false
                g_bPirategirl[id] = false
                g_bLeo[id] = false
                g_bMike[id] = false
                g_bDon[id] = false
                g_bRaphael[id] = false
                g_bCapamerica[id] = false
                g_bBatman[id] = false
                rg_set_user_model(id, "DeadSpace2")
                ze_colored_print(id, "You picked the Dead Space skin", id)
                g_iUsedTimes[id]++
            }
            case 8 : // Trump
            {      
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = true
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Trump")
                    ze_colored_print(id, "You picked the Trump skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 9 : // Trollface
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = true
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Trollface")
                    ze_colored_print(id, "You picked the Trollface skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 10 : // Phantom
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = true
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Phantom")
                    ze_colored_print(id, "You picked the Phantom skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 11 : // Pirategirl
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = true
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "Pirategirl")
                    ze_colored_print(id, "You picked the Pirategirl skin", id)
                    g_iUsedTimes[id]++
                }                      
            }
            case 12 : //Leonardo
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = true
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "leo")
                    ze_colored_print(id, "You picked the Leonardo skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 13 : // Michelangelo
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = true
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "mike")
                    ze_colored_print(id, "You picked the Michelangelo skin", id)
                    g_iUsedTimes[id]++
                }      
            }
            case 14 : // Donatello
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = true
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "don")
                    ze_colored_print(id, "You picked the Donatello skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 15 : // Raphael
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = true
                    g_bCapamerica[id] = false
                    g_bBatman[id] = false
                    rg_set_user_model(id, "raphael")
                    ze_colored_print(id, "You picked the Raphael skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 16 : // Captian America
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = true
                    g_bBatman[id] = false
                    rg_set_user_model(id, "capamerica")
                    ze_colored_print(id, "You picked the Captian America skin", id)
                    g_iUsedTimes[id]++
                }          
            }
            case 17 : // Batman
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bAssasin[id] = false
                    g_bDeath[id] = false
                    g_bDobby[id] = false
                    g_bSonic[id] = false
                    g_b50cent[id] = false
                    g_bJoker[id] = false
                    g_bIron[id] = false
                    g_bDeadSpace2[id] = false
                    g_bTrump[id] = false
                    g_bTrollface[id] = false
                    g_bPhantom[id] = false
                    g_bPirategirl[id] = false
                    g_bLeo[id] = false
                    g_bMike[id] = false
                    g_bDon[id] = false
                    g_bRaphael[id] = false
                    g_bCapamerica[id] = false
                    g_bBatman[id] = true
                    rg_set_user_model(id, "batman")
                    ze_colored_print(id, "You picked the Batman skin", id)
                    g_iUsedTimes[id]++
                }            
            }
     
        }    
        menu_destroy(hmenu)
        return PLUGIN_HANDLED
    }
     
    public native_ze_open_hskin_menu(id)
    {
        Show_Hmodel_Menu(id)
    }
Also make sure to place plugin name at the end of plugins-zombie_escape.ini
I removed useless includes and used reapi function for setting models.
Seems better but when they are infected and the round is over when they are human there custom skin is gone and they have to repick. How can i make it so that untill they select a new skin they will always have the one the picked?

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1791
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 88 times
Age: 21
Contact:

#13

Post by Raheem » 9 Months Ago

Remove those from infection forward:
  • Code: Select all

        g_bAssasin[Victim] = false
        g_bDeath[Victim] = false
        g_bDobby[Victim] = false
        g_bSonic[Victim] = false
        g_b50cent[Victim] = false
        g_bJoker[Victim] = false
        g_bIron[Victim] = false
        g_bDeadSpace2[Victim] = false
        g_bTrump[Victim] = false
        g_bTrollface[Victim] = false
        g_bPhantom[Victim] = false
        g_bPirategirl[Victim] = false
        g_bLeo[Victim] = false
        g_bMike[Victim] = false
        g_bDon[Victim] = false
        g_bRaphael[Victim] = false
        g_bCapamerica[Victim] = false
        g_bBatman[Victim] = false
You don't know? Learn and you will know.

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 274
Joined: 9 Months Ago
Location: Des Moines/USA
Donation: 1x donated in total €10.00
Has thanked: 6 times
Been thanked: 20 times
Age: 33
Contact:

#14

Post by Mark » 9 Months Ago

Solved

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 274
Joined: 9 Months Ago
Location: Des Moines/USA
Donation: 1x donated in total €10.00
Has thanked: 6 times
Been thanked: 20 times
Age: 33
Contact:

#15

Post by Mark » 9 Months Ago

Trying todo a Zombie Skin Menu but the skin changes to default when new round begins.

Maybe add a native is_user_human?

Also why don't you have a donation link on website?
  1. #include <zombie_escape>
  2. #include <ze_vip>
  3.  
  4.  
  5. #define PLUGIN "Custom zModel Menu"
  6. #define VERSION "1.0"
  7. #define AUTHOR "Mark"
  8.  
  9. new const Butcher_Models[][] =
  10. {
  11.     "models/player/butcher_zom/butcher_zom.mdl"
  12. }
  13.  
  14. new const Doom_Models[][] =
  15. {
  16.     "models/player/doom_zom/doom_zom.mdl"
  17. }
  18.  
  19. new const Fleshpound_Models[][] =
  20. {
  21.     "models/player/fleshpound_zom/fleshpound_zom.mdl"
  22. }
  23.  
  24. new const Jumper_Models[][] =
  25. {
  26.     "models/player/jumper_zom/jumper_zom.mdl"
  27. }
  28.  
  29. new const Mon_Assassin_Models[][] =
  30. {
  31.     "models/player/monster_assassin_zom/monster_assassin_zom.mdl"
  32. }
  33.  
  34. new const Mon_Zom_Models[][] =
  35. {
  36.     "models/player/monster_zom/monster_zom.mdl"
  37. }
  38.  
  39. new const Abaddon_Models[][] =
  40. {
  41.     "models/player/abaddon_zom/abaddon_zom.mdl"
  42. }
  43.  
  44. new const Assassin_Zom_Models[][] =
  45. {
  46.     "models/player/assassin_zom/assassin_zom.mdl"
  47. }
  48.  
  49. new const Deimosboss_Models[][] =
  50. {
  51.     "models/player/deimosboss_zom/deimosboss_zom.mdl"
  52. }
  53.  
  54. new const Lockerz_Models[][] =
  55. {
  56.     "models/player/lockerz_zom/lockerz_zom.mdl"
  57. }
  58.  
  59. new const Mon_Nemesis_Models[][] =
  60. {
  61.     "models/player/monster_nemesis_zom/monster_nemesis_zom.mdl"
  62. }
  63.  
  64. new const NightCrawler_Models[][] =
  65. {
  66.     "models/player/nightcrawler_zom/nightcrawler_zom.mdl"
  67. }
  68.  
  69. new const NightRider_Models[][] =
  70. {
  71.     "models/player/nightrider_zom/nightrider_zom.mdl"
  72. }
  73.  
  74. new const Poison_Models[][] =
  75. {
  76.     "models/player/poison_nshaman_zom/poison_nshaman_zom.mdl"
  77. }
  78.  
  79. new const Predator_Models[][] =
  80. {
  81.     "models/player/predator_zom/predator_zom.mdl"
  82. }
  83.  
  84. new const Raptor_Models[][] =
  85. {
  86.     "models/player/raptor_zom/raptor_zom.mdl"
  87. }
  88.  
  89. new const RealBoss_Models[][] =
  90. {
  91.     "models/player/realboss_zom/realboss_zom.mdl"
  92. }
  93.  
  94. new const Replican_Models[][] =
  95. {
  96.     "models/player/replican_fear_zom/replican_fear_zom.mdl"
  97. }
  98.  
  99. new const Terminator_Models[][] =
  100. {
  101.     "models/player/terminator_zom/terminator_zom.mdl"
  102. }
  103.  
  104. new g_pCvarUseTimes
  105. new g_iUsedTimes[33]
  106.  
  107. new bool:g_bButcher[33], bool:g_bDoom[33], bool:g_bFleshpound[33], bool:g_bJumper[33],
  108. bool:g_bMon_Assassin[33], bool:g_bMon_Zom[33], bool:g_bAbaddon[33], bool:g_bAssassin_Zom[33],
  109. bool:g_bDeimosboss[33], bool:g_bLockerz[33], bool:g_bMon_Nemesis[33], bool:g_bNightCrawler[33],
  110. bool:g_bNightRider[33], bool:g_bPoison[33],bool:g_bPredator[33], bool:g_bRaptor[33], bool:g_bRealBoss[33],
  111. bool:g_bReplican[33], bool:g_bTerminator[33]
  112.  
  113.  
  114. public plugin_natives()
  115. {
  116.     register_native("ze_open_zskin_menu", "native_ze_open_zskin_menu", 1)
  117. }
  118.  
  119. public plugin_precache()
  120. {
  121.     new i
  122.  
  123.     for (i = 0; i <= charsmax(Butcher_Models); i++)
  124.         precache_model(Butcher_Models[i])
  125.  
  126.     for (i = 0; i <= charsmax(Doom_Models); i++)
  127.         precache_model(Doom_Models[i])
  128.  
  129.     for (i = 0; i <= charsmax(Fleshpound_Models); i++)
  130.         precache_model(Fleshpound_Models[i])
  131.  
  132.     for (i = 0; i <= charsmax(Jumper_Models); i++)
  133.         precache_model(Jumper_Models[i])
  134.  
  135.     for (i = 0; i <= charsmax(Mon_Assassin_Models); i++)
  136.         precache_model(Mon_Assassin_Models[i])
  137.  
  138.     for (i = 0; i <= charsmax(Mon_Zom_Models); i++)
  139.         precache_model(Mon_Zom_Models[i])
  140.  
  141.     for (i = 0; i <= charsmax(Abaddon_Models); i++)
  142.         precache_model(Abaddon_Models[i])
  143.  
  144.     for (i = 0; i <= charsmax(Assassin_Zom_Models); i++)
  145.         precache_model(Assassin_Zom_Models[i])
  146.  
  147.     for (i = 0; i <= charsmax(Deimosboss_Models); i++)
  148.         precache_model(Deimosboss_Models[i])
  149.  
  150.     for (i = 0; i <= charsmax(Lockerz_Models); i++)
  151.         precache_model(Lockerz_Models[i])
  152.  
  153.     for (i = 0; i <= charsmax(Mon_Nemesis_Models); i++)
  154.         precache_model(Mon_Nemesis_Models[i])
  155.  
  156.     for (i = 0; i <= charsmax(NightCrawler_Models); i++)
  157.         precache_model(NightCrawler_Models[i])
  158.        
  159.     for (i = 0; i <= charsmax(NightRider_Models); i++)
  160.         precache_model(NightRider_Models[i])
  161.  
  162.     for (i = 0; i <= charsmax(Poison_Models); i++)
  163.         precache_model(Poison_Models[i])
  164.  
  165.     for (i = 0; i <= charsmax(Predator_Models); i++)
  166.         precache_model(Predator_Models[i])
  167.  
  168.     for (i = 0; i <= charsmax(Raptor_Models); i++)
  169.         precache_model(Raptor_Models[i])
  170.  
  171.     for (i = 0; i <= charsmax(RealBoss_Models); i++)
  172.         precache_model(RealBoss_Models[i])
  173.  
  174.     for (i = 0; i <= charsmax(Replican_Models); i++)
  175.         precache_model(Replican_Models[i])
  176.        
  177.     for (i = 0; i <= charsmax(Terminator_Models); i++)
  178.         precache_model(Terminator_Models[i])
  179. }
  180.  
  181. public plugin_init()
  182. {
  183.     register_plugin(PLUGIN, VERSION, AUTHOR)
  184.     g_pCvarUseTimes = register_cvar("ze_hskin_menu_used", "1")
  185. }
  186.  
  187. public ze_user_infected_pre(id)
  188. {
  189.     if (g_bButcher[id])
  190.     {
  191.         rg_set_user_model(id, "butcher_zom")
  192.     }
  193.     else if (g_bDoom[id])
  194.     {
  195.         rg_set_user_model(id, "doom_zom")
  196.     }
  197.     else if (g_bFleshpound[id])
  198.     {
  199.         rg_set_user_model(id, "fleshpound_zom")
  200.     }
  201.     else if (g_bJumper[id])
  202.     {
  203.         rg_set_user_model(id, "jumper_zom")
  204.     }
  205.     else if (g_bMon_Assassin[id])
  206.     {
  207.         rg_set_user_model(id, "monster_assassin_zom")
  208.     }
  209.     else if (g_bMon_Zom[id])
  210.     {
  211.         rg_set_user_model(id, "monster_zom")
  212.     }
  213.     else if (g_bAbaddon[id])
  214.     {
  215.         rg_set_user_model(id, "abaddon_zom")
  216.     }
  217.     else if (g_bAssassin_Zom[id])
  218.     {
  219.         rg_set_user_model(id, "assassin_zom")
  220.     }
  221.     else if (g_bDeimosboss[id])
  222.     {
  223.         rg_set_user_model(id, "deimosboss_zom")
  224.     }
  225.     else if (g_bLockerz[id])
  226.     {
  227.         rg_set_user_model(id, "lockerz_zom")
  228.     }
  229.     else if (g_bMon_Nemesis[id])
  230.     {
  231.         rg_set_user_model(id, "monster_nemesis_zom")
  232.     }
  233.     else if (g_bNightCrawler[id])
  234.     {
  235.         rg_set_user_model(id, "nightcrawler_zom")
  236.     }
  237.     else if (g_bNightRider[id])
  238.     {
  239.         rg_set_user_model(id, "nightrider_zom")
  240.     }
  241.     else if (g_bPoison[id])
  242.     {
  243.         rg_set_user_model(id, "poison_nshaman_zom")
  244.     }
  245.     else if (g_bPredator[id])
  246.     {
  247.         rg_set_user_model(id, "predator_zom")
  248.     }
  249.     else if (g_bRaptor[id])
  250.     {
  251.         rg_set_user_model(id, "raptor_zom")
  252.     }
  253.     else if (g_bRealBoss[id])
  254.     {
  255.         rg_set_user_model(id, "realboss_zom")
  256.     }
  257.     else if (g_bReplican[id])
  258.     {
  259.         rg_set_user_model(id, "replican_fear_zom")
  260.     }
  261.     else if (g_bTerminator[id])
  262.     {
  263.         rg_set_user_model(id, "terminator_zom")
  264.     }
  265.    
  266.     g_iUsedTimes[id] = 0
  267. }
  268.  
  269. public ze_user_infected(Victim)
  270. {
  271.     g_iUsedTimes[Victim] = 0
  272. }
  273.  
  274. public client_putinserver(id)
  275. {
  276.     g_bButcher[id] = false
  277.     g_bDoom[id] = false
  278.     g_bFleshpound[id] = false
  279.     g_bJumper[id] = false
  280.     g_bMon_Assassin[id] = false
  281.     g_bMon_Zom[id] = false
  282.     g_bAbaddon[id] = false
  283.     g_bAssassin_Zom[id] = false
  284.     g_bDeimosboss[id] = false
  285.     g_bLockerz[id] = false
  286.     g_bMon_Nemesis[id] = false
  287.     g_bNightCrawler[id] = false
  288.     g_bNightRider[id] = false
  289.     g_bPoison[id] = false
  290.     g_bPredator[id] = false
  291.     g_bRaptor[id] = false
  292.     g_bRealBoss[id] = false
  293.     g_bReplican[id] = false
  294.     g_bTerminator[id] = false
  295.     g_iUsedTimes[id] = 0
  296. }
  297.  
  298. public client_disconnected(id)
  299. {
  300.     g_bButcher[id] = false
  301.     g_bDoom[id] = false
  302.     g_bFleshpound[id] = false
  303.     g_bJumper[id] = false
  304.     g_bMon_Assassin[id] = false
  305.     g_bMon_Zom[id] = false
  306.     g_bAbaddon[id] = false
  307.     g_bAssassin_Zom[id] = false
  308.     g_bDeimosboss[id] = false
  309.     g_bLockerz[id] = false
  310.     g_bMon_Nemesis[id] = false
  311.     g_bNightCrawler[id] = false
  312.     g_bNightRider[id] = false
  313.     g_bPoison[id] = false
  314.     g_bPredator[id] = false
  315.     g_bRaptor[id] = false
  316.     g_bRealBoss[id] = false
  317.     g_bReplican[id] = false
  318.     g_bTerminator[id] = false
  319.     g_iUsedTimes[id] = 0
  320. }
  321.  
  322. public Show_Zmodel_Menu(id)
  323. {
  324.     if (!is_user_connected(id))
  325.     {
  326.         return PLUGIN_CONTINUE
  327.     }
  328.  
  329.     if (!ze_is_user_zombie(id))
  330.     {
  331.         ze_colored_print(id, "!tYou can't change your zombie skin while Human!y.")
  332.         return PLUGIN_HANDLED
  333.     }
  334.  
  335.     if (g_iUsedTimes[id] >= get_pcvar_num(g_pCvarUseTimes))
  336.     {
  337.         ze_colored_print(id, "!tMaximum have been reached !y[!g%d!y]!", get_pcvar_num(g_pCvarUseTimes))
  338.         return PLUGIN_HANDLED
  339.     }
  340.  
  341.     if (!is_user_alive(id))
  342.     {
  343.         ze_colored_print(id, "!tDead can't open menu!y.")
  344.         return PLUGIN_HANDLED
  345.     }
  346.  
  347.     Zmodel_Menu(id)
  348.     return PLUGIN_CONTINUE
  349. }
  350.  
  351. public Zmodel_Menu(id)
  352. {
  353.     new zmenu = menu_create("\r[\wZombie Models\r]\r", "menu_zskins")
  354.     menu_additem(zmenu, "\wButcher", "", 0)
  355.     menu_additem(zmenu, "\wDoom", "", 0)
  356.     menu_additem(zmenu, "\wFleshpound", "", 0)
  357.     menu_additem(zmenu, "\wJumper", "", 0)
  358.  
  359.     if (ze_get_vip_flags(id) & VIP_A)
  360.     {
  361.         menu_additem(zmenu, "\wMonster Assassin\r[VIP]", "", 0)
  362.         menu_additem(zmenu, "\wMonster\r[VIP]", "", 0)
  363.         menu_additem(zmenu, "\wAbaddon\r[VIP]", "", 0)
  364.         menu_additem(zmenu, "\wAssassin\r[VIP]", "", 0)
  365.     }
  366.  
  367.     if (ze_get_vip_flags(id) & VIP_D)
  368.     {
  369.         menu_additem(zmenu, "\wDeimosboss \r[VIP+]", "", 0)
  370.         menu_additem(zmenu, "\wLockerz \r[VIP+]", "", 0)
  371.         menu_additem(zmenu, "\wMonster Nemesis \r[VIP+]", "", 0)
  372.         menu_additem(zmenu, "\wNight Crawler \r[VIP+]", "", 0)
  373.         menu_additem(zmenu, "\wNight Rider \r[VIP+]", "", 0)
  374.     }
  375.  
  376.     if (ze_get_vip_flags(id) & VIP_E)
  377.     {
  378.         menu_additem(zmenu, "\wPoison \r[VIP++]", "", 0)
  379.         menu_additem(zmenu, "\wPredator \r[VIP++]", "", 0)
  380.         menu_additem(zmenu, "\wRaptor \r[VIP++]", "", 0)
  381.         menu_additem(zmenu, "\wRealBoss \r[VIP++]", "", 0)
  382.         menu_additem(zmenu, "\wReplican \r[VIP++]", "", 0)
  383.         menu_additem(zmenu, "\wTerminator \r[VIP++]", "", 0)
  384.     }
  385.  
  386.     menu_setprop(zmenu, MPROP_EXIT, MEXIT_ALL)
  387.     menu_display(id, zmenu, 0)
  388. }
  389.  
  390. public menu_zskins(id, zmenu, item)
  391. {
  392.     if(!is_user_alive(id) || !ze_is_user_zombie(id))
  393.         return PLUGIN_HANDLED
  394.  
  395.     switch(item)
  396.     {
  397.         case 0 : // Butcher
  398.         {
  399.             g_bButcher[id] = true
  400.             g_bDoom[id] = false
  401.             g_bFleshpound[id] = false
  402.             g_bJumper[id] = false
  403.             g_bMon_Assassin[id] = false
  404.             g_bMon_Zom[id] = false
  405.             g_bAbaddon[id] = false
  406.             g_bAssassin_Zom[id] = false
  407.             g_bDeimosboss[id] = false
  408.             g_bLockerz[id] = false
  409.             g_bMon_Nemesis[id] = false
  410.             g_bNightCrawler[id] = false
  411.             g_bNightRider[id] = false
  412.             g_bPoison[id] = false
  413.             g_bPredator[id] = false
  414.             g_bRaptor[id] = false
  415.             g_bRealBoss[id] = false
  416.             g_bReplican[id] = false
  417.             g_bTerminator[id] = false
  418.             rg_set_user_model(id, "butcher_zom")
  419.             ze_colored_print(id, "You picked the Butcher skin", id)
  420.             g_iUsedTimes[id]++
  421.         }
  422.         case 1 : // Doom
  423.         {
  424.             g_bButcher[id] = false
  425.             g_bDoom[id] = true
  426.             g_bFleshpound[id] = false
  427.             g_bJumper[id] = false
  428.             g_bMon_Assassin[id] = false
  429.             g_bMon_Zom[id] = false
  430.             g_bAbaddon[id] = false
  431.             g_bAssassin_Zom[id] = false
  432.             g_bDeimosboss[id] = false
  433.             g_bLockerz[id] = false
  434.             g_bMon_Nemesis[id] = false
  435.             g_bNightCrawler[id] = false
  436.             g_bNightRider[id] = false
  437.             g_bPoison[id] = false
  438.             g_bPredator[id] = false
  439.             g_bRaptor[id] = false
  440.             g_bRealBoss[id] = false
  441.             g_bReplican[id] = false
  442.             g_bTerminator[id] = false
  443.             rg_set_user_model(id, "doom_zom")
  444.             ze_colored_print(id, "You picked the Doom skin", id)
  445.             g_iUsedTimes[id]++
  446.         }
  447.         case 2 : // Fleshpound
  448.         {
  449.             g_bButcher[id] = false
  450.             g_bDoom[id] = false
  451.             g_bFleshpound[id] = true
  452.             g_bJumper[id] = false
  453.             g_bMon_Assassin[id] = false
  454.             g_bMon_Zom[id] = false
  455.             g_bAbaddon[id] = false
  456.             g_bAssassin_Zom[id] = false
  457.             g_bDeimosboss[id] = false
  458.             g_bLockerz[id] = false
  459.             g_bMon_Nemesis[id] = false
  460.             g_bNightCrawler[id] = false
  461.             g_bNightRider[id] = false
  462.             g_bPoison[id] = false
  463.             g_bPredator[id] = false
  464.             g_bRaptor[id] = false
  465.             g_bRealBoss[id] = false
  466.             g_bReplican[id] = false
  467.             g_bTerminator[id] = false
  468.             rg_set_user_model(id, "fleshpound_zom")
  469.             ze_colored_print(id, "You picked the Fleshpound skin", id)
  470.             g_iUsedTimes[id]++
  471.         }
  472.         case 3 : // Jumper
  473.         {
  474.             g_bButcher[id] = false
  475.             g_bDoom[id] = false
  476.             g_bFleshpound[id] = false
  477.             g_bJumper[id] = true
  478.             g_bMon_Assassin[id] = false
  479.             g_bMon_Zom[id] = false
  480.             g_bAbaddon[id] = false
  481.             g_bAssassin_Zom[id] = false
  482.             g_bDeimosboss[id] = false
  483.             g_bLockerz[id] = false
  484.             g_bMon_Nemesis[id] = false
  485.             g_bNightCrawler[id] = false
  486.             g_bNightRider[id] = false
  487.             g_bPoison[id] = false
  488.             g_bPredator[id] = false
  489.             g_bRaptor[id] = false
  490.             g_bRealBoss[id] = false
  491.             g_bReplican[id] = false
  492.             g_bTerminator[id] = false
  493.             rg_set_user_model(id, "jumper_zom")
  494.             ze_colored_print(id, "You picked the Jumper skin", id)
  495.             g_iUsedTimes[id]++
  496.         }
  497.         case 4 : // Mon_Assassin
  498.         {
  499.             if (ze_get_vip_flags(id) & VIP_A)
  500.             {
  501.                 g_bButcher[id] = false
  502.                 g_bDoom[id] = false
  503.                 g_bFleshpound[id] = false
  504.                 g_bJumper[id] = false
  505.                 g_bMon_Assassin[id] = true
  506.                 g_bMon_Zom[id] = false
  507.                 g_bAbaddon[id] = false
  508.                 g_bAssassin_Zom[id] = false
  509.                 g_bDeimosboss[id] = false
  510.                 g_bLockerz[id] = false
  511.                 g_bMon_Nemesis[id] = false
  512.                 g_bNightCrawler[id] = false
  513.                 g_bNightRider[id] = false
  514.                 g_bPoison[id] = false
  515.                 g_bPredator[id] = false
  516.                 g_bRaptor[id] = false
  517.                 g_bRealBoss[id] = false
  518.                 g_bReplican[id] = false
  519.                 g_bTerminator[id] = false
  520.                 rg_set_user_model(id, "Mon_Assassin_zom")
  521.                 ze_colored_print(id, "You picked the Monster Assassin skin", id)
  522.                 g_iUsedTimes[id]++
  523.             }
  524.         }
  525.         case 5 : // Mon_Zom
  526.         {
  527.             if (ze_get_vip_flags(id) & VIP_A)
  528.             {
  529.                 g_bButcher[id] = false
  530.                 g_bDoom[id] = false
  531.                 g_bFleshpound[id] = false
  532.                 g_bJumper[id] = false
  533.                 g_bMon_Assassin[id] = false
  534.                 g_bMon_Zom[id] = true
  535.                 g_bAbaddon[id] = false
  536.                 g_bAssassin_Zom[id] = false
  537.                 g_bDeimosboss[id] = false
  538.                 g_bLockerz[id] = false
  539.                 g_bMon_Nemesis[id] = false
  540.                 g_bNightCrawler[id] = false
  541.                 g_bNightRider[id] = false
  542.                 g_bPoison[id] = false
  543.                 g_bPredator[id] = false
  544.                 g_bRaptor[id] = false
  545.                 g_bRealBoss[id] = false
  546.                 g_bReplican[id] = false
  547.                 g_bTerminator[id] = false
  548.                 rg_set_user_model(id, "monster_zom")
  549.                 ze_colored_print(id, "You picked the Monster skin", id)
  550.                 g_iUsedTimes[id]++
  551.             }
  552.         }
  553.         case 6 : // Abaddon
  554.         {
  555.             if (ze_get_vip_flags(id) & VIP_A)
  556.             {
  557.                 g_bButcher[id] = false
  558.                 g_bDoom[id] = false
  559.                 g_bFleshpound[id] = false
  560.                 g_bJumper[id] = false
  561.                 g_bMon_Assassin[id] = false
  562.                 g_bMon_Zom[id] = false
  563.                 g_bAbaddon[id] = true
  564.                 g_bAssassin_Zom[id] = false
  565.                 g_bDeimosboss[id] = false
  566.                 g_bLockerz[id] = false
  567.                 g_bMon_Nemesis[id] = false
  568.                 g_bNightCrawler[id] = false
  569.                 g_bNightRider[id] = false
  570.                 g_bPoison[id] = false
  571.                 g_bPredator[id] = false
  572.                 g_bRaptor[id] = false
  573.                 g_bRealBoss[id] = false
  574.                 g_bReplican[id] = false
  575.                 g_bTerminator[id] = false
  576.                 rg_set_user_model(id, "abaddon_zom")
  577.                 ze_colored_print(id, "You picked the Abaddon skin", id)
  578.                 g_iUsedTimes[id]++
  579.             }
  580.         }
  581.         case 7 : // Assassin_Zom
  582.         {
  583.             if (ze_get_vip_flags(id) & VIP_A)
  584.             {
  585.                 g_bButcher[id] = false
  586.                 g_bDoom[id] = false
  587.                 g_bFleshpound[id] = false
  588.                 g_bJumper[id] = false
  589.                 g_bMon_Assassin[id] = false
  590.                 g_bMon_Zom[id] = false
  591.                 g_bAbaddon[id] = false
  592.                 g_bAssassin_Zom[id] = true
  593.                 g_bDeimosboss[id] = false
  594.                 g_bLockerz[id] = false
  595.                 g_bMon_Nemesis[id] = false
  596.                 g_bNightCrawler[id] = false
  597.                 g_bNightRider[id] = false
  598.                 g_bPoison[id] = false
  599.                 g_bPredator[id] = false
  600.                 g_bRaptor[id] = false
  601.                 g_bRealBoss[id] = false
  602.                 g_bReplican[id] = false
  603.                 g_bTerminator[id] = false
  604.                 rg_set_user_model(id, "assassin_zom")
  605.                 ze_colored_print(id, "You picked the Assassin skin", id)
  606.                 g_iUsedTimes[id]++
  607.             }
  608.         }
  609.         case 8 : // Deimosboss
  610.         {      
  611.             if (ze_get_vip_flags(id) & VIP_D)
  612.             {
  613.                 g_bButcher[id] = false
  614.                 g_bDoom[id] = false
  615.                 g_bFleshpound[id] = false
  616.                 g_bJumper[id] = false
  617.                 g_bMon_Assassin[id] = false
  618.                 g_bMon_Zom[id] = false
  619.                 g_bAbaddon[id] = false
  620.                 g_bAssassin_Zom[id] = false
  621.                 g_bDeimosboss[id] = true
  622.                 g_bLockerz[id] = false
  623.                 g_bMon_Nemesis[id] = false
  624.                 g_bNightCrawler[id] = false
  625.                 g_bNightRider[id] = false
  626.                 g_bPoison[id] = false
  627.                 g_bPredator[id] = false
  628.                 g_bRaptor[id] = false
  629.                 g_bRealBoss[id] = false
  630.                 g_bReplican[id] = false
  631.                 g_bTerminator[id] = false
  632.                 rg_set_user_model(id, "deimosboss_zom")
  633.                 ze_colored_print(id, "You picked the Deimosboss skin", id)
  634.                 g_iUsedTimes[id]++
  635.             }            
  636.         }
  637.         case 9 : // Lockerz
  638.         {
  639.             if (ze_get_vip_flags(id) & VIP_D)
  640.             {
  641.                 g_bButcher[id] = false
  642.                 g_bDoom[id] = false
  643.                 g_bFleshpound[id] = false
  644.                 g_bJumper[id] = false
  645.                 g_bMon_Assassin[id] = false
  646.                 g_bMon_Zom[id] = false
  647.                 g_bAbaddon[id] = false
  648.                 g_bAssassin_Zom[id] = false
  649.                 g_bDeimosboss[id] = false
  650.                 g_bLockerz[id] = true
  651.                 g_bMon_Nemesis[id] = false
  652.                 g_bNightCrawler[id] = false
  653.                 g_bNightRider[id] = false
  654.                 g_bPoison[id] = false
  655.                 g_bPredator[id] = false
  656.                 g_bRaptor[id] = false
  657.                 g_bRealBoss[id] = false
  658.                 g_bReplican[id] = false
  659.                 g_bTerminator[id] = false
  660.                 rg_set_user_model(id, "lockerz_zom")
  661.                 ze_colored_print(id, "You picked the Lockerz skin", id)
  662.                 g_iUsedTimes[id]++
  663.             }              
  664.         }
  665.         case 10 : // Monster Nemesis
  666.         {
  667.             if (ze_get_vip_flags(id) & VIP_D)
  668.             {
  669.                 g_bButcher[id] = false
  670.                 g_bDoom[id] = false
  671.                 g_bFleshpound[id] = false
  672.                 g_bJumper[id] = false
  673.                 g_bMon_Assassin[id] = false
  674.                 g_bMon_Zom[id] = false
  675.                 g_bAbaddon[id] = false
  676.                 g_bAssassin_Zom[id] = false
  677.                 g_bDeimosboss[id] = false
  678.                 g_bLockerz[id] = false
  679.                 g_bMon_Nemesis[id] = true
  680.                 g_bNightCrawler[id] = false
  681.                 g_bNightRider[id] = false
  682.                 g_bPoison[id] = false
  683.                 g_bPredator[id] = false
  684.                 g_bRaptor[id] = false
  685.                 g_bRealBoss[id] = false
  686.                 g_bReplican[id] = false
  687.                 g_bTerminator[id] = false
  688.                 rg_set_user_model(id, "monster_nemesis_zom")
  689.                 ze_colored_print(id, "You picked the Monster Nemesis skin", id)
  690.                 g_iUsedTimes[id]++
  691.             }            
  692.         }
  693.         case 11 : // Night Crawler
  694.         {
  695.             if (ze_get_vip_flags(id) & VIP_D)
  696.             {
  697.                 g_bButcher[id] = false
  698.                 g_bDoom[id] = false
  699.                 g_bFleshpound[id] = false
  700.                 g_bJumper[id] = false
  701.                 g_bMon_Assassin[id] = false
  702.                 g_bMon_Zom[id] = false
  703.                 g_bAbaddon[id] = false
  704.                 g_bAssassin_Zom[id] = false
  705.                 g_bDeimosboss[id] = false
  706.                 g_bLockerz[id] = false
  707.                 g_bMon_Nemesis[id] = false
  708.                 g_bNightCrawler[id] = true
  709.                 g_bNightRider[id] = false
  710.                 g_bPoison[id] = false
  711.                 g_bPredator[id] = false
  712.                 g_bRaptor[id] = false
  713.                 g_bRealBoss[id] = false
  714.                 g_bReplican[id] = false
  715.                 g_bTerminator[id] = false
  716.                 rg_set_user_model(id, "nightcrawler_zom")
  717.                 ze_colored_print(id, "You picked the NightCrawler skin", id)
  718.                 g_iUsedTimes[id]++
  719.             }                      
  720.         }
  721.         case 12 : //NightRider
  722.         {
  723.             if (ze_get_vip_flags(id) & VIP_D)
  724.             {
  725.                 g_bButcher[id] = false
  726.                 g_bDoom[id] = false
  727.                 g_bFleshpound[id] = false
  728.                 g_bJumper[id] = false
  729.                 g_bMon_Assassin[id] = false
  730.                 g_bMon_Zom[id] = false
  731.                 g_bAbaddon[id] = false
  732.                 g_bAssassin_Zom[id] = false
  733.                 g_bDeimosboss[id] = false
  734.                 g_bLockerz[id] = false
  735.                 g_bMon_Nemesis[id] = false
  736.                 g_bNightCrawler[id] = false
  737.                 g_bNightRider[id] = true
  738.                 g_bPoison[id] = false
  739.                 g_bPredator[id] = false
  740.                 g_bRaptor[id] = false
  741.                 g_bRealBoss[id] = false
  742.                 g_bReplican[id] = false
  743.                 g_bTerminator[id] = false
  744.                 rg_set_user_model(id, "nightrider_zom")
  745.                 ze_colored_print(id, "You picked the NightRider skin", id)
  746.                 g_iUsedTimes[id]++
  747.             }              
  748.         }
  749.         case 13 : // Poison
  750.         {
  751.             if (ze_get_vip_flags(id) & VIP_E)
  752.             {
  753.                 g_bButcher[id] = false
  754.                 g_bDoom[id] = false
  755.                 g_bFleshpound[id] = false
  756.                 g_bJumper[id] = false
  757.                 g_bMon_Assassin[id] = false
  758.                 g_bMon_Zom[id] = false
  759.                 g_bAbaddon[id] = false
  760.                 g_bAssassin_Zom[id] = false
  761.                 g_bDeimosboss[id] = false
  762.                 g_bLockerz[id] = false
  763.                 g_bMon_Nemesis[id] = false
  764.                 g_bNightCrawler[id] = false
  765.                 g_bNightRider[id] = false
  766.                 g_bPoison[id] = true
  767.                 g_bPredator[id] = false
  768.                 g_bRaptor[id] = false
  769.                 g_bRealBoss[id] = false
  770.                 g_bReplican[id] = false
  771.                 g_bTerminator[id] = false
  772.                 rg_set_user_model(id, "poison_nshaman_zom")
  773.                 ze_colored_print(id, "You picked the Poison skin", id)
  774.                 g_iUsedTimes[id]++
  775.             }      
  776.         }
  777.         case 14 : // Predator
  778.         {
  779.             if (ze_get_vip_flags(id) & VIP_E)
  780.             {
  781.                 g_bButcher[id] = false
  782.                 g_bDoom[id] = false
  783.                 g_bFleshpound[id] = false
  784.                 g_bJumper[id] = false
  785.                 g_bMon_Assassin[id] = false
  786.                 g_bMon_Zom[id] = false
  787.                 g_bAbaddon[id] = false
  788.                 g_bAssassin_Zom[id] = false
  789.                 g_bDeimosboss[id] = false
  790.                 g_bLockerz[id] = false
  791.                 g_bMon_Nemesis[id] = false
  792.                 g_bNightCrawler[id] = false
  793.                 g_bNightRider[id] = false
  794.                 g_bPoison[id] = false
  795.                 g_bPredator[id] = true
  796.                 g_bRaptor[id] = false
  797.                 g_bRealBoss[id] = false
  798.                 g_bReplican[id] = false
  799.                 g_bTerminator[id] = false
  800.                 rg_set_user_model(id, "predator_zom")
  801.                 ze_colored_print(id, "You picked the Predator skin", id)
  802.                 g_iUsedTimes[id]++
  803.             }            
  804.         }
  805.         case 15 : // Raptor
  806.         {
  807.             if (ze_get_vip_flags(id) & VIP_E)
  808.             {
  809.                 g_bButcher[id] = false
  810.                 g_bDoom[id] = false
  811.                 g_bFleshpound[id] = false
  812.                 g_bJumper[id] = false
  813.                 g_bMon_Assassin[id] = false
  814.                 g_bMon_Zom[id] = false
  815.                 g_bAbaddon[id] = false
  816.                 g_bAssassin_Zom[id] = false
  817.                 g_bDeimosboss[id] = false
  818.                 g_bLockerz[id] = false
  819.                 g_bMon_Nemesis[id] = false
  820.                 g_bNightCrawler[id] = false
  821.                 g_bNightRider[id] = false
  822.                 g_bPoison[id] = false
  823.                 g_bPredator[id] = false
  824.                 g_bRaptor[id] = true
  825.                 g_bRealBoss[id] = false
  826.                 g_bReplican[id] = false
  827.                 g_bTerminator[id] = false
  828.                 rg_set_user_model(id, "raptor_zom")
  829.                 ze_colored_print(id, "You picked the Raptor skin", id)
  830.                 g_iUsedTimes[id]++
  831.             }              
  832.         }
  833.         case 16 : // RealBoss
  834.         {
  835.             if (ze_get_vip_flags(id) & VIP_E)
  836.             {
  837.                 g_bButcher[id] = false
  838.                 g_bDoom[id] = false
  839.                 g_bFleshpound[id] = false
  840.                 g_bJumper[id] = false
  841.                 g_bMon_Assassin[id] = false
  842.                 g_bMon_Zom[id] = false
  843.                 g_bAbaddon[id] = false
  844.                 g_bAssassin_Zom[id] = false
  845.                 g_bDeimosboss[id] = false
  846.                 g_bLockerz[id] = false
  847.                 g_bMon_Nemesis[id] = false
  848.                 g_bNightCrawler[id] = false
  849.                 g_bNightRider[id] = false
  850.                 g_bPoison[id] = false
  851.                 g_bPredator[id] = false
  852.                 g_bRaptor[id] = false
  853.                 g_bRealBoss[id] = true
  854.                 g_bReplican[id] = false
  855.                 g_bTerminator[id] = false
  856.                 rg_set_user_model(id, "realboss_zom")
  857.                 ze_colored_print(id, "You picked the RealBoss skin", id)
  858.                 g_iUsedTimes[id]++
  859.             }          
  860.         }
  861.         case 17 : // Replican
  862.         {
  863.             if (ze_get_vip_flags(id) & VIP_E)
  864.             {
  865.                 g_bButcher[id] = false
  866.                 g_bDoom[id] = false
  867.                 g_bFleshpound[id] = false
  868.                 g_bJumper[id] = false
  869.                 g_bMon_Assassin[id] = false
  870.                 g_bMon_Zom[id] = false
  871.                 g_bAbaddon[id] = false
  872.                 g_bAssassin_Zom[id] = false
  873.                 g_bDeimosboss[id] = false
  874.                 g_bLockerz[id] = false
  875.                 g_bMon_Nemesis[id] = false
  876.                 g_bNightCrawler[id] = false
  877.                 g_bNightRider[id] = false
  878.                 g_bPoison[id] = false
  879.                 g_bPredator[id] = false
  880.                 g_bRaptor[id] = false
  881.                 g_bRealBoss[id] = false
  882.                 g_bReplican[id] = true
  883.                 g_bTerminator[id] = false
  884.                 rg_set_user_model(id, "replican_fear_zom")
  885.                 ze_colored_print(id, "You picked the Replican skin", id)
  886.                 g_iUsedTimes[id]++
  887.             }            
  888.         }
  889.         case 18 : // Terminator
  890.         {
  891.             if (ze_get_vip_flags(id) & VIP_E)
  892.             {
  893.                 g_bButcher[id] = false
  894.                 g_bDoom[id] = false
  895.                 g_bFleshpound[id] = false
  896.                 g_bJumper[id] = false
  897.                 g_bMon_Assassin[id] = false
  898.                 g_bMon_Zom[id] = false
  899.                 g_bAbaddon[id] = false
  900.                 g_bAssassin_Zom[id] = false
  901.                 g_bDeimosboss[id] = false
  902.                 g_bLockerz[id] = false
  903.                 g_bMon_Nemesis[id] = false
  904.                 g_bNightCrawler[id] = false
  905.                 g_bNightRider[id] = false
  906.                 g_bPoison[id] = false
  907.                 g_bPredator[id] = false
  908.                 g_bRaptor[id] = false
  909.                 g_bRealBoss[id] = false
  910.                 g_bReplican[id] = false
  911.                 g_bTerminator[id] = true
  912.                 rg_set_user_model(id, "terminator_zom")
  913.                 ze_colored_print(id, "You picked the Terminator skin", id)
  914.                 g_iUsedTimes[id]++
  915.             }            
  916.         }
  917.  
  918.     }    
  919.     menu_destroy(zmenu)
  920.     return PLUGIN_HANDLED
  921. }
  922.  
  923. public native_ze_open_zskin_menu(id)
  924. {
  925.     Show_Zmodel_Menu(id)
  926. }

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1791
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 88 times
Age: 21
Contact:

#16

Post by Raheem » 9 Months Ago

For zombies you will need to set the players models whenever they infected.

We have two cases if they got infection from server---> First players choosen by server to be zombie i mean.
Another is if player infect another player.

You did it right except you are using user infected pre, which wrong as you set the models in pre and it's overriden in post. So what you should do is:
  • Code: Select all

    #include <zombie_escape>
    #include <ze_vip>
     
     
    #define PLUGIN "Custom zModel Menu"
    #define VERSION "1.0"
    #define AUTHOR "Mark"
     
    new const Butcher_Models[][] =
    {
        "models/player/butcher_zom/butcher_zom.mdl"
    }
     
    new const Doom_Models[][] =
    {
        "models/player/doom_zom/doom_zom.mdl"
    }
     
    new const Fleshpound_Models[][] =
    {
        "models/player/fleshpound_zom/fleshpound_zom.mdl"
    }
     
    new const Jumper_Models[][] =
    {
        "models/player/jumper_zom/jumper_zom.mdl"
    }
     
    new const Mon_Assassin_Models[][] =
    {
        "models/player/monster_assassin_zom/monster_assassin_zom.mdl"
    }
     
    new const Mon_Zom_Models[][] =
    {
        "models/player/monster_zom/monster_zom.mdl"
    }
     
    new const Abaddon_Models[][] =
    {
        "models/player/abaddon_zom/abaddon_zom.mdl"
    }
     
    new const Assassin_Zom_Models[][] =
    {
        "models/player/assassin_zom/assassin_zom.mdl"
    }
     
    new const Deimosboss_Models[][] =
    {
        "models/player/deimosboss_zom/deimosboss_zom.mdl"
    }
     
    new const Lockerz_Models[][] =
    {
        "models/player/lockerz_zom/lockerz_zom.mdl"
    }
     
    new const Mon_Nemesis_Models[][] =
    {
        "models/player/monster_nemesis_zom/monster_nemesis_zom.mdl"
    }
     
    new const NightCrawler_Models[][] =
    {
        "models/player/nightcrawler_zom/nightcrawler_zom.mdl"
    }
     
    new const NightRider_Models[][] =
    {
        "models/player/nightrider_zom/nightrider_zom.mdl"
    }
     
    new const Poison_Models[][] =
    {
        "models/player/poison_nshaman_zom/poison_nshaman_zom.mdl"
    }
     
    new const Predator_Models[][] =
    {
        "models/player/predator_zom/predator_zom.mdl"
    }
     
    new const Raptor_Models[][] =
    {
        "models/player/raptor_zom/raptor_zom.mdl"
    }
     
    new const RealBoss_Models[][] =
    {
        "models/player/realboss_zom/realboss_zom.mdl"
    }
     
    new const Replican_Models[][] =
    {
        "models/player/replican_fear_zom/replican_fear_zom.mdl"
    }
     
    new const Terminator_Models[][] =
    {
        "models/player/terminator_zom/terminator_zom.mdl"
    }
     
    new g_pCvarUseTimes
    new g_iUsedTimes[33]
     
    new bool:g_bButcher[33], bool:g_bDoom[33], bool:g_bFleshpound[33], bool:g_bJumper[33],
    bool:g_bMon_Assassin[33], bool:g_bMon_Zom[33], bool:g_bAbaddon[33], bool:g_bAssassin_Zom[33],
    bool:g_bDeimosboss[33], bool:g_bLockerz[33], bool:g_bMon_Nemesis[33], bool:g_bNightCrawler[33],
    bool:g_bNightRider[33], bool:g_bPoison[33],bool:g_bPredator[33], bool:g_bRaptor[33], bool:g_bRealBoss[33],
    bool:g_bReplican[33], bool:g_bTerminator[33]
     
     
    public plugin_natives()
    {
        register_native("ze_open_zskin_menu", "native_ze_open_zskin_menu", 1)
    }
     
    public plugin_precache()
    {
        new i
     
        for (i = 0; i <= charsmax(Butcher_Models); i++)
            precache_model(Butcher_Models[i])
     
        for (i = 0; i <= charsmax(Doom_Models); i++)
            precache_model(Doom_Models[i])
     
        for (i = 0; i <= charsmax(Fleshpound_Models); i++)
            precache_model(Fleshpound_Models[i])
     
        for (i = 0; i <= charsmax(Jumper_Models); i++)
            precache_model(Jumper_Models[i])
     
        for (i = 0; i <= charsmax(Mon_Assassin_Models); i++)
            precache_model(Mon_Assassin_Models[i])
     
        for (i = 0; i <= charsmax(Mon_Zom_Models); i++)
            precache_model(Mon_Zom_Models[i])
     
        for (i = 0; i <= charsmax(Abaddon_Models); i++)
            precache_model(Abaddon_Models[i])
     
        for (i = 0; i <= charsmax(Assassin_Zom_Models); i++)
            precache_model(Assassin_Zom_Models[i])
     
        for (i = 0; i <= charsmax(Deimosboss_Models); i++)
            precache_model(Deimosboss_Models[i])
     
        for (i = 0; i <= charsmax(Lockerz_Models); i++)
            precache_model(Lockerz_Models[i])
     
        for (i = 0; i <= charsmax(Mon_Nemesis_Models); i++)
            precache_model(Mon_Nemesis_Models[i])
     
        for (i = 0; i <= charsmax(NightCrawler_Models); i++)
            precache_model(NightCrawler_Models[i])
           
        for (i = 0; i <= charsmax(NightRider_Models); i++)
            precache_model(NightRider_Models[i])
     
        for (i = 0; i <= charsmax(Poison_Models); i++)
            precache_model(Poison_Models[i])
     
        for (i = 0; i <= charsmax(Predator_Models); i++)
            precache_model(Predator_Models[i])
     
        for (i = 0; i <= charsmax(Raptor_Models); i++)
            precache_model(Raptor_Models[i])
     
        for (i = 0; i <= charsmax(RealBoss_Models); i++)
            precache_model(RealBoss_Models[i])
     
        for (i = 0; i <= charsmax(Replican_Models); i++)
            precache_model(Replican_Models[i])
           
        for (i = 0; i <= charsmax(Terminator_Models); i++)
            precache_model(Terminator_Models[i])
    }
     
    public plugin_init()
    {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        g_pCvarUseTimes = register_cvar("ze_hskin_menu_used", "1")
    }
    
    public ze_user_infected(Victim)
    {
        if (g_bButcher[Victim])
        {
            rg_set_user_model(Victim, "butcher_zom")
        }
        else if (g_bDoom[Victim])
        {
            rg_set_user_model(Victim, "doom_zom")
        }
        else if (g_bFleshpound[Victim])
        {
            rg_set_user_model(Victim, "fleshpound_zom")
        }
        else if (g_bJumper[Victim])
        {
            rg_set_user_model(Victim, "jumper_zom")
        }
        else if (g_bMon_Assassin[Victim])
        {
            rg_set_user_model(Victim, "monster_assassin_zom")
        }
        else if (g_bMon_Zom[Victim])
        {
            rg_set_user_model(Victim, "monster_zom")
        }
        else if (g_bAbaddon[Victim])
        {
            rg_set_user_model(Victim, "abaddon_zom")
        }
        else if (g_bAssassin_Zom[Victim])
        {
            rg_set_user_model(Victim, "assassin_zom")
        }
        else if (g_bDeimosboss[Victim])
        {
            rg_set_user_model(Victim, "deimosboss_zom")
        }
        else if (g_bLockerz[Victim])
        {
            rg_set_user_model(Victim, "lockerz_zom")
        }
        else if (g_bMon_Nemesis[Victim])
        {
            rg_set_user_model(Victim, "monster_nemesis_zom")
        }
        else if (g_bNightCrawler[Victim])
        {
            rg_set_user_model(Victim, "nightcrawler_zom")
        }
        else if (g_bNightRider[Victim])
        {
            rg_set_user_model(Victim, "nightrider_zom")
        }
        else if (g_bPoison[Victim])
        {
            rg_set_user_model(Victim, "poison_nshaman_zom")
        }
        else if (g_bPredator[Victim])
        {
            rg_set_user_model(Victim, "predator_zom")
        }
        else if (g_bRaptor[Victim])
        {
            rg_set_user_model(Victim, "raptor_zom")
        }
        else if (g_bRealBoss[Victim])
        {
            rg_set_user_model(Victim, "realboss_zom")
        }
        else if (g_bReplican[Victim])
        {
            rg_set_user_model(Victim, "replican_fear_zom")
        }
        else if (g_bTerminator[Victim])
        {
            rg_set_user_model(Victim, "terminator_zom")
        }
    	
        g_iUsedTimes[Victim] = 0
    }
     
    public client_putinserver(id)
    {
        g_bButcher[id] = false
        g_bDoom[id] = false
        g_bFleshpound[id] = false
        g_bJumper[id] = false
        g_bMon_Assassin[id] = false
        g_bMon_Zom[id] = false
        g_bAbaddon[id] = false
        g_bAssassin_Zom[id] = false
        g_bDeimosboss[id] = false
        g_bLockerz[id] = false
        g_bMon_Nemesis[id] = false
        g_bNightCrawler[id] = false
        g_bNightRider[id] = false
        g_bPoison[id] = false
        g_bPredator[id] = false
        g_bRaptor[id] = false
        g_bRealBoss[id] = false
        g_bReplican[id] = false
        g_bTerminator[id] = false
        g_iUsedTimes[id] = 0
    }
     
    public client_disconnected(id)
    {
        g_bButcher[id] = false
        g_bDoom[id] = false
        g_bFleshpound[id] = false
        g_bJumper[id] = false
        g_bMon_Assassin[id] = false
        g_bMon_Zom[id] = false
        g_bAbaddon[id] = false
        g_bAssassin_Zom[id] = false
        g_bDeimosboss[id] = false
        g_bLockerz[id] = false
        g_bMon_Nemesis[id] = false
        g_bNightCrawler[id] = false
        g_bNightRider[id] = false
        g_bPoison[id] = false
        g_bPredator[id] = false
        g_bRaptor[id] = false
        g_bRealBoss[id] = false
        g_bReplican[id] = false
        g_bTerminator[id] = false
        g_iUsedTimes[id] = 0
    }
     
    public Show_Zmodel_Menu(id)
    {
        if (!is_user_connected(id))
        {
            return PLUGIN_CONTINUE
        }
     
        if (!ze_is_user_zombie(id))
        {
            ze_colored_print(id, "!tYou can't change your zombie skin while Human!y.")
            return PLUGIN_HANDLED
        }
     
        if (g_iUsedTimes[id] >= get_pcvar_num(g_pCvarUseTimes))
        {
            ze_colored_print(id, "!tMaximum have been reached !y[!g%d!y]!", get_pcvar_num(g_pCvarUseTimes))
            return PLUGIN_HANDLED
        }
     
        if (!is_user_alive(id))
        {
            ze_colored_print(id, "!tDead can't open menu!y.")
            return PLUGIN_HANDLED
        }
     
        Zmodel_Menu(id)
        return PLUGIN_CONTINUE
    }
     
    public Zmodel_Menu(id)
    {
        new zmenu = menu_create("\r[\wZombie Models\r]\r", "menu_zskins")
        menu_additem(zmenu, "\wButcher", "", 0)
        menu_additem(zmenu, "\wDoom", "", 0)
        menu_additem(zmenu, "\wFleshpound", "", 0)
        menu_additem(zmenu, "\wJumper", "", 0)
     
        if (ze_get_vip_flags(id) & VIP_A)
        {
            menu_additem(zmenu, "\wMonster Assassin\r[VIP]", "", 0)
            menu_additem(zmenu, "\wMonster\r[VIP]", "", 0)
            menu_additem(zmenu, "\wAbaddon\r[VIP]", "", 0)
            menu_additem(zmenu, "\wAssassin\r[VIP]", "", 0)
        }
     
        if (ze_get_vip_flags(id) & VIP_D)
        {
            menu_additem(zmenu, "\wDeimosboss \r[VIP+]", "", 0)
            menu_additem(zmenu, "\wLockerz \r[VIP+]", "", 0)
            menu_additem(zmenu, "\wMonster Nemesis \r[VIP+]", "", 0)
            menu_additem(zmenu, "\wNight Crawler \r[VIP+]", "", 0)
            menu_additem(zmenu, "\wNight Rider \r[VIP+]", "", 0)
        }
     
        if (ze_get_vip_flags(id) & VIP_E)
        {
            menu_additem(zmenu, "\wPoison \r[VIP++]", "", 0)
            menu_additem(zmenu, "\wPredator \r[VIP++]", "", 0)
            menu_additem(zmenu, "\wRaptor \r[VIP++]", "", 0)
            menu_additem(zmenu, "\wRealBoss \r[VIP++]", "", 0)
            menu_additem(zmenu, "\wReplican \r[VIP++]", "", 0)
            menu_additem(zmenu, "\wTerminator \r[VIP++]", "", 0)
        }
     
        menu_setprop(zmenu, MPROP_EXIT, MEXIT_ALL)
        menu_display(id, zmenu, 0)
    }
     
    public menu_zskins(id, zmenu, item)
    {
        if(!is_user_alive(id) || !ze_is_user_zombie(id))
            return PLUGIN_HANDLED
     
        switch(item)
        {
            case 0 : // Butcher
            {
                g_bButcher[id] = true
                g_bDoom[id] = false
                g_bFleshpound[id] = false
                g_bJumper[id] = false
                g_bMon_Assassin[id] = false
                g_bMon_Zom[id] = false
                g_bAbaddon[id] = false
                g_bAssassin_Zom[id] = false
                g_bDeimosboss[id] = false
                g_bLockerz[id] = false
                g_bMon_Nemesis[id] = false
                g_bNightCrawler[id] = false
                g_bNightRider[id] = false
                g_bPoison[id] = false
                g_bPredator[id] = false
                g_bRaptor[id] = false
                g_bRealBoss[id] = false
                g_bReplican[id] = false
                g_bTerminator[id] = false
                rg_set_user_model(id, "butcher_zom")
                ze_colored_print(id, "You picked the Butcher skin", id)
                g_iUsedTimes[id]++
            }
            case 1 : // Doom
            {
                g_bButcher[id] = false
                g_bDoom[id] = true
                g_bFleshpound[id] = false
                g_bJumper[id] = false
                g_bMon_Assassin[id] = false
                g_bMon_Zom[id] = false
                g_bAbaddon[id] = false
                g_bAssassin_Zom[id] = false
                g_bDeimosboss[id] = false
                g_bLockerz[id] = false
                g_bMon_Nemesis[id] = false
                g_bNightCrawler[id] = false
                g_bNightRider[id] = false
                g_bPoison[id] = false
                g_bPredator[id] = false
                g_bRaptor[id] = false
                g_bRealBoss[id] = false
                g_bReplican[id] = false
                g_bTerminator[id] = false
                rg_set_user_model(id, "doom_zom")
                ze_colored_print(id, "You picked the Doom skin", id)
                g_iUsedTimes[id]++
            }
            case 2 : // Fleshpound
            {
                g_bButcher[id] = false
                g_bDoom[id] = false
                g_bFleshpound[id] = true
                g_bJumper[id] = false
                g_bMon_Assassin[id] = false
                g_bMon_Zom[id] = false
                g_bAbaddon[id] = false
                g_bAssassin_Zom[id] = false
                g_bDeimosboss[id] = false
                g_bLockerz[id] = false
                g_bMon_Nemesis[id] = false
                g_bNightCrawler[id] = false
                g_bNightRider[id] = false
                g_bPoison[id] = false
                g_bPredator[id] = false
                g_bRaptor[id] = false
                g_bRealBoss[id] = false
                g_bReplican[id] = false
                g_bTerminator[id] = false
                rg_set_user_model(id, "fleshpound_zom")
                ze_colored_print(id, "You picked the Fleshpound skin", id)
                g_iUsedTimes[id]++
            }
            case 3 : // Jumper
            {
                g_bButcher[id] = false
                g_bDoom[id] = false
                g_bFleshpound[id] = false
                g_bJumper[id] = true
                g_bMon_Assassin[id] = false
                g_bMon_Zom[id] = false
                g_bAbaddon[id] = false
                g_bAssassin_Zom[id] = false
                g_bDeimosboss[id] = false
                g_bLockerz[id] = false
                g_bMon_Nemesis[id] = false
                g_bNightCrawler[id] = false
                g_bNightRider[id] = false
                g_bPoison[id] = false
                g_bPredator[id] = false
                g_bRaptor[id] = false
                g_bRealBoss[id] = false
                g_bReplican[id] = false
                g_bTerminator[id] = false
                rg_set_user_model(id, "jumper_zom")
                ze_colored_print(id, "You picked the Jumper skin", id)
                g_iUsedTimes[id]++
            }
            case 4 : // Mon_Assassin
            {
                if (ze_get_vip_flags(id) & VIP_A)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = true
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "Mon_Assassin_zom")
                    ze_colored_print(id, "You picked the Monster Assassin skin", id)
                    g_iUsedTimes[id]++
                }
            }
            case 5 : // Mon_Zom
            {
                if (ze_get_vip_flags(id) & VIP_A)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = true
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "monster_zom")
                    ze_colored_print(id, "You picked the Monster skin", id)
                    g_iUsedTimes[id]++
                }
            }
            case 6 : // Abaddon
            {
                if (ze_get_vip_flags(id) & VIP_A)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = true
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "abaddon_zom")
                    ze_colored_print(id, "You picked the Abaddon skin", id)
                    g_iUsedTimes[id]++
                }
            }
            case 7 : // Assassin_Zom
            {
                if (ze_get_vip_flags(id) & VIP_A)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = true
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "assassin_zom")
                    ze_colored_print(id, "You picked the Assassin skin", id)
                    g_iUsedTimes[id]++
                }
            }
            case 8 : // Deimosboss
            {      
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = true
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "deimosboss_zom")
                    ze_colored_print(id, "You picked the Deimosboss skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 9 : // Lockerz
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = true
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "lockerz_zom")
                    ze_colored_print(id, "You picked the Lockerz skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 10 : // Monster Nemesis
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = true
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "monster_nemesis_zom")
                    ze_colored_print(id, "You picked the Monster Nemesis skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 11 : // Night Crawler
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = true
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "nightcrawler_zom")
                    ze_colored_print(id, "You picked the NightCrawler skin", id)
                    g_iUsedTimes[id]++
                }                      
            }
            case 12 : //NightRider
            {
                if (ze_get_vip_flags(id) & VIP_D)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = true
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "nightrider_zom")
                    ze_colored_print(id, "You picked the NightRider skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 13 : // Poison
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = true
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "poison_nshaman_zom")
                    ze_colored_print(id, "You picked the Poison skin", id)
                    g_iUsedTimes[id]++
                }      
            }
            case 14 : // Predator
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = true
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "predator_zom")
                    ze_colored_print(id, "You picked the Predator skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 15 : // Raptor
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = true
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "raptor_zom")
                    ze_colored_print(id, "You picked the Raptor skin", id)
                    g_iUsedTimes[id]++
                }              
            }
            case 16 : // RealBoss
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = true
                    g_bReplican[id] = false
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "realboss_zom")
                    ze_colored_print(id, "You picked the RealBoss skin", id)
                    g_iUsedTimes[id]++
                }          
            }
            case 17 : // Replican
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = true
                    g_bTerminator[id] = false
                    rg_set_user_model(id, "replican_fear_zom")
                    ze_colored_print(id, "You picked the Replican skin", id)
                    g_iUsedTimes[id]++
                }            
            }
            case 18 : // Terminator
            {
                if (ze_get_vip_flags(id) & VIP_E)
                {
                    g_bButcher[id] = false
                    g_bDoom[id] = false
                    g_bFleshpound[id] = false
                    g_bJumper[id] = false
                    g_bMon_Assassin[id] = false
                    g_bMon_Zom[id] = false
                    g_bAbaddon[id] = false
                    g_bAssassin_Zom[id] = false
                    g_bDeimosboss[id] = false
                    g_bLockerz[id] = false
                    g_bMon_Nemesis[id] = false
                    g_bNightCrawler[id] = false
                    g_bNightRider[id] = false
                    g_bPoison[id] = false
                    g_bPredator[id] = false
                    g_bRaptor[id] = false
                    g_bRealBoss[id] = false
                    g_bReplican[id] = false
                    g_bTerminator[id] = true
                    rg_set_user_model(id, "terminator_zom")
                    ze_colored_print(id, "You picked the Terminator skin", id)
                    g_iUsedTimes[id]++
                }            
            }
     
        }    
        menu_destroy(zmenu)
        return PLUGIN_HANDLED
    }
     
    public native_ze_open_zskin_menu(id)
    {
        Show_Zmodel_Menu(id)
    }
Again you must make sure that this plugin name to be at the end of the plugins-zombie_escape.ini, why i always say this?
I say this because ze_resources plugin set players models at user humanized and user infected so it should be like:
  • Code: Select all

    // Here ze_resources.amxx it will be called first and user models will be set before any plugin under it load
    ze_resources.amxx
    
    // Your plugins under it will be called after it's called and will override the models set by ze_resources
    human_models_menu.amxx
    zombie_models_menu.amxx
RapidFlush wrote:
9 Months Ago
Also why don't you have a donation link on website?
Just right now we don't need donations as everythings OK, you may support us by telling others about Mod, running the mod and report bugs.
You don't know? Learn and you will know.

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 274
Joined: 9 Months Ago
Location: Des Moines/USA
Donation: 1x donated in total €10.00
Has thanked: 6 times
Been thanked: 20 times
Age: 33
Contact:

#17

Post by Mark » 8 Months Ago

If i wanted to have custom hands with these models how would i do this can you add an example to the code above im sure ill figure the rest out.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1791
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 88 times
Age: 21
Contact:

#18

Post by Raheem » 8 Months Ago

We are using cs_weap_models_api.amxx for this, we updated this plugin to use ReAPI natives. This plugin is very simple in using that's why we are using. Same for you it's recommended to use it.

Example of using it (setting v_/p_ models):
    1. cs_set_player_view_model(id, CSW_KNIFE, "models/v_knife.mdl")
    2. cs_set_player_weap_model(id, CSW_KNIFE, "models/p_knife.mdl")
If you don't like to use this API, you can use item deploy method or current weapon.
You don't know? Learn and you will know.

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 274
Joined: 9 Months Ago
Location: Des Moines/USA
Donation: 1x donated in total €10.00
Has thanked: 6 times
Been thanked: 20 times
Age: 33
Contact:

#19

Post by Mark » 8 Months Ago

Would this work?
  1. new const Terminator_Models[][] =
  2. {
  3.     "models/player/terminator_zom/terminator_zom.mdl"
  4.     "models/v_knife.mdl"
  5.     "models/p_knife.mdl"
  6. }
  1.     else if (g_bTerminator[Victim])
  2.     {
  3.         rg_set_user_model(Victim, "terminator_zom")
  4.         cs_set_player_view_model(Victim, CSW_KNIFE, "models/v_knife.mdl")
  5.         cs_set_player_weap_model(Victim, CSW_KNIFE, "models/p_knife.mdl")
  6.     }
Then with the bool it should set it right?

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1791
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 88 times
Age: 21
Contact:

#20

Post by Raheem » 8 Months Ago

Will work if placed in zombie infection event.
You don't know? Learn and you will know.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest