Plugin Available Knife Models By Level

Unpaid Requests, Public Plugins
User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 150
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

Knife Models By Level

#1

Post by Luxurious » 1 Year Ago

need plugin knife by level each 5 level get new knife like
Level 0 = Normal Knife
Leve 1 = new knife
Level 5 = New Knife
Level 10 = new knife
Level 15 = new knife
level 20 = new
Level 30 = new
Level 40 = new
Level 50 = new one
BeTalk Zombie-Escape V1.4
IP : 51.77.103.159:27015

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#2

Post by Raheem » 1 Year Ago

Where the base plugin so we can edit it?
You don't know? Learn and you will know.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 150
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#3

Post by Luxurious » 1 Year Ago

i don`t have a base plugin :)
BeTalk Zombie-Escape V1.4
IP : 51.77.103.159:27015

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

#4

Post by Rain1153 » 1 Year Ago

edit my special models according to levels it will be easier
LOL

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 211
Joined: 2 Years Ago
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#5

Post by sPe3doN » 1 Year Ago

Luxurious wrote:
1 Year Ago
i don`t have a base plugin :)
mybe you can add to this :D

Code: Select all

#include <zombie_escape>
#include <ze_levels>
// Setting File
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"
 
// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
#define ADMIN_MODELS_ACCESS ADMIN_LEVEL_H
 
// Default Models
new const szAdminHumanModel[][] =
{
    "vip"
}
 
new const szAdminZombieModel[][] =
{
    "zombie_admin"
}
 
new const v_szAdminHumanKnifeModel[][] =
{
    "models/zombie_escape/v_knife_human_admin.mdl"
}
 
new const v_szAdminZombieKnifeModel[][] =
{
    "models/zombie_escape/v_knife_zombie_admin.mdl"
}
 
new const szHumanModel1[][] =
{
    "human1"
}
 
new const szHumanModel2[][] =
{
    "human2"
}
 
new const szHumanModel3[][] =
{
    "human3"
}
 
new const szHumanModel4[][] =
{
    "human4"
}
new const szHumanModel5[][] =
{
"human5"
}
new const szHumanModel6[][] =
{
"human6"
}
 
 
// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel,
Array:g_szHumanModel1, Array:g_szHumanModel2, Array:g_szHumanModel3, Array:g_szHumanModel4 , Array:g_szHumanModel5 , Array:g_szHumanModel6
 
public plugin_init()
{
    register_plugin("[ZE] Special Models", ZE_VERSION, AUTHORS)
}
 
