I don't think if this would be any use.. but.. Instead of having to use the ESF model module.
This stock may or may not work. (Just to make it easier on the people, instead of having to install the module)
Code:
/* ESF Model Changer Stock
* Module from Jinto
* Stock by: Drak
*/
#if defined _ESF_Model_Include
#endinput
#endif
#define _ESF_Model_Include
#include <fakemeta>
stock bool:bSet[33]
stock szModel[33][256]
stock esf_set_model(id, const model[])
{
if(!id || !is_user_connected(id))
return 0
bSet[id] = true
formatex(szModel[id],255,"%s",model);
return 1
}
stock esf_clear_model(id)
{
if(!id || !is_user_connected(id))
return 0
bSet[id] = false
return 1
}
stock ESF_MODEL_START()
{
for(new i=0;i<32;i++)
{
bSet[i] = false;
}
register_forward(FM_StartFrame,"StartFrame");
}
public StartFrame()
{
new ent
while(( ent = engfunc(EngFunc_FindEntityByString,"classname","player")) != 0)
{
if(bSet[ent] == true)
{
set_pev(ent,pev_modelindex,szModel[ent]);
set_pev(ent,pev_model,szModel[ent]);
}
}
return FMRES_HANDLED
}
NOTE:You must call "ESF_MODEL_START" in plugin_init().
__________________