Raised This Month: $12 Target: $400
 3% 

Super Destructive Grenades V2


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Arkshine (91)
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-04-2011 , 00:49   Super Destructive Grenades V2
Reply With Quote #1

Super Destructive Grenades
Version 2.1.0
By hornet

Description

This plugin sends weapons flying and knocks back players when a HE Grenade explodes in its vacinity. It also damages / destroys breakable entities including entities that are destroyed when the bomb goes off.

Last updated: May 31st, 2013

CVar:
  • sdg_breakables_damage
-Damage HE Grenade inflicts on surrounding breakable entities
  • sdg_explode_radius
-HE Grenade explosion radius for surrounding entities
  • sdg_break_mode <0|1|2>
-0 to disable functionaliy, 1 to damage breakable entities, 2 to always destroy them including bomb targeted entities
  • sdg_knockback_player
-The power amount used to knock back surrounding players
  • sdg_knockback_weapons
-The power amount used to knock back surrounding weapon entities
  • sdg_through_walls

    -Determines whether knockback will occur through solid objects [ Default 0 ]

Custom Modules Required

Installation
  • Have Orpheu Module installed ( see link in Required Modules )
  • Extract CGrenade folder into cstrike/addons/amxmodx/configs/orpheu/functions/

Credits
  • Arkshine - CGrenade::Detonate3 signature.

Changelog:


Quote:
2.1.0 [ 8/3/14 ] Cvar added for knockback through walls.

2.0.1 [ 31/5/13 ] Safety check added. Small efficiency revision.

2.0.0 [ 29/5/13 ] Huge update.
  • Grenades now use a radius damage formula to inflict damage on breakable entities
  • All weapon entities on the ground are now knocked back by grenade explosions
  • Players are now knocked back by grenade explosions ( obeys friendly fire )
Quote:
1.1.0 Plugin now uses Orpheu module for maximum efficiency. Also considers bomb targeted entities.
1.0.0 Inital Release
Attached Thumbnails
Click image for larger version

Name:	nade_weapons.jpg
Views:	4302
Size:	57.7 KB
ID:	120435  
Attached Files
File Type: sma Get Plugin or Get Source (super_destructive_grenades_v2.sma - 1215 views - 6.2 KB)
File Type: sma Get Plugin or Get Source (super_destructive_grenades_v21.sma - 2866 views - 6.5 KB)
File Type: zip CGrenade.zip (475 Bytes, 1530 views)
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 03-08-2014 at 20:30.
hornet is offline
juan2394
Member
Join Date: Sep 2010
Old 08-04-2011 , 01:55   Re: HE Explosions Destroy Breakables
Reply With Quote #2

Cool!
juan2394 is offline
Old 08-04-2011, 02:03
BodyBuilder
This message has been deleted by BodyBuilder.
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-04-2011 , 02:04   Re: HE Explosions Destroy Breakables
Reply With Quote #3

Good job.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-04-2011 , 05:55   Re: HE Explosions Destroy Breakables
Reply With Quote #4

Awesome.
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Old 08-04-2011, 05:56
xPaw
This message has been deleted by xPaw.
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-04-2011 , 06:54   Re: HE Explosions Destroy Breakables
Reply With Quote #5

Shouldn't you check if the breakable is meant to be broken ? For example, the crates on de_dust2 are breakable but they only break when C4 explodes due to a trigger, will your plugin break those ?

Still... doesn't HE already break stuff on explosion, like glass... ?
__________________
Hunter-Digital is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-04-2011 , 08:10   Re: HE Explosions Destroy Breakables
Reply With Quote #6

Dunno if it only breaks on touch or also when explode.
I think there should be a better way that Think to detect explosion.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2011 , 09:10   Re: HE Explosions Destroy Breakables
Reply With Quote #7

To detect HE grenade explosion, there are not much ways :

Using Orpheu :

- Hooking CGrenade::Detonate3() or CGrenade::Explode3() : The most efficient/reliable method.

Without Orpheu :

- Checking exploding time with pev_dmgtime by hooking "grenade" think. Method is acceptable, though forward will be called until the grenade dies, not cool.
- Using grenade_throw forward, setting a set_task or next think of a dummy entity, to (pev_dmgtime - gametime) seconds. Not a good way, because we don't know if the grenade has really exploded.
- Hooking TE_EXPLOSION (There is 2 messages) with register_event (SVC_TEMPENTITY). "1=3" "6=25" "7=30" "8=0". Not a good way since you need the grenade entity index and it could be thrown for another purpose.
- Using grenade_throw forward, hooking FM_EmitSound, checking "weapons/debris1.wav" + "weapons/debris2.wav" + "weapons/debris3.wav" + checking the grenade is well a grenade and unregistering FM_EmitSound. Not bad.

Of course, I would use Orpheu. :mrgreen:
Without Orpheu, between, dmgtime and emitsound, I guess the latter would fairly good.
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-04-2011 , 09:33   Re: HE Explosions Destroy Breakables
Reply With Quote #8

If you keep fm_cs_get_grenade_type, put the c4 check back ;), and don't bother with the 3 nades types, once the c4 check passed, only check for HE ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2011 , 15:24   Re: HE Explosions Destroy Breakables
Reply With Quote #9

Normally the c4 check is not required since the offset is different.

Considering that and since m_usEvent is set when a grenade spawns only, it means that checking if it's a C4 before is not needed. Checking m_usEvent & 1 (or 1<<0) should be enough.
__________________
Arkshine is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-04-2011 , 19:12   Re: HE Explosions Destroy Breakables
Reply With Quote #10

Oh nvm, I just tested on de_prodigy, HE grenade doesn't break the glass on explosion, it just makes the glass damage sound but it doesn't actually damage it, it seems... that's disappointing =)
__________________
Hunter-Digital is offline
Reply


Thread Tools
Display Modes

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 09:47.


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