Instead of being on head, head costume is inside chest, visible only on death, what am I doing wrong
P.S. I am using player models on sever, should I consider them too while applying costumes on them ?
PHP Code:
new costumes[][] = {
"models/cso/devil_head.mdl",
"models/cso/devil_pelvis.mdl"
}
public plugin_precache()
{
for(new i = 0; i < sizeof costumes; i++) {
engfunc(EngFunc_PrecacheModel, costumes[i])
}
}
public client_putinserver(id)
{
set_task(0.1, "set_costume", id)
}
public set_costume(id)
{
for(new i = 0; i < sizeof costumes; i++) {
new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
set_pev(ent, pev_movetype, MOVETYPE_FOLLOW)
set_pev(ent, pev_aiment, id)
set_pev(ent, pev_rendermode, kRenderNormal)
engfunc(EngFunc_SetModel, ent, costumes[i])
set_pev(ent, pev_body, 0)
set_pev(ent, pev_sequence, 0)
set_pev(ent, pev_animtime, get_gametime())
set_pev(ent, pev_framerate, 1.0)
}
return PLUGIN_HANDLED
}
Well, everything is misplaced and acting wrong on left/right rotation and duck, here's how it looks now
__________________