Ok so My CT medic's have a backpack and my T's should have a thighpack how ever when i use the following code it places it between their legs.... yeah.
So umm any ideas on how to attatch it in the right spot?
PHP Code:
public SetModel(taskid)
{
new id = taskid;
new team = get_user_team(id);
switch(team)
{
case 1:
{
new ent = create_entity("info_target");
if ( pev_valid(ent) )
{
engfunc(EngFunc_SetModel, ent, g_T_medic);
set_pev(ent, pev_movetype, MOVETYPE_FOLLOW);
set_pev(ent, pev_aiment, id);
g_entT[id] = ent;
}
}
case 2:
{
new ent = create_entity("info_target");
if ( pev_valid(ent) )
{
engfunc(EngFunc_SetModel, ent, g_CT_medic);
set_pev(ent, pev_movetype, MOVETYPE_FOLLOW);
set_pev(ent, pev_aiment, id);
g_entCT[id] = ent;
}
}
}
}
Update: I think i know the issue it need to find a model that is like the defuse kits on the players not the w_defuse but the v_ or p_ which ever is on the player models.