public plugin_precache()
{
    // Initialize Arrays
    g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_v_szAdminHumanKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_v_szAdminZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_szHumanModel1 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel2 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel3 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel4 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
         
    g_szHumanModel5 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
       
    g_szHumanModel6 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
   
    // Load From External File
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
         amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
        amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
   
    // Load our Default Values
    new iIndex
   
    if(ArraySize(g_szAdminHumanModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminHumanModel; iIndex++)
            ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    }
   
    if(ArraySize(g_szAdminZombieModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminZombieModel; iIndex++)
            ArrayPushString(g_szAdminZombieModel, szAdminZombieModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    }
   
    if(ArraySize(g_v_szAdminHumanKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminHumanKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminHumanKnifeModel, v_szAdminHumanKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    }
   
    if(ArraySize(g_v_szAdminZombieKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminZombieKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminZombieKnifeModel, v_szAdminZombieKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    }
   
    if(ArraySize(g_szHumanModel1) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel1; iIndex++)
            ArrayPushString(g_szHumanModel1, szHumanModel1[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    }
   
    if(ArraySize(g_szHumanModel2) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel2; iIndex++)
            ArrayPushString(g_szHumanModel2, szHumanModel2[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    }
   
    if(ArraySize(g_szHumanModel3) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel3; iIndex++)
            ArrayPushString(g_szHumanModel3, szHumanModel3[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    }
   
    if(ArraySize(g_szHumanModel4) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel4; iIndex++)
            ArrayPushString(g_szHumanModel4, szHumanModel4[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
    }
 
           if(ArraySize(g_szHumanModel5) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel5; iIndex++)
            ArrayPushString(g_szHumanModel5, szHumanModel5[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
    }
 
          if(ArraySize(g_szHumanModel6) == 0)
           {
        for(iIndex = 0; iIndex < sizeof szHumanModel6; iIndex++)
            ArrayPushString(g_szHumanModel6, szHumanModel6[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
    }
 
 
 
 
 
 
    // Precache
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szModelPath[128]
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminHumanModel); iIndex++)
    {
        ArrayGetString(g_szAdminHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminZombieModel); iIndex++)
    {
        ArrayGetString(g_szAdminZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel1); iIndex++)
    {
        ArrayGetString(g_szHumanModel1, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel2); iIndex++)
    {
        ArrayGetString(g_szHumanModel2, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel3); iIndex++)
    {
        ArrayGetString(g_szHumanModel3, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel4); iIndex++)
    {
        ArrayGetString(g_szHumanModel4, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
          for (iIndex = 0; iIndex < ArraySize(g_szHumanModel5); iIndex++)
    {
        ArrayGetString(g_szHumanModel5, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
        for (iIndex = 0; iIndex < ArraySize(g_szHumanModel6); iIndex++)
    {
        ArrayGetString(g_szHumanModel6, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
 
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminHumanKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminHumanKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminZombieKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminZombieKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
 
   
 
}
 
public ze_user_humanized(id)
{
    if(ze_is_user_zombie(id) || !is_user_alive(id))
        return
       
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
 
    // Player Admin?
    if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
    {
        // Set Admin Human Model
        ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(id, szPlayerModel)
       
        // Set Admin Human Knife Model
        ArrayGetString(g_v_szAdminHumanKnifeModel, random_num(0, ArraySize(g_v_szAdminHumanKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(id, CSW_KNIFE, szModel)
    }
    else
    {
        // Rest Player Model (Model Randomly)
        switch(ze_get_user_level(id))
        {
            case 0..5:
            {
                ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 6..15:
            {
                ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 16..25:
            {
                ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 26..35:
            {
                ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                        case 36..43:
                            {
                ArrayGetString(g_szHumanModel5, random_num(0, ArraySize(g_szHumanModel5) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                       case 44..50:
                               
                                      {
                ArrayGetString(g_szHumanModel6, random_num(0, ArraySize(g_szHumanModel6) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
                                     }
                             
        }
    }
}
 
public ze_user_infected(iVictim, iInfector)
{
    if(!is_user_alive(iVictim))
        return
       
    // Set Zombie Models
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
   
    // Player Admin?
    if(get_user_flags(iVictim) & ADMIN_MODELS_ACCESS)
    {
        // Set Zombie Admin Model
        ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(iVictim, szPlayerModel)
       
        // Set Admin Zombie Knife Model
        ArrayGetString(g_v_szAdminZombieKnifeModel, random_num(0, ArraySize(g_v_szAdminZombieKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(iVictim, CSW_KNIFE, szModel)
        cs_set_player_weap_model(iVictim, CSW_KNIFE, "") // Leave Blank so knife not appear with zombies
    }
}

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 150
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#6

Post by Luxurious » 1 Year Ago

sPe3doN wrote:
1 Year Ago
Luxurious wrote:
1 Year Ago
i don`t have a base plugin :)
mybe you can add to this :D

Code: Select all

#include <zombie_escape>
#include <ze_levels>
// Setting File
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"
 
// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
#define ADMIN_MODELS_ACCESS ADMIN_LEVEL_H
 
// Default Models
new const szAdminHumanModel[][] =
{
    "vip"
}
 
new const szAdminZombieModel[][] =
{
    "zombie_admin"
}
 
new const v_szAdminHumanKnifeModel[][] =
{
    "models/zombie_escape/v_knife_human_admin.mdl"
}
 
new const v_szAdminZombieKnifeModel[][] =
{
    "models/zombie_escape/v_knife_zombie_admin.mdl"
}
 
new const szHumanModel1[][] =
{
    "human1"
}
 
new const szHumanModel2[][] =
{
    "human2"
}
 
new const szHumanModel3[][] =
{
    "human3"
}
 
new const szHumanModel4[][] =
{
    "human4"
}
new const szHumanModel5[][] =
{
"human5"
}
new const szHumanModel6[][] =
{
"human6"
}
 
 
// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel,
Array:g_szHumanModel1, Array:g_szHumanModel2, Array:g_szHumanModel3, Array:g_szHumanModel4 , Array:g_szHumanModel5 , Array:g_szHumanModel6
 
public plugin_init()
{
    register_plugin("[ZE] Special Models", ZE_VERSION, AUTHORS)
}
 
public plugin_precache()
{
    // Initialize Arrays
    g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_v_szAdminHumanKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_v_szAdminZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_szHumanModel1 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel2 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel3 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel4 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
         
    g_szHumanModel5 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
       
    g_szHumanModel6 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
   
    // Load From External File
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
         amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
        amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
   
    // Load our Default Values
    new iIndex
   
    if(ArraySize(g_szAdminHumanModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminHumanModel; iIndex++)
            ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    }
   
    if(ArraySize(g_szAdminZombieModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminZombieModel; iIndex++)
            ArrayPushString(g_szAdminZombieModel, szAdminZombieModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    }
   
    if(ArraySize(g_v_szAdminHumanKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminHumanKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminHumanKnifeModel, v_szAdminHumanKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    }
   
    if(ArraySize(g_v_szAdminZombieKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminZombieKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminZombieKnifeModel, v_szAdminZombieKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    }
   
    if(ArraySize(g_szHumanModel1) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel1; iIndex++)
            ArrayPushString(g_szHumanModel1, szHumanModel1[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    }
   
    if(ArraySize(g_szHumanModel2) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel2; iIndex++)
            ArrayPushString(g_szHumanModel2, szHumanModel2[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    }
   
    if(ArraySize(g_szHumanModel3) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel3; iIndex++)
            ArrayPushString(g_szHumanModel3, szHumanModel3[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    }
   
    if(ArraySize(g_szHumanModel4) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel4; iIndex++)
            ArrayPushString(g_szHumanModel4, szHumanModel4[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
    }
 
           if(ArraySize(g_szHumanModel5) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel5; iIndex++)
            ArrayPushString(g_szHumanModel5, szHumanModel5[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
    }
 
          if(ArraySize(g_szHumanModel6) == 0)
           {
        for(iIndex = 0; iIndex < sizeof szHumanModel6; iIndex++)
            ArrayPushString(g_szHumanModel6, szHumanModel6[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
    }
 
 
 
 
 
 
    // Precache
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szModelPath[128]
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminHumanModel); iIndex++)
    {
        ArrayGetString(g_szAdminHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminZombieModel); iIndex++)
    {
        ArrayGetString(g_szAdminZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel1); iIndex++)
    {
        ArrayGetString(g_szHumanModel1, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel2); iIndex++)
    {
        ArrayGetString(g_szHumanModel2, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel3); iIndex++)
    {
        ArrayGetString(g_szHumanModel3, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel4); iIndex++)
    {
        ArrayGetString(g_szHumanModel4, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
          for (iIndex = 0; iIndex < ArraySize(g_szHumanModel5); iIndex++)
    {
        ArrayGetString(g_szHumanModel5, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
        for (iIndex = 0; iIndex < ArraySize(g_szHumanModel6); iIndex++)
    {
        ArrayGetString(g_szHumanModel6, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
 
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminHumanKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminHumanKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminZombieKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminZombieKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
 
   
 
}
 
public ze_user_humanized(id)
{
    if(ze_is_user_zombie(id) || !is_user_alive(id))
        return
       
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
 
    // Player Admin?
    if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
    {
        // Set Admin Human Model
        ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(id, szPlayerModel)
       
        // Set Admin Human Knife Model
        ArrayGetString(g_v_szAdminHumanKnifeModel, random_num(0, ArraySize(g_v_szAdminHumanKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(id, CSW_KNIFE, szModel)
    }
    else
    {
        // Rest Player Model (Model Randomly)
        switch(ze_get_user_level(id))
        {
            case 0..5:
            {
                ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 6..15:
            {
                ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 16..25:
            {
                ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 26..35:
            {
                ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                        case 36..43:
                            {
                ArrayGetString(g_szHumanModel5, random_num(0, ArraySize(g_szHumanModel5) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                       case 44..50:
                               
                                      {
                ArrayGetString(g_szHumanModel6, random_num(0, ArraySize(g_szHumanModel6) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
                                     }
                             
        }
    }
}
 
public ze_user_infected(iVictim, iInfector)
{
    if(!is_user_alive(iVictim))
        return
       
    // Set Zombie Models
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
   
    // Player Admin?
    if(get_user_flags(iVictim) & ADMIN_MODELS_ACCESS)
    {
        // Set Zombie Admin Model
        ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(iVictim, szPlayerModel)
       
        // Set Admin Zombie Knife Model
        ArrayGetString(g_v_szAdminZombieKnifeModel, random_num(0, ArraySize(g_v_szAdminZombieKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(iVictim, CSW_KNIFE, szModel)
        cs_set_player_weap_model(iVictim, CSW_KNIFE, "") // Leave Blank so knife not appear with zombies
    }
}
Thank You <3
BeTalk Zombie-Escape V1.4
IP : 51.77.103.159:27015

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 211
Joined: 2 Years Ago
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#7

Post by sPe3doN » 1 Year Ago

Luxurious wrote:
1 Year Ago
sPe3doN wrote:
1 Year Ago
Luxurious wrote:
1 Year Ago
i don`t have a base plugin :)
mybe you can add to this :D

Code: Select all

#include <zombie_escape>
#include <ze_levels>
// Setting File
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"
 
// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
#define ADMIN_MODELS_ACCESS ADMIN_LEVEL_H
 
// Default Models
new const szAdminHumanModel[][] =
{
    "vip"
}
 
new const szAdminZombieModel[][] =
{
    "zombie_admin"
}
 
new const v_szAdminHumanKnifeModel[][] =
{
    "models/zombie_escape/v_knife_human_admin.mdl"
}
 
new const v_szAdminZombieKnifeModel[][] =
{
    "models/zombie_escape/v_knife_zombie_admin.mdl"
}
 
new const szHumanModel1[][] =
{
    "human1"
}
 
new const szHumanModel2[][] =
{
    "human2"
}
 
new const szHumanModel3[][] =
{
    "human3"
}
 
new const szHumanModel4[][] =
{
    "human4"
}
new const szHumanModel5[][] =
{
"human5"
}
new const szHumanModel6[][] =
{
"human6"
}
 
 
// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel,
Array:g_szHumanModel1, Array:g_szHumanModel2, Array:g_szHumanModel3, Array:g_szHumanModel4 , Array:g_szHumanModel5 , Array:g_szHumanModel6
 
public plugin_init()
{
    register_plugin("[ZE] Special Models", ZE_VERSION, AUTHORS)
}
 
public plugin_precache()
{
    // Initialize Arrays
    g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_v_szAdminHumanKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_v_szAdminZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_szHumanModel1 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel2 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel3 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel4 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
         
    g_szHumanModel5 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
       
    g_szHumanModel6 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
   
    // Load From External File
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
         amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
        amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
   
    // Load our Default Values
    new iIndex
   
    if(ArraySize(g_szAdminHumanModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminHumanModel; iIndex++)
            ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    }
   
    if(ArraySize(g_szAdminZombieModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminZombieModel; iIndex++)
            ArrayPushString(g_szAdminZombieModel, szAdminZombieModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    }
   
    if(ArraySize(g_v_szAdminHumanKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminHumanKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminHumanKnifeModel, v_szAdminHumanKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    }
   
    if(ArraySize(g_v_szAdminZombieKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminZombieKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminZombieKnifeModel, v_szAdminZombieKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    }
   
    if(ArraySize(g_szHumanModel1) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel1; iIndex++)
            ArrayPushString(g_szHumanModel1, szHumanModel1[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    }
   
    if(ArraySize(g_szHumanModel2) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel2; iIndex++)
            ArrayPushString(g_szHumanModel2, szHumanModel2[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    }
   
    if(ArraySize(g_szHumanModel3) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel3; iIndex++)
            ArrayPushString(g_szHumanModel3, szHumanModel3[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    }
   
    if(ArraySize(g_szHumanModel4) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel4; iIndex++)
            ArrayPushString(g_szHumanModel4, szHumanModel4[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
    }
 
           if(ArraySize(g_szHumanModel5) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel5; iIndex++)
            ArrayPushString(g_szHumanModel5, szHumanModel5[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
    }
 
          if(ArraySize(g_szHumanModel6) == 0)
           {
        for(iIndex = 0; iIndex < sizeof szHumanModel6; iIndex++)
            ArrayPushString(g_szHumanModel6, szHumanModel6[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
    }
 
 
 
 
 
 
    // Precache
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szModelPath[128]
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminHumanModel); iIndex++)
    {
        ArrayGetString(g_szAdminHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminZombieModel); iIndex++)
    {
        ArrayGetString(g_szAdminZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel1); iIndex++)
    {
        ArrayGetString(g_szHumanModel1, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel2); iIndex++)
    {
        ArrayGetString(g_szHumanModel2, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel3); iIndex++)
    {
        ArrayGetString(g_szHumanModel3, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel4); iIndex++)
    {
        ArrayGetString(g_szHumanModel4, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
          for (iIndex = 0; iIndex < ArraySize(g_szHumanModel5); iIndex++)
    {
        ArrayGetString(g_szHumanModel5, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
        for (iIndex = 0; iIndex < ArraySize(g_szHumanModel6); iIndex++)
    {
        ArrayGetString(g_szHumanModel6, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
 
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminHumanKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminHumanKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminZombieKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminZombieKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
 
   
 
}
 
public ze_user_humanized(id)
{
    if(ze_is_user_zombie(id) || !is_user_alive(id))
        return
       
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
 
    // Player Admin?
    if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
    {
        // Set Admin Human Model
        ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(id, szPlayerModel)
       
        // Set Admin Human Knife Model
        ArrayGetString(g_v_szAdminHumanKnifeModel, random_num(0, ArraySize(g_v_szAdminHumanKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(id, CSW_KNIFE, szModel)
    }
    else
    {
        // Rest Player Model (Model Randomly)
        switch(ze_get_user_level(id))
        {
            case 0..5:
            {
                ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 6..15:
            {
                ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 16..25:
            {
                ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 26..35:
            {
                ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                        case 36..43:
                            {
                ArrayGetString(g_szHumanModel5, random_num(0, ArraySize(g_szHumanModel5) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                       case 44..50:
                               
                                      {
                ArrayGetString(g_szHumanModel6, random_num(0, ArraySize(g_szHumanModel6) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
                                     }
                             
        }
    }
}
 
public ze_user_infected(iVictim, iInfector)
{
    if(!is_user_alive(iVictim))
        return
       
    // Set Zombie Models
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
   
    // Player Admin?
    if(get_user_flags(iVictim) & ADMIN_MODELS_ACCESS)
    {
        // Set Zombie Admin Model
        ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(iVictim, szPlayerModel)
       
        // Set Admin Zombie Knife Model
        ArrayGetString(g_v_szAdminZombieKnifeModel, random_num(0, ArraySize(g_v_szAdminZombieKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(iVictim, CSW_KNIFE, szModel)
        cs_set_player_weap_model(iVictim, CSW_KNIFE, "") // Leave Blank so knife not appear with zombies
    }
}
Thank You <3
this is human models by level add for it knife by level

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 150
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#8

Post by Luxurious » 1 Year Ago

sPe3doN wrote:
1 Year Ago
Luxurious wrote:
1 Year Ago
sPe3doN wrote:
1 Year Ago

mybe you can add to this :D

Code: Select all

#include <zombie_escape>
#include <ze_levels>
// Setting File
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"
 
// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
#define ADMIN_MODELS_ACCESS ADMIN_LEVEL_H
 
// Default Models
new const szAdminHumanModel[][] =
{
    "vip"
}
 
new const szAdminZombieModel[][] =
{
    "zombie_admin"
}
 
new const v_szAdminHumanKnifeModel[][] =
{
    "models/zombie_escape/v_knife_human_admin.mdl"
}
 
new const v_szAdminZombieKnifeModel[][] =
{
    "models/zombie_escape/v_knife_zombie_admin.mdl"
}
 
new const szHumanModel1[][] =
{
    "human1"
}
 
new const szHumanModel2[][] =
{
    "human2"
}
 
new const szHumanModel3[][] =
{
    "human3"
}
 
new const szHumanModel4[][] =
{
    "human4"
}
new const szHumanModel5[][] =
{
"human5"
}
new const szHumanModel6[][] =
{
"human6"
}
 
 
// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel,
Array:g_szHumanModel1, Array:g_szHumanModel2, Array:g_szHumanModel3, Array:g_szHumanModel4 , Array:g_szHumanModel5 , Array:g_szHumanModel6
 
public plugin_init()
{
    register_plugin("[ZE] Special Models", ZE_VERSION, AUTHORS)
}
 
public plugin_precache()
{
    // Initialize Arrays
    g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_v_szAdminHumanKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_v_szAdminZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
    g_szHumanModel1 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel2 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel3 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
    g_szHumanModel4 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
         
    g_szHumanModel5 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
       
    g_szHumanModel6 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
   
    // Load From External File
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
         amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
        amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
   
    // Load our Default Values
    new iIndex
   
    if(ArraySize(g_szAdminHumanModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminHumanModel; iIndex++)
            ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
    }
   
    if(ArraySize(g_szAdminZombieModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szAdminZombieModel; iIndex++)
            ArrayPushString(g_szAdminZombieModel, szAdminZombieModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
    }
   
    if(ArraySize(g_v_szAdminHumanKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminHumanKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminHumanKnifeModel, v_szAdminHumanKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
    }
   
    if(ArraySize(g_v_szAdminZombieKnifeModel) == 0)
    {
        for(iIndex = 0; iIndex < sizeof v_szAdminZombieKnifeModel; iIndex++)
            ArrayPushString(g_v_szAdminZombieKnifeModel, v_szAdminZombieKnifeModel[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
    }
   
    if(ArraySize(g_szHumanModel1) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel1; iIndex++)
            ArrayPushString(g_szHumanModel1, szHumanModel1[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
    }
   
    if(ArraySize(g_szHumanModel2) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel2; iIndex++)
            ArrayPushString(g_szHumanModel2, szHumanModel2[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
    }
   
    if(ArraySize(g_szHumanModel3) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel3; iIndex++)
            ArrayPushString(g_szHumanModel3, szHumanModel3[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
    }
   
    if(ArraySize(g_szHumanModel4) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel4; iIndex++)
            ArrayPushString(g_szHumanModel4, szHumanModel4[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
    }
 
           if(ArraySize(g_szHumanModel5) == 0)
    {
        for(iIndex = 0; iIndex < sizeof szHumanModel5; iIndex++)
            ArrayPushString(g_szHumanModel5, szHumanModel5[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 5", g_szHumanModel5)
    }
 
          if(ArraySize(g_szHumanModel6) == 0)
           {
        for(iIndex = 0; iIndex < sizeof szHumanModel6; iIndex++)
            ArrayPushString(g_szHumanModel6, szHumanModel6[iIndex])
       
        // Save to external file
        amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 6", g_szHumanModel6)
    }
 
 
 
 
 
 
    // Precache
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szModelPath[128]
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminHumanModel); iIndex++)
    {
        ArrayGetString(g_szAdminHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szAdminZombieModel); iIndex++)
    {
        ArrayGetString(g_szAdminZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel1); iIndex++)
    {
        ArrayGetString(g_szHumanModel1, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel2); iIndex++)
    {
        ArrayGetString(g_szHumanModel2, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel3); iIndex++)
    {
        ArrayGetString(g_szHumanModel3, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_szHumanModel4); iIndex++)
    {
        ArrayGetString(g_szHumanModel4, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
          for (iIndex = 0; iIndex < ArraySize(g_szHumanModel5); iIndex++)
    {
        ArrayGetString(g_szHumanModel5, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
        for (iIndex = 0; iIndex < ArraySize(g_szHumanModel6); iIndex++)
    {
        ArrayGetString(g_szHumanModel6, iIndex, szPlayerModel, charsmax(szPlayerModel))
        formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
        precache_model(szModelPath)
    }
 
 
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminHumanKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminHumanKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
   
    for (iIndex = 0; iIndex < ArraySize(g_v_szAdminZombieKnifeModel); iIndex++)
    {
        ArrayGetString(g_v_szAdminZombieKnifeModel, iIndex, szModel, charsmax(szModel))
        precache_model(szModel)
    }
 
   
 
}
 
public ze_user_humanized(id)
{
    if(ze_is_user_zombie(id) || !is_user_alive(id))
        return
       
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
 
    // Player Admin?
    if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
    {
        // Set Admin Human Model
        ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(id, szPlayerModel)
       
        // Set Admin Human Knife Model
        ArrayGetString(g_v_szAdminHumanKnifeModel, random_num(0, ArraySize(g_v_szAdminHumanKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(id, CSW_KNIFE, szModel)
    }
    else
    {
        // Rest Player Model (Model Randomly)
        switch(ze_get_user_level(id))
        {
            case 0..5:
            {
                ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 6..15:
            {
                ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 16..25:
            {
                ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
            case 26..35:
            {
                ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                        case 36..43:
                            {
                ArrayGetString(g_szHumanModel5, random_num(0, ArraySize(g_szHumanModel5) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
            }
                       case 44..50:
                               
                                      {
                ArrayGetString(g_szHumanModel6, random_num(0, ArraySize(g_szHumanModel6) - 1), szPlayerModel, charsmax(szPlayerModel))
                rg_set_user_model(id, szPlayerModel)
                                     }
                             
        }
    }
}
 
public ze_user_infected(iVictim, iInfector)
{
    if(!is_user_alive(iVictim))
        return
       
    // Set Zombie Models
    new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
   
    // Player Admin?
    if(get_user_flags(iVictim) & ADMIN_MODELS_ACCESS)
    {
        // Set Zombie Admin Model
        ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
        rg_set_user_model(iVictim, szPlayerModel)
       
        // Set Admin Zombie Knife Model
        ArrayGetString(g_v_szAdminZombieKnifeModel, random_num(0, ArraySize(g_v_szAdminZombieKnifeModel) - 1), szModel, charsmax(szModel))
        cs_set_player_view_model(iVictim, CSW_KNIFE, szModel)
        cs_set_player_weap_model(iVictim, CSW_KNIFE, "") // Leave Blank so knife not appear with zombies
    }
}
Thank You <3
this is human models by level add for it knife by level
i did
BeTalk Zombie-Escape V1.4
IP : 51.77.103.159:27015

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 211
Joined: 2 Years Ago
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#9

Post by sPe3doN » 1 Year Ago

Luxurious wrote:
1 Year Ago
sPe3doN wrote:
1 Year Ago
Luxurious wrote:
1 Year Ago

Thank You <3
this is human models by level add for it knife by level
i did
Can you send it to me ?

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 150
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#10

Post by Luxurious » 1 Year Ago

okay i will test it then i will send it to u
BeTalk Zombie-Escape V1.4
IP : 51.77.103.159:27015

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests