@ Celena Luna, here is the final proof that Ham_Weapon_PrimaryAttack_<Pre> is not better, it counts player is shooting when has no bullets.
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#define valid(id) (id == clamp(id,1,33))
#define NOSHOT (1<<0 | 1<<4 | 1<<6 | 1<<9 | 1<<25 | 1<<29)
new shot_count;
public plugin_init() {
register_plugin("Shot Hook","1.0","WATCH_DOGS UNITED")
new weapon_name[20]
for(new i = CSW_P228; i <= CSW_P90; i++) {
if(get_weaponname(i,weapon_name,charsmax(weapon_name)) && !(NOSHOT & 1<<i))
RegisterHam(Ham_Weapon_PrimaryAttack,weapon_name,"Ham_Weapon_PrimaryAttack_Pre")
}
register_forward(FM_TraceLine,"Real_Time_Debug",1)
}
public Ham_Weapon_PrimaryAttack_Pre()
shot_count++
public Real_Time_Debug(const Float:start[3],Float:dest[3],HIT_PARAM,id,ptr) {
if(valid(id))
client_print(id,print_chat,"SHOTS: %d",shot_count)
}
@JusTGo, we will take a look. Thanks!
EDIT:
Could you provide a link?