View Single Post
Author Message
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 05-28-2011 , 23:00   [CS:S] No Bomb Damage
Reply With Quote #1

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.
Attached Files
File Type: txt NoBombDamage.phrases.txt (88 Bytes, 732 views)
File Type: sp Get Plugin or Get Source (NoBombDamage.sp - 839 views - 2.1 KB)
File Type: smx NoBombDamage.smx (2.7 KB, 779 views)

Last edited by TnTSCS; 08-25-2011 at 10:58. Reason: Updated to version 2.1 thanks to Bacardi
TnTSCS is offline