I've never witnessed Ham_PrimaryAttack written in this way...
Use this.
Code:
public fw_PrimaryAttack_Post(entity)
{
if (!pev_valid(entity))
return;
new id = get_pdata_cbase(entity, 41, 4)
if (!is_user_alive(id))
return;
set_pev(id, pev_punchangle, get_pcvar_float(cvar_glock_recoil));
}
Returning values in a forward-type post will not result in anything, so I guess you don't need it.
Another observation, if you want to block the attack if the weapon does not have ammunition, you must register ham attack again but pre (0), run the Ammo check and return HAM_SUPERCEDE if the value is less than 1.
__________________