Raised This Month: $ Target: $400
 0% 

how to detect when player pull pin from grenade?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-04-2012 , 00:30   how to detect when player pull pin from grenade?
Reply With Quote #1

Hello, today I'm very early on here ( happens! )

Anyway...
how to detect when player pull pin from grenade?
Thanks!
.Dare Devil. is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-04-2012 , 01:15   Re: how to detect when player pull pin from grenade?
Reply With Quote #2

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.
Attached Thumbnails
Click image for larger version

Name:	700-02080529.jpg
Views:	126
Size:	31.9 KB
ID:	103117  
__________________

Last edited by claudiuhks; 05-04-2012 at 01:17.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 05-04-2012 , 01:46   Re: how to detect when player pull pin from grenade?
Reply With Quote #3

Couldnt you hook cmdstart (or something) and check if the weapon is a nade and if in_attack is pressed?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-04-2012 , 03:47   Re: how to detect when player pull pin from grenade?
Reply With Quote #4

Quote:
Originally Posted by mottzi View Post
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?

Last edited by .Dare Devil.; 05-04-2012 at 03:47.
.Dare Devil. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-04-2012 , 03:46   Re: how to detect when player pull pin from grenade?
Reply With Quote #5

See the code source and figure out yourself. Tip : m_flReleaseThrow/m_flStartThrow.
__________________
Arkshine is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-04-2012 , 04:07   Re: how to detect when player pull pin from grenade?
Reply With Quote #6

Quote:
Originally Posted by Arkshine View Post
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.

Last edited by .Dare Devil.; 05-04-2012 at 04:11.
.Dare Devil. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-04-2012 , 04:54   Re: how to detect when player pull pin from grenade?
Reply With Quote #7

So I guess you don't understand the code.
__________________
Arkshine is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-04-2012 , 06:39   Re: how to detect when player pull pin from grenade?
Reply With Quote #8

Quote:
Originally Posted by Arkshine View Post
So I guess you don't understand the code.
already get it
.Dare Devil. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-04-2012 , 08:24   Re: how to detect when player pull pin from grenade?
Reply With Quote #9

It seems not. You need to check the offsets in PrimaryAttack, and if you check here, it means obviously you're holding the grenade.
__________________
Arkshine is offline
Reply



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 00:27.


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