Raised This Month: $ Target: $400
 0% 

Add effects when I shot with a gun. [please help me]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-18-2007 , 06:17   Re: Add effects when I shot with a gun. [please help me]
Reply With Quote #4

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.  } } }
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode