it has to be in fw_SetModel !
example from another plugin :
Code:
public fw_SetModel(entity, const model[])
{
// We don't care
if (strlen(model) < 8)
return FMRES_IGNORED
// Get entity's classname
static classname[10]
pev(entity, pev_classname, classname, charsmax(classname))
// Narrow down our matches a bit
if (model[7] != 'w' || model[8] != '_')
return FMRES_IGNORED
// Get damage time of grenade
static Float:dmgtime
pev(entity, pev_dmgtime, dmgtime)
// Grenade not yet thrown
if (dmgtime == 0.0)
return FMRES_IGNORED
if (model[9] == 'h' && model[10] == 'e')
{
engfunc(EngFunc_SetModel, entity, "w_ model for the hebomb . mdl")
return FMRES_SUPERCEDE
}
else if (model[9] == 'f' && model[10] == 'l')
{
engfunc(EngFunc_SetModel, entity, "w_ model for the flashbang . mdl")
return FMRES_SUPERCEDE
}
else if (model[9] == 's' && model[10] == 'm')
{
engfunc(EngFunc_SetModel, entity, "w_ model for the smoke . mdl")
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}