I have a feeling that this is for your zombie mod so....
Code:
#include <cstrike>
#include <fakemeta>
new MODEL[256], zombie_model
public plugin_init() {
zombie_model = register_cvar("zs_model","zombieswarm")
register_forward(FM_ClientUserInfoChanged,"fw_info")
register_forward(FM_PlayerPostThink,"fw_postthink")
}
public fw_info(id,buffer) {
if (g_human[id])
return FMRES_IGNORED
if (g_zombie[id])
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
public fw_postthink(id) {
if (!is_user_alive(id))
return FMRES_IGNORED
if (g_Zombie[id]) {
new szModel[33]
get_pcvar_string(zombie_model, MODEL, 255)
cs_get_user_model(id, szModel, 32)
if (containi(szModel, MODEL) !=-1 )
return FMRES_IGNORED
new info = engfunc(EngFunc_GetInfoKeyBuffer, id)
engfunc(EngFunc_SetClientKeyValue, id, info, "model", MODEL)
return FMRES_IGNORED
}
return FMRES_IGNORED
}
__________________