Admin models plugin ain't compatible with rebuild version. Is it possible fixing? Of cource only admin&vips models will be needed, not player human models. Also, would be nice to seperate human admin models as ct and terrorist.
Admin Models [rebuild]
-
- VIP
- Posts: 31
- Joined: 5 years ago
- Location: Romania
- Contact:
This plugin works for v1.6 but I changed it for the rebuild, I don't know what you mean to separate models by ct and t
Be more specific if that's not what you need
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <reapi>
#include <amx_settings_api>
#include <cs_weap_models_api>
#include <ze_core>
#include <ze_vip>
// 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"
}
// 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
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)
// 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)
// 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)
}
// 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_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(random_num(0, 130))
{
case 0..30:
{
ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
case 31..70:
{
ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
case 71..100:
{
ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
case 101..130:
{
ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 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
}
}
-
- VIP
- Posts: 31
- Joined: 5 years ago
- Location: Romania
- Contact:
This is my edited version of the plugin, it contains Skins for Admin,Vip and Donator (ACCESS_LEVEL_G) For both Humans and Zombies.Check if is ok for you
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <reapi>
#include <amx_settings_api>
#include <cs_weap_models_api>
#include <ze_core>
#include <ze_vip>
// 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
// Default Models
new const szAdminHumanModel[][] =
{
"vip"
}
new const szAdminZombieModel[][] =
{
"zombie_admin"
}
new const szDonatorHuman[][] =
{
"human1"
}
new const szDonatorZombie[][] =
{
"human2"
}
new const szVipHuman[][] =
{
"human3"
}
new const szVipZombie[][] =
{
"human4"
}
// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel,
Array:g_szDonatorHuman, Array:g_szDonatorZombie, Array:g_szVipHuman, Array:g_szVipZombie
public plugin_precache()
{
// Initialize Arrays
g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szDonatorHuman = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szDonatorZombie = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szVipHuman = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szVipZombie = 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, "Player Models", "DonatorHuman", g_szDonatorHuman)
amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "DonatorZombie", g_szDonatorZombie)
amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipHuman", g_szVipHuman)
amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipZombie", g_szVipZombie)
// 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_szDonatorHuman) == 0)
{
for(iIndex = 0; iIndex < sizeof szDonatorHuman; iIndex++)
ArrayPushString(g_szDonatorHuman, szDonatorHuman[iIndex])
// Save to external file
amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "DonatorHuman", g_szDonatorHuman)
}
if(ArraySize(g_szDonatorZombie) == 0)
{
for(iIndex = 0; iIndex < sizeof szDonatorZombie; iIndex++)
ArrayPushString(g_szDonatorZombie, szDonatorZombie[iIndex])
// Save to external file
amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "DonatorZombie", g_szDonatorZombie)
}
if(ArraySize(g_szVipHuman) == 0)
{
for(iIndex = 0; iIndex < sizeof szVipHuman; iIndex++)
ArrayPushString(g_szVipHuman, szVipHuman[iIndex])
// Save to external file
amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipHuman", g_szVipHuman)
}
if(ArraySize(g_szVipZombie) == 0)
{
for(iIndex = 0; iIndex < sizeof szVipZombie; iIndex++)
ArrayPushString(g_szVipZombie, szVipZombie[iIndex])
// Save to external file
amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipZombie", g_szVipZombie)
}
// Precache
new szPlayerModel[PLAYERMODEL_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_szDonatorHuman); iIndex++)
{
ArrayGetString(g_szDonatorHuman, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szDonatorZombie); iIndex++)
{
ArrayGetString(g_szDonatorZombie, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szVipHuman); iIndex++)
{
ArrayGetString(g_szVipHuman, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szVipZombie); iIndex++)
{
ArrayGetString(g_szVipZombie, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
}
public ze_user_humanized(id)
{
if(ze_is_user_zombie(id) || !is_user_alive(id))
return
new szPlayerModel[PLAYERMODEL_MAX_LENGTH]
// Player Donator?
if(get_user_flags(id) & ADMIN_LEVEL_G)
{
ArrayGetString(g_szDonatorHuman, random_num(0, ArraySize(g_szDonatorHuman) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if(ze_is_user_vip(id))
{
// Set Admin Human Model
ArrayGetString(g_szVipHuman, random_num(0, ArraySize(g_szVipHuman) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & ADMIN_BAN)
{
// Set Admin Human Model
ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 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]
// Player Donator?
if(get_user_flags(iVictim) & ADMIN_LEVEL_G)
{
ArrayGetString(g_szDonatorZombie, random_num(0, ArraySize(g_szDonatorZombie) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(iVictim, szPlayerModel)
}
else if (ze_is_user_vip(iVictim))
{
// Set Zombie Admin Model
ArrayGetString(g_szVipZombie, random_num(0, ArraySize(g_szVipZombie) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(iVictim, szPlayerModel)
}
else if(get_user_flags(iVictim) & ADMIN_BAN)
{
// Set Zombie Admin Model
ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(iVictim, szPlayerModel)
}
}
Claudio-vip wrote: ↑3 weeks agoThis plugin works for v1.6 but I changed it for the rebuild, I don't know what you mean to separate models by ct and t
Be more specific if that's not what you need
Code: Select all
#include <amxmodx> #include <amxmisc> #include <reapi> #include <amx_settings_api> #include <cs_weap_models_api> #include <ze_core> #include <ze_vip> // 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" } // 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 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) // 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) // 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) } // 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_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(random_num(0, 130)) { case 0..30: { ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(id, szPlayerModel) } case 31..70: { ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(id, szPlayerModel) } case 71..100: { ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(id, szPlayerModel) } case 101..130: { ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 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 } }
Hey, i meant that admins might become either ct human or terrorist human so they will have model for both team. Tried this code but it gave bad load like the default one.
Claudio-vip wrote: ↑3 weeks agoThis is my edited version of the plugin, it contains Skins for Admin,Vip and Donator (ACCESS_LEVEL_G) For both Humans and Zombies.Check if is ok for you
Code: Select all
#include <amxmodx> #include <amxmisc> #include <reapi> #include <amx_settings_api> #include <cs_weap_models_api> #include <ze_core> #include <ze_vip> // 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 // Default Models new const szAdminHumanModel[][] = { "vip" } new const szAdminZombieModel[][] = { "zombie_admin" } new const szDonatorHuman[][] = { "human1" } new const szDonatorZombie[][] = { "human2" } new const szVipHuman[][] = { "human3" } new const szVipZombie[][] = { "human4" } // Dynamic Arrays: Models new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_szDonatorHuman, Array:g_szDonatorZombie, Array:g_szVipHuman, Array:g_szVipZombie public plugin_precache() { // Initialize Arrays g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1) g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1) g_szDonatorHuman = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1) g_szDonatorZombie = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1) g_szVipHuman = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1) g_szVipZombie = 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, "Player Models", "DonatorHuman", g_szDonatorHuman) amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "DonatorZombie", g_szDonatorZombie) amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipHuman", g_szVipHuman) amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipZombie", g_szVipZombie) // 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_szDonatorHuman) == 0) { for(iIndex = 0; iIndex < sizeof szDonatorHuman; iIndex++) ArrayPushString(g_szDonatorHuman, szDonatorHuman[iIndex]) // Save to external file amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "DonatorHuman", g_szDonatorHuman) } if(ArraySize(g_szDonatorZombie) == 0) { for(iIndex = 0; iIndex < sizeof szDonatorZombie; iIndex++) ArrayPushString(g_szDonatorZombie, szDonatorZombie[iIndex]) // Save to external file amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "DonatorZombie", g_szDonatorZombie) } if(ArraySize(g_szVipHuman) == 0) { for(iIndex = 0; iIndex < sizeof szVipHuman; iIndex++) ArrayPushString(g_szVipHuman, szVipHuman[iIndex]) // Save to external file amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipHuman", g_szVipHuman) } if(ArraySize(g_szVipZombie) == 0) { for(iIndex = 0; iIndex < sizeof szVipZombie; iIndex++) ArrayPushString(g_szVipZombie, szVipZombie[iIndex]) // Save to external file amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "VipZombie", g_szVipZombie) } // Precache new szPlayerModel[PLAYERMODEL_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_szDonatorHuman); iIndex++) { ArrayGetString(g_szDonatorHuman, iIndex, szPlayerModel, charsmax(szPlayerModel)) formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel) precache_model(szModelPath) } for (iIndex = 0; iIndex < ArraySize(g_szDonatorZombie); iIndex++) { ArrayGetString(g_szDonatorZombie, iIndex, szPlayerModel, charsmax(szPlayerModel)) formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel) precache_model(szModelPath) } for (iIndex = 0; iIndex < ArraySize(g_szVipHuman); iIndex++) { ArrayGetString(g_szVipHuman, iIndex, szPlayerModel, charsmax(szPlayerModel)) formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel) precache_model(szModelPath) } for (iIndex = 0; iIndex < ArraySize(g_szVipZombie); iIndex++) { ArrayGetString(g_szVipZombie, iIndex, szPlayerModel, charsmax(szPlayerModel)) formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel) precache_model(szModelPath) } } public ze_user_humanized(id) { if(ze_is_user_zombie(id) || !is_user_alive(id)) return new szPlayerModel[PLAYERMODEL_MAX_LENGTH] // Player Donator? if(get_user_flags(id) & ADMIN_LEVEL_G) { ArrayGetString(g_szDonatorHuman, random_num(0, ArraySize(g_szDonatorHuman) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(id, szPlayerModel) } else if(ze_is_user_vip(id)) { // Set Admin Human Model ArrayGetString(g_szVipHuman, random_num(0, ArraySize(g_szVipHuman) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(id, szPlayerModel) } else if (get_user_flags(id) & ADMIN_BAN) { // Set Admin Human Model ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 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] // Player Donator? if(get_user_flags(iVictim) & ADMIN_LEVEL_G) { ArrayGetString(g_szDonatorZombie, random_num(0, ArraySize(g_szDonatorZombie) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(iVictim, szPlayerModel) } else if (ze_is_user_vip(iVictim)) { // Set Zombie Admin Model ArrayGetString(g_szVipZombie, random_num(0, ArraySize(g_szVipZombie) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(iVictim, szPlayerModel) } else if(get_user_flags(iVictim) & ADMIN_BAN) { // Set Zombie Admin Model ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(iVictim, szPlayerModel) } }
This one is running but it did not change my model to admin model even though i have full admin flag. (I didnt have vip include, had to change it to another admin flag)
-
- VIP
- Posts: 31
- Joined: 5 years ago
- Location: Romania
- Contact:
I changed the code, Human 1,2,3,4 will be used for admins and will be choosen randomly, What kind of error you get?
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <reapi>
#include <amx_settings_api>
#include <cs_weap_models_api>
#include <ze_core>
#include <ze_vip>
// 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 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"
}
// Dynamic Arrays: Models
new Array: g_szAdminZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel,
Array:g_szHumanModel1, Array:g_szHumanModel2, Array:g_szHumanModel3, Array:g_szHumanModel4
public plugin_precache()
{
// Initialize Arrays
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)
// Load From External File
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)
// Load our Default Values
new iIndex
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)
}
// Precache
new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szModelPath[128]
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_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]
// Player Admin?
if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
{
switch(random_num(0, 130))
{
case 0..30:
{
ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
case 31..70:
{
ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
case 71..100:
{
ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
case 101..130:
{
ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 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
}
}
-
- VIP
- Posts: 31
- Joined: 5 years ago
- Location: Romania
- Contact:
Check if you have other model plugins which may interfere with this plugin.
No i dont have, only rebuild's default models
I think Zombie and Human models already exists in Rebuild, Open zombie_escape.ini
and search on HUMANS =
:, U can use Humans models, Such as this:
- [Player Models]
- HUMANS = terror, sas, urban, gign, leet, guerilla, gsg9, arctic
z0h1r-LK
-
- VIP
- Posts: 31
- Joined: 5 years ago
- Location: Romania
- Contact:
Probably that's why the plugin doesn't work for him. But he asks for random CT/T models for admins.
[ Post made via Android ]
Hey, i think the plugin require the modelnameT.mdl file to exist. My zm model have it but human model does not have that file.
Edit: The problem was due the the model that i use. Working now.
-
- VIP
- Posts: 31
- Joined: 5 years ago
- Location: Romania
- Contact:
You obviously don't know how do models work. Check tutorials on youtube so you can understand how it works.
Check this tutorial so you can have a taste of how the model system works.
Who is online
Users browsing this forum: No registered users and 0 guests