AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detect Flashbang Throw (https://forums.alliedmods.net/showthread.php?t=143288)

TandborsteN 11-17-2010 14:28

Detect Flashbang Throw
 
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^.

Emp` 11-17-2010 14:32

Re: Detect Flashbang Throw
 
csx.inc:
Code:

forward grenade_throw( index,greindex,wId );
IIRC wId is the CSW_* constant.

TandborsteN 11-17-2010 14:39

Re: Detect Flashbang Throw
 
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?

Arkshine 11-17-2010 14:47

Re: Detect Flashbang Throw
 
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 )      {            //      } }

TandborsteN 11-17-2010 14:48

Re: Detect Flashbang Throw
 
Okey, thanks! :)
Gonna test now ...


All times are GMT -4. The time now is 11:28.

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