Raised This Month: $ Target: $400
 0% 

Check and give weapons inaccuracy...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 04-16-2013 , 17:00   Re: Check and give weapons inaccuracy...
Reply With Quote #2

I assume you use the menu very fast? If so then you should notice this behavior for all grenade types.

Take a look below. I'm using this code to check for grenades on players death accordingly so take it just as an idea.

PHP Code:
            new iAmmo cs_get_user_bpammo(idCSW_HEGRENADE)

            
// = 1 pullpin (animation is played if you press +attack)
            // = 2 thrown (animation is played if you release +attack) 
            // get_user_weapon (active weapon) and user_has_weapon  (including non-active weapons) will return true because the grenade is  still in your hand.
            
new iAnimation pev(idpev_weaponanim)
            if (
get_user_weapon(id) == CSW_HEGRENADE && (iAnimation == || iAnimation == 2iAmmo--
            if (
iAmmo 0client_print(0print_chat"Player has still a grenade"
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 04-17-2013 at 03:53.
Leon M. 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 10:56.


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