Either call SetAnimation with Orpheu or use KORD_12.7 stock
Just use it like that: SetAnimation(id, ACT_RANGE_ATTACK1)
Code:
const ACT_RANGE_ATTACK1 = 28;
const ACT_RELOAD = 32;
SetAnimation( pPlayer, pActivity )
{
if( pev_valid( pPlayer ) != PDATA_SAFE )
return;
#define ACT_SWIM 6
#define ACT_LEAP 8
#define ACT_HOVER 50
// CBaseAnimating
const m_flFrameRate = 36;
const m_flGroundSpeed = 37;
const m_flLastEventCheck = 38;
const m_fSequenceFinished = 39;
const m_fSequenceLoops = 40;
// CBaseMonster
const m_Activity = 73;
const m_IdealActivity = 74;
new iAnimDesired, iActivity = get_pdata_int( pPlayer, m_Activity, 5 );
if( iActivity == ACT_SWIM || iActivity == ACT_LEAP || iActivity == ACT_HOVER )
{
return;
}
new szAnim[ 64 ], Float:flFrameRate, Float:tTime
get_pdata_string( pPlayer, m_szAnimExtention, szAnim, charsmax( szAnim ), 0, 20 );
tTime = get_gametime( );
if( pActivity == ACT_RANGE_ATTACK1 )
{
format( szAnim, charsmax( szAnim ), ( entity_get_int( pPlayer, EV_INT_flags ) & FL_DUCKING ) ? "crouch_shoot_%s" : "ref_shoot_%s", szAnim );
}
else if( pActivity == ACT_RELOAD )
{
format( szAnim, charsmax( szAnim ), ( entity_get_int( pPlayer, EV_INT_flags ) & FL_DUCKING ) ? "crouch_reload_%s" : "ref_reload_%s", szAnim );
}
if( ( iAnimDesired = lookup_sequence( pPlayer, szAnim, flFrameRate ) ) == -1 )
{
iAnimDesired = 0;
}
entity_set_float( pPlayer, EV_FL_frame, 0.0 );
entity_set_float( pPlayer, EV_FL_framerate, 1.0 );
entity_set_int( pPlayer, EV_INT_sequence, iAnimDesired );
entity_set_float( pPlayer, EV_FL_animtime, tTime );
set_pdata_int( pPlayer, m_fSequenceLoops, 0, 4 );
set_pdata_int( pPlayer, m_fSequenceFinished, 0, 4 );
set_pdata_int( pPlayer, m_Activity, pActivity, 5 );
set_pdata_int( pPlayer, m_IdealActivity, pActivity, 5 );
set_pdata_float( pPlayer, m_flGroundSpeed, 0.0, 4 );
set_pdata_float( pPlayer, m_flFrameRate, flFrameRate, 4 );
set_pdata_float( pPlayer, m_flLastEventCheck, tTime, 4 );
}
__________________