Please check this code - to me, it looks fine, but my server will not start. Looking to replace the default CS models with Christmas models.
Code:
#include <amxmodx>
#include <fakemeta>
#define TREE "models/c14-cristmastree.mdl"
#define ARCTIC "models/player/arctic/arctic.mdl"
#define GUERILLA "models/player/guerilla/guerilla.mdl"
#define LEET "models/player/leet/leet.mdl"
#define MILITIA "models/player/militia/militia.mdl"
#define TERROR "models/player/terror/terror.mdl"
public plugin_init()
{
register_plugin("Model replacement (christmas)","0.10","Avalanche");
register_forward(FM_SetModel,"fw_setmodel");
}
public plugin_precache()
{
precache_model(TREE);
precache_model(ARCTIC);
precache_model(GUERILLA);
precache_model(LEET);
precache_model(MILITIA);
precache_model(TERROR);
}
public fw_setmodel(ent,model[])
{
if(equali(model,"models/w_c4.mdl"))
{
engfunc(EngFunc_SetModel,ent,TREE);
return FMRES_SUPERCEDE;
}
if(equali(model,"models/player/arctic/arctic.mdl"))
{
engfunc(EngFunc_SetModel,ent,ARCTIC);
return FMRES_SUPERCEDE;
}
if(equali(model,"models/player/guerilla/guerilla.mdl"))
{
engfunc(EngFunc_SetModel,ent,GUERILLA);
return FMRES_SUPERCEDE;
}
if(equali(model,"models/player/leet/leet.mdl"))
{
engfunc(EngFunc_SetModel,ent,LEET);
return FMRES_SUPERCEDE;
}
if(equali(model,"models/player/militia/militia.mdl"))
{
engfunc(EngFunc_SetModel,ent,MILITIA);
return FMRES_SUPERCEDE;
}
if(equali(model,"models/player/terror/terror.mdl"))
{
engfunc(EngFunc_SetModel,ent,TERROR);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
it's from avalanche but I modified it to do more than one model.
Slmclarengt
__________________