PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#define VERSION "0.0.1"
#define PLUGIN ""
#define XO_PLAYER 5
#define m_afButtonPressed 246
#define m_pActiveItem 373
#define XO_WEAPON 4
#define m_fInReload 54
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "ConnorMcLeod")
}
public client_PostThink(id)
{
if( is_user_alive( id ) && get_pdata_int(id, m_afButtonPressed, XO_PLAYER) & IN_RELOAD )
{
new iWeapon = get_pdata_cbase(id, m_pActiveItem, XO_PLAYER)
if( iWeapon > 0 )
{
set_pdata_int(iWeapon, m_fInReload, 1, XO_WEAPON)
set_pev(id, pev_button, pev(id, pev_button) & ~IN_RELOAD)
}
}
}
__________________