Hello guys, i have a probleme, i use v_ with submodels(body) and is work ok but on fire(+attack) body is set to 2.I want your help to stop changing body on fire, i try with postframe+preframe+etc not work.. the same probleme
Probleme:
https://im3.ezgif.com/tmp/ezgif-3-b31f001e2ea2.gif
Code:
#include <amxmodx>
#include <reapi>
#include <hamsandwich>
#include <fakemeta>
public plugin_init()
{
register_plugin("Cloak Test", "1.0", "Crazy");
RegisterHam(Ham_Item_Deploy, "weapon_m4a1", "CKnife_Deploy")
RegisterHam(Ham_Item_PreFrame, "weapon_m4a1", "CKnife_Deploys")
RegisterHam(Ham_Item_PostFrame, "weapon_m4a1", "CKnife_Deploys")
register_forward(FM_CanSkipPlayer, "CBasePlayer_CanSkip");
}
public CBasePlayer_CanSkip(this)
{
if (!is_user_alive(this))
return FMRES_IGNORED;
if (get_user_weapon(this) != CSW_KNIFE)
return FMRES_IGNORED;
forward_return(FMV_CELL, false);
return FMRES_OVERRIDE;
}
public CKnife_Deploys(this)
{
set_entvar(this, var_weaponanim, 0);
set_entvar(this, var_body, 4);
set_entvar(this, var_skin, 4);
set_entvar(this, var_sequence, 0);
set_entvar(get_pdata_cbase(this, 41, 4), var_weaponanim, 0);
}
public CKnife_Deploy(this)
{
set_entvar(this, var_weaponanim, 0);
set_entvar(this, var_body, 4);
set_entvar(this, var_skin, 4);
set_entvar(this, var_sequence, 0);
set_entvar(get_pdata_cbase(this, 41, 4), var_weaponanim, 0);
}