I'm not sure it's possible to hide just the clip ammo. You could possibly make it display 0 or some constant value.
I was thinking HideWeapon message, but this hides other things in addition to ammo.
Code:
1 (1<<0) - crosshair, ammo, weapons list
2 (1<<1) - flashlight, +
4 (1<<2) - ALL
8 (1<<3) - radar, health, armor, +
16 (1<<4) - timer, +
32 (1<<5) - money, +
64 (1<<6) - crosshair
128 (1<<7) - +
This will show clip as always 0 (or whatever you want it to show as) and subtract from bpammo as shots are fired. It needs a little work but it's something to start with:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define m_pActiveItem 373
const WeaponType = CSW_GLOCK18; //Weapon that you want this plugin to apply to
const DisplayClip = 0; //Clip ammo that will display regardless of actual contents
enum _:CurWeaponArgs
{
IsActive = 1,
WeaponID,
ClipAmmo
}
public plugin_init()
{
register_message( get_user_msgid( "CurWeapon" ) , "CurWeapon" );
}
public CurWeapon( msg_id , msg_dest , msg_entity )
{
new iClip , iBP , iWeaponEnt;
if ( ( get_msg_arg_int( IsActive ) == 1 ) && ( get_msg_arg_int( WeaponID ) == WeaponType ) )
{
get_user_ammo( msg_entity , WeaponType , iClip , iBP );
iWeaponEnt = get_pdata_cbase( msg_entity , m_pActiveItem );
if ( iBP >= 1 )
{
cs_set_user_bpammo( msg_entity , WeaponType , --iBP );
cs_set_weapon_ammo( iWeaponEnt , 40 );
}
else
{
cs_set_weapon_ammo( iWeaponEnt , 0 );
}
set_msg_arg_int( ClipAmmo , 0 , DisplayClip );
}
}
__________________