/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new bool:g_bInfiniteBullets[ 33 ]
enum
{
CurWeapon_IsActive = 1, // byte
CurWeapon_WeaponID, // byte
CurWeapon_ClipAmmo // byte
}
#define XO_WEAPON 4
#define m_iClip 51
#define m_iClientClip 52
#define m_pActiveItem 373
new const g_iMaxClip[CSW_P90+1] = {
-1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30,
20, 25, 30, 35, 25, 12, 20, 10, 30, 100,
8 , 30, 30, 20, 2, 7, 30, 30, -1, 50
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_message( get_user_msgid( "CurWeapon" ), "event_curweapon" );
register_clcmd("say /vipmenu","cmdVip");
}
public event_curweapon( iMsgId, iMsgDest, id )
{
if ( get_msg_arg_int( CurWeapon_IsActive ) && g_bInfiniteBullets[ id ] )
{
new iMaxClip = g_iMaxClip[ get_msg_arg_int( CurWeapon_WeaponID ) ];
if( get_msg_arg_int(CurWeapon_ClipAmmo) < iMaxClip )
{
new iWeapon = get_pdata_cbase( id, m_pActiveItem );
if ( iWeapon > 0 )
{
set_pdata_int( iWeapon, m_iClip, iMaxClip, XO_WEAPON );
set_pdata_int( iWeapon, m_iClientClip, iMaxClip, XO_WEAPON );
set_msg_arg_int( CurWeapon_ClipAmmo, ARG_BYTE, iMaxClip );
}
}
}
}