Quote:
Originally Posted by Unkolix
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 ;)
__________________