AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook he & flash explode (https://forums.alliedmods.net/showthread.php?t=253022)

IAmReallyCool 12-13-2014 15:36

Hook he & flash explode
 
How can hook he grenade explosion and flash grenade explosion? Without using orpheu.

NiHiLaNTh 12-13-2014 17:48

Re: Hook he & flash explode
 
if you say w/o orpheu: then you need to hook Think for "grenade" classname (with Hamsandwich is most suitable method), than check if (entity_get_float(grenade, EV_FL_dmgtime) <= get_gametime()) - this is the explosion moment.

As for hegrenade/flashbang detection - there are various ways:
1) by checking the grenade model
2) by checking pev_dmg, but I am not sure if it's safe enough (it might catch smokegrenade)

HamletEagle 12-14-2014 09:23

Re: Hook he & flash explode
 
You have a direct way with orpheu, why you don't want to use it ? I can give you an example if you want.


All times are GMT -4. The time now is 15:31.

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