Monthly Target: $400 Donations: $131
 32% 

[CS:S] No Bomb Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author
TnTSCS
SourceMod Donor
Join Date: Oct 2010
Location: Undisclosed...
Plugin ID:
2364
Plugin Version:
2.1
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    9 
    Plugin Description:
    Protects special players from C4 damage post round end.
    Old 05-29-2011 , 00: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, 265 views)
    File Type: sp Get Plugin or Get Source (NoBombDamage.sp - 310 views - 2.1 KB)
    File Type: smx NoBombDamage.smx (2.7 KB, 228 views)

    Last edited by TnTSCS; 08-25-2011 at 11:58. Reason: Updated to version 2.1 thanks to Bacardi
    TnTSCS is offline
    cssnik
    Member
    Join Date: Apr 2011
    Location: Russia
    Old 06-03-2011 , 18:31   Re: [CS:S] No Bomb Damage
    Reply With Quote #2

    Why "after the round ends" ?

    How to do that has always protected from C4 damage?
    cssnik is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 06-03-2011 , 19:28   Re: [CS:S] No Bomb Damage
    Reply With Quote #3

    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.
    TnTSCS is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 06-04-2011 , 10:06   Re: [CS:S] No Bomb Damage
    Reply With Quote #4

    weapon_c4

    you mean its entity name right ?
    RedSword is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 06-04-2011 , 12:07   Re: [CS:S] No Bomb Damage
    Reply With Quote #5

    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
    TnTSCS is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 06-04-2011 , 12:23   Re: [CS:S] No Bomb Damage
    Reply With Quote #6

    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.
    __________________
    Peace-Maker is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 06-04-2011 , 12:46   Re: [CS:S] No Bomb Damage
    Reply With Quote #7

    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 is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 07-31-2011 , 16:06   Re: [CS:S] No Bomb Damage
    Reply With Quote #8

    Updated to version 1.1

    -Added a timer to remove protection so that grenades can still hurt player after bomb explodes
    TnTSCS is offline
    cssnik
    Member
    Join Date: Apr 2011
    Location: Russia
    Old 08-24-2011 , 08:41   Re: [CS:S] No Bomb Damage
    Reply With Quote #9

    Will make the protection of an explosion to the end of the round?
    __________________
    cssnik is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 08-24-2011 , 10:54   Re: [CS:S] No Bomb Damage
    Reply With Quote #10

    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
    TnTSCS 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 08:00.


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