Raised This Month: $ Target: $400
 0% 

Detect Flashbang Throw


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TandborsteN
Member
Join Date: Sep 2008
Old 11-17-2010 , 14:28   Detect Flashbang Throw
Reply With Quote #1

Hi again!

Is there anyway to detect when a player throw an flashbang and then count how many flashbangs the player has throw?

Thanks, TandborsteN^.
__________________
TANDBORSTEN!
TandborsteN is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-17-2010 , 14:32   Re: Detect Flashbang Throw
Reply With Quote #2

csx.inc:
Code:
forward grenade_throw( index,greindex,wId );
IIRC wId is the CSW_* constant.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
TandborsteN
Member
Join Date: Sep 2008
Old 11-17-2010 , 14:39   Re: Detect Flashbang Throw
Reply With Quote #3

So grenade_throw detects WHEN he throws the Flashbang?
And then, should i write something in the plugin_init?
And is it:
PHP Code:
public grenade_throw(identCSW_FLASHBANG) { 
i write in the code?
__________________
TANDBORSTEN!
TandborsteN is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2010 , 14:47   Re: Detect Flashbang Throw
Reply With Quote #4

No need to register, it's already ready, and will be called when a grenade will be thrown.
Code:
public grenade_throw( index, grenadeIndex, weaponId ) {      if( weaponId == CSW_FLASHBANG )      {            //      } }
__________________
Arkshine is offline
TandborsteN
Member
Join Date: Sep 2008
Old 11-17-2010 , 14:48   Re: Detect Flashbang Throw
Reply With Quote #5

Okey, thanks!
Gonna test now ...
__________________
TANDBORSTEN!
TandborsteN 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 16:53.


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