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-17-2013 , 03:25   Re: Check and give weapons inaccuracy...
Reply With Quote #5

Quote:
Originally Posted by Unkolix View Post
That's something that I am looking for, but shouldn't player not have the grenade after grenade very recently thrown?
For some reasons which I don't know, user_has_weapon returns still true very recently. I'm using it to drop nades on players death accordingly. Sometimes a grenade got dropped although the grenade explode. As you noticed it is a small time window but it happens too often to ignore it. I don't have any issues after I've used suggested check.

Not sure about pev_weapons as Connor suggested, never tested with pev_weapons


EDIT: LOL I just realized I could check the animation, what there happens
iAnimation == 1: Sequence name is "pullpin"
iAnimation == 2: Sequence name is "thrown"

The player has still the grenade in his hands, the grenade is not flying. user_has_weapon (for non- and active weapons) must return true like get_user_weapon (for active weapon only). According to this, pev_weapons should ... must also return true. So you will need to check for active weapon and those animations.

But you can abort the pullpin if you change to another weapon, not sure if you are able to switch to another weapon if you are throwing the nade right in this moment. Maybe you want to check only for animation 2 then. Trial and error ;)
__________________
  • 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:40.
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