#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
// CBasePlayerItem
stock m_pPlayer = 41
// CBasePlayer
stock m_iFOV = 363
stock m_iLastZoom = 109
stock m_bResumeZoom = 440 // bool
public plugin_init()
{
register_plugin( "AWP Scope Style", "0.0", "Niko" );
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_g3sg1", "HAM_PrimaryAttack_Pre", 0 );
}
public HAM_PrimaryAttack_Pre( iEnt )
{
new iPlayer = get_pdata_cbase( iEnt, m_pPlayer );
new iFov = pev( iPlayer, pev_fov );
if( iFov != 90 )
{
set_pdata_int( iPlayer, m_bResumeZoom, true);
set_pdata_int( iPlayer, m_iLastZoom, get_pdata_int( iPlayer, m_iFOV ) );
set_pev( iPlayer, pev_fov, 90 );
set_pdata_int( iPlayer, m_iFOV, 90 );
}
}