AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] No Bomb Damage (https://forums.alliedmods.net/showthread.php?t=157955)

TnTSCS 05-28-2011 23:00

[CS:S] No Bomb Damage
 
3 Attachment(s)
DESCRIPTION:
This plugin will protect special players (those who have custom1, but you can set that to whatever you want using admin_overrides.cfg) from C4 damage after the round ends.

CVARS:
sm_nobombdamage_version - displays the version of this plugin

CREDITS:
cssnik for suggestion (posted here)
Bimbo1 for help with checking admin flag (posted here)
Bacardi for help with figuring out how to identify when damage came from bomb instead of me using timers OnRoundEnd - much cleaner

REQUIREMENTS:
SDKHooks (you need to download the attached SMX since web compiler won't properly compile due to the need of SDKHooks

CHANGELOG:
Updated to version 1.1
- Changes include a timer to remove protection from blast damage since C4 and grenades are considered blast damage - and I change the message to the user by a couple of words.

Version 2.0
- Updated to use suggested code from Bacardi
- As suggested by Bacardi, plugin is now using CheckCommandAccess so that you can either set your ViP players to CUSTOM1 flag, or use admin_overrides.cfg and add "c4_damage_immunity" and set whatever flag you want (explained below).

Version 2.1
- Updated to use cleaner, more streamlined code that uses less compares and checks for damage from planted_c4 - code from Bacardi
- Added translation file for multi-language support

INSTALLATION
- Copy NoBombDamage.smx to your plugins folder
- Copy NoBombDamage.phrases.txt to your translations folder

To setup your player with protection from bomb damage you either need to grant that player admin flag CUSTOM1 (which is "o") or add an entry into your admin_overrides.cfg and set a flag for the command "c4_damage_immunity"

example admin_overrides.cfg if you don't want to use CUSTOM1 admin flag

"c4_damage_immunity" "q"
then you would set admin flag of "q" to your players you want to have bomb damage immunity.

cssnik 06-03-2011 17:31

Re: [CS:S] No Bomb Damage
 
Why "after the round ends" ?

How to do that has always protected from C4 damage?

TnTSCS 06-03-2011 18:28

Re: [CS:S] No Bomb Damage
 
the way I wrote the plugin is it protects from DMG_BLAST, which nades give off that damage. I'm trying to figure out how to capture the c4 as the weapon, but I don't have a lot of time devoted to learning everything and knowing where to go...

if I could find out the weapon name of the c4, I could just block that c4 from damaging anyone anytime.

RedSword 06-04-2011 09:06

Re: [CS:S] No Bomb Damage
 
weapon_c4

you mean its entity name right ?

TnTSCS 06-04-2011 11:07

Re: [CS:S] No Bomb Damage
 
Yes... but even when I had a code running to view all weapon damage and what weapon gave it, it would not report the c4 damage in the Action:OnTakeDamage so that's why the DMB_BLAST blast (damagetype == 64) was used... if I could figure out what the damagetype of c4 is, I wouldn't have to worry about round end stuff... I can't find a list of damagetypes :(

Peace-Maker 06-04-2011 11:23

Re: [CS:S] No Bomb Damage
 
Have a look at the sdkhooks.inc include file for a list of availbale damagetypes, but i don't see a special one for c4 damage.

TnTSCS 06-04-2011 11:46

Re: [CS:S] No Bomb Damage
 
yes, I looked there and didn't see one for c4 damage, that's why I used DMG_BLAST, but that blocks nade damage :(

I'll try to find time today to work on it - off to pour some concrete

TnTSCS 07-31-2011 15:06

Re: [CS:S] No Bomb Damage
 
Updated to version 1.1

-Added a timer to remove protection so that grenades can still hurt player after bomb explodes

cssnik 08-24-2011 07:41

Re: [CS:S] No Bomb Damage
 
Will make the protection of an explosion to the end of the round?

TnTSCS 08-24-2011 09:54

Re: [CS:S] No Bomb Damage
 
Yes, this plugin protects players with the CUSTOM1 flag from the explosion of the C4 bomb. However, if the player stands in the fire after the explosion, they will get hurt by the fire... this only protects from the killing blast


All times are GMT -4. The time now is 23:33.

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