well, I used different plugin I remade, so this is solved
First code for overriding model with admin model
Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>
#define PLUGIN_NAME "plugin"
#define PLUGIN_VERSION "1"
#define PLUGIN_AUTHOR "author"
#define ADMIN_BAN (1<<3)
new const g_model_for_admin[][] = { "vip_cat" }
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", true)
}
public plugin_precache()
{
for(new index = 0; index < sizeof g_model_for_admin; index++)
{
static patch[128]
formatex(patch, sizeof patch, "models/player/vip_cat/vip_cat.mdl", g_model_for_admin[index], g_model_for_admin[index])
precache_model(patch)
}
}
public fw_PlayerSpawn_Post(iPlayer)
{
if(is_user_alive(iPlayer) && !zp_get_user_zombie(iPlayer) && !zp_get_user_survivor(iPlayer) && (get_user_flags(iPlayer) & ADMIN_BAN))
{
zp_override_user_model(iPlayer, g_model_for_admin[random(sizeof g_model_for_admin)])
}
}
public zp_user_humanized_post(iPlayer, iSurv)
{
if(!iSurv && (get_user_flags(iPlayer) & ADMIN_BAN))
{
zp_override_user_model(iPlayer, g_model_for_admin[random(sizeof g_model_for_admin)])
}
}
This one is overriding admin model that is set in
zombieplague.ini, so adm&vip would be the same models, so you need both to different models for VIP and ADMIN
Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>
#define PLUGIN_NAME "[ZP] Set Model VIP"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "pach2580"
#define ADMIN_RESERVATION (1<<1)
new const g_model_for_vip[][] = { "vip_cat" }
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", true)
}
public plugin_precache()
{
for(new index = 0; index < sizeof g_model_for_vip; index++)
{
static patch[128]
formatex(patch, sizeof patch, "models/player/vip_cat/vip_cat.mdl", g_model_for_vip[index], g_model_for_vip[index])
precache_model(patch)
}
}
public fw_PlayerSpawn_Post(iPlayer)
{
if(is_user_alive(iPlayer) && !zp_get_user_zombie(iPlayer) && !zp_get_user_survivor(iPlayer) && (get_user_flags(iPlayer) & ADMIN_RESERVATION))
{
zp_override_user_model(iPlayer, g_model_for_vip[random(sizeof g_model_for_vip)])
}
}
public zp_user_humanized_post(iPlayer, iSurv)
{
if(!iSurv && (get_user_flags(iPlayer) & ADMIN_RESERVATION))
{
zp_override_user_model(iPlayer, g_model_for_vip[random(sizeof g_model_for_vip)])
}
}
Leaving codes here if some1 like me will face the same problem like I did.
__________________