Hi, I've a problem with a plugin. I'm making a new knife, for that reason I block the primary and secondary attack by setting m_flNextPrimaryAttack and others, to get_gametime() + 999.0, so the player can't attack, and then I hook cmdstart for improve the next attack when IN_ATTACK button is pressed.
All things are ok, the attack, the tracelines, the takedamage, but now, I am trying to play player animation because the player stays like he isn't attacking.
I tried with this code, in the code when user pressed IN_ATTACK button:
Like Arkshine said:
PHP Code:
const ACT_RANGE_ATTACK1 = 28;
const m_Activity = 73;
set_pdata_int( id, m_Activity, ACT_RANGE_ATTACK1 );
set_pev( id, pev_sequence, YOUR_SEQUENCE )
set_pev( id, pev_animtime, get_gametime() );
set_pev( id, pev_frame, 0 );
set_pev( id, pev_framerate, 1.0 );
But, when I walk, the animation doesn't play, I think it is because the WALK activity replace this activity in the next frame.
I thought implementing Orpheu ( CBasePlayer::SetAnimation() ), I tried but I can't achieve this. Maybe anyone can help me?
Greetings.
__________________