Hello, I want to change the ROF of scout, it's working fine but if I shoot while zoom is activeted and then change to other weapon, the fov continue. I am using Arkshine code:
Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
const m_pPlayer = 41;
const m_flPrimaryAttack = 46;
const m_iFOV = 363;
const m_iClientFOV = 364;
new pCvarRof;
public plugin_init ()
{
register_plugin( "Custom Scout ROF", "1.0.0" , "Arkshine" );
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_scout", "CScout_PrimaryAttack", 1 );
pCvarRof = register_cvar( "scout_rof", "0.25" );
}
public CScout_PrimaryAttack ( const Entity )
{
static Player;
Player = get_pdata_cbase( Entity, m_pPlayer );
set_pdata_int( Player, m_iClientFOV, get_pdata_int( Player, m_iFOV ) );
set_pdata_float( Entity, m_flPrimaryAttack, get_pcvar_float( pCvarRof ), 4 );
}
__________________