Here is what i tried:
PHP Code:
new Model;
public plugin init()
{
register_forward(FM_AddToFullPack, "fw_AddToFullPack", 1);
}
public plugin_precache()
{
Model = precache_model("models/player/mymodel/mymodel.mdl");
}
public fw_AddToFullPack(es_handle, e, ent, host, hostflags, player, pSet)
{
if(player && is_user_alive(ent))
{
set_es(es_handle, ES_ModelIndex, Model);
}
return FMRES_IGNORED;
}
The player's model is not changed, but when i add
PHP Code:
set_es(es_handle, ES_RenderMode, kRenderTransAdd);
i can see that this part of the code works fine.
Am i using ES_ModelIndex wrong? Or is the problem that i'm testing on podbots? Any ideas?