weapon sequence is the viewmodel sequence .
PHP Code:
int active_weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");
if(active_weapon == -1)
return Plugin_Handled;
int m_nSequence = GetEntProp(active_weapon,Prop_Send,"m_nSequence");//this is viewmodel sequence , can find in v_model.mdl in modelviewer
Now i am sure that weapon can't play an undefined activity in v_model.mdl , such as knife play an axe slah animate .
If want to change the animate , simpliy do that
PHP Code:
int viewmodel = GetEntPropEnt(client, Prop_Send, "m_hViewModel");
SetEntProp(viewmodel ,Prop_Send,"m_nLayerSequence",index);//index is not the m_nSequence above , you need get prop first , and then select an animate you want and set prop.
PS : Valve Developer Commuity show that :
Come from this- All CBaseAnimating entities can play an animation.
So the other way is that detour SelectWeightedSequence(Activity) like AnimHookEnable() do in left4dhook .
It should be include weapon entity . (use cl_pdump entity to see an entity prop , melee_weapon is inherits from CBaseAnimating )
And I have another question is that can we invert an animate which has been defined and make it play ?
need some help!