Title ?
I tried with:
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#define m_fInReload 54
#define m_fAttack 83
#define m_Linux 4
//#define m_fInSpecialReload 55
#define MAX_PLAYERS 32
const NO_RELOAD = ( 1 << 2 ) | ( 1 << CSW_KNIFE ) | ( 1 << CSW_C4 ) | ( 1 << CSW_M3 ) | ( 1 << CSW_XM1014 ) | ( 1 << CSW_HEGRENADE ) | ( 1 << CSW_FLASHBANG ) | ( 1 << CSW_SMOKEGRENADE )
new g_iHas[ MAX_PLAYERS+1 ]
public plugin_init()
{
new szWeaponName[ 20 ]
for( new i = CSW_P228; i <= CSW_P90; i++ )
{
if( NO_RELOAD & (1<<i) )
continue
get_weaponname( i, szWeaponName, charsmax( szWeaponName ) )
RegisterHam( Ham_Weapon_Reload, szWeaponName, "FwdHamWeaponReload" )
}
register_clcmd( "get", "get" )
}
public get( id )
{
g_iHas[ id ] = !g_iHas[ id ]
}
public FwdHamWeaponReload( const iWeapon )
{
static id
id = pev( iWeapon, pev_owner )
if( id && g_iHas[ id ] && is_user_alive( id ) && get_pdata_int( iWeapon, m_fInReload, m_Linux ) )
{
set_pdata_float( iWeapon, m_fInReload, 0.0, m_Linux )
set_pdata_float( iWeapon, m_fAttack, 0.0, m_Linux )
}
}
Doesn't work on linux server.