You can find the current weapon with get_user_weapon:
http://www.amxmodx.org/funcwiki.php?go=func&id=156
and here's an example of how i would check if the player is firing a weapon
Code:
new checkammo[33]
public client_PostThink(id)
{
new iwpn, wclip, wammo
iwpn = get_user_weapon(id,wclip,wammo)
if(entity_get_int(id,EV_INT_button) & ~IN_ATTACK && iwpn != 13) // if the player is holding the firing button
//i don't know which number is crossbow
{
//If the clip isn't 0 (empty clip) and isn't the same number as the last time we checked
if (wclip != 0 && wclip != checkammo[id]){
checkammo[id] = wclip
//you can add the effect here.
}
}
}
__________________