AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to detect when player pull pin from grenade? (https://forums.alliedmods.net/showthread.php?t=184346)

.Dare Devil. 05-04-2012 00:30

how to detect when player pull pin from grenade?
 
Hello, today I'm very early on here ( happens! :) )

Anyway...
how to detect when player pull pin from grenade? :):)
Thanks!

claudiuhks 05-04-2012 01:15

Re: how to detect when player pull pin from grenade?
 
1 Attachment(s)
If you are referring at (see attachment), I think that's not an event in game, that's only an animation by weapon's model.

mottzi 05-04-2012 01:46

Re: how to detect when player pull pin from grenade?
 
Couldnt you hook cmdstart (or something) and check if the weapon is a nade and if in_attack is pressed?

Arkshine 05-04-2012 03:46

Re: how to detect when player pull pin from grenade?
 
See the code source and figure out yourself. Tip : m_flReleaseThrow/m_flStartThrow.

.Dare Devil. 05-04-2012 03:47

Re: how to detect when player pull pin from grenade?
 
Quote:

Originally Posted by mottzi (Post 1701751)
Couldnt you hook cmdstart (or something) and check if the weapon is a nade and if in_attack is pressed?

i know how to hook cmdstart and then check if in_attack is pressed but there are some problems.
I need to check if player hold in hand grenade, so how do i check that?

.Dare Devil. 05-04-2012 04:07

Re: how to detect when player pull pin from grenade?
 
Quote:

Originally Posted by Arkshine (Post 1701780)
See the code source and figure out yourself. Tip : m_flReleaseThrow/m_flStartThrow.

but i still need to check if player hold grenade in hands.

Arkshine 05-04-2012 04:54

Re: how to detect when player pull pin from grenade?
 
So I guess you don't understand the code.

.Dare Devil. 05-04-2012 06:39

Re: how to detect when player pull pin from grenade?
 
Quote:

Originally Posted by Arkshine (Post 1701799)
So I guess you don't understand the code.

already get it :)

Arkshine 05-04-2012 08:24

Re: how to detect when player pull pin from grenade?
 
It seems not. You need to check the offsets in PrimaryAttack, and if you check here, it means obviously you're holding the grenade.


All times are GMT -4. The time now is 00:27.

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