Raised This Month: $ Target: $400
 0% 

Smoke grenade explosion delay + finding players in radius [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-26-2014 , 15:41   Re: Hallelujah nade - base questions about nade entities
Reply With Quote #1

1. You mean the moment right before nade explosion ? If so you can hook CGrenade::SG_Detonate() as pre with orpheu and remove the entity there, then spawn another one in it's place. If you don't want to work with orpheu or you don't know I may give you the code or you can use FM_EmitSound too, but it's not a good ideea since you have the direct way with orpheu. You can also hook CGrenade::SG_Detonate() as post, block the smokegrenade effect and use m_SGExplosionPos offset to get it's origin, then spawn your new grenade with this origins.
2. When you create your new nade entity set pev_dmgtime to a higer value so it will explode x seconds later.
3. If you want to set a damage in a specific radius use find_sphere_class( it works like get_players and give you an array of players) then use ExecuteHam(Ham_TakeDamage,...) in the for loop.
About the circle, you mean like an wave that starts from nade origin and go to the "end point" of the radius ? If so, look for TE_BEAMCYLINDER

The function that create the c4(grenade entity) is CGrenade::ShootSatchelCharge(), it can be hooked and you can create very easy a planted c4. I would like to know if this can be done with a smokegrenade too(maybe two minutes of searching into the cssdk but I'm too lazy now).

Glad to see you back :d
__________________

Last edited by HamletEagle; 12-26-2014 at 15:49.
HamletEagle 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 15:21.


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