Raised This Month: $154 Target: $400
 38% 

[DoD:S] Bleed


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Plugin ID:
3740
Plugin Version:
1.2
Plugin Category:
Gameplay
Plugin Game:
Day of Defeat: Source
Plugin Dependencies:
    Servers with this Plugin:
    20 
    Plugin Description:
    Makes player bleeding after taking X damage for Y health every Z seconds
    Old 07-10-2013 , 13:17   [DoD:S] Bleed
    Reply With Quote #1

    Once some guy requested a proper 'bleed' plugin with more function. I totally forgot about that, and remembered it in half an hour ago lol.
    This plugin makes player bleeding after taking X damage for Y health every Z seconds.
    Fully compatible with realism physics (you just need to disable native bleeding from this plugin, that's all.)

    CONVARS:
    • dod_bleed_health - If mode is set to 0, start bleeding if player got less health, otherwise when player got damaged for more than this value. (Default: 30)
    • dod_bleed_mode - Determines a mode to start bleeding. 0 - if player is having less than X health. 1 - If player got damaged for more than X health
    • dod_bleed_delay - Delay between taking damage on bleed (in seconds). (Default:1.5 seconds)
    • dod_bleed_damage_head - Damage to take to a player which got hit in the head. (Default: 4 health)
    • dod_bleed_damage_chest - Damage to take to a player which got hit in a body. (Default: 3 health)
    • dod_bleed_damage_other - Default damage to take to a player while bleeding. (Default: 2 health)

    Plugin generates config file (cfg/sourcemod/dod_bleed.cfg)

    Servers with this plugin

    Download plugin
    Browse source code
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot

    Last edited by Root_; 01-21-2014 at 11:32. Reason: fb given
    Root_ is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 07-10-2013 , 13:39   Re: [DoD:S] Bleed
    Reply With Quote #2

    whoops! fixed serious bug (when attacker, which caused bleedings, disconnected)
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 07-11-2013 , 19:20   Re: [DoD:S] Bleed
    Reply With Quote #3

    You may want to correct "dod_bleed_health"'s description. I believe it is doing something else than its definition @ line 167. You should say it is conditional to dod_bleed_mode. Also saying "A [something]" makes me believe there are more "minimum player's health needed to start bleeding".

    Also in your plugin, it seems that if I bleed from the head/chest, then from a small region (i.e. left leg), I would lose less health per tick...

    Code:
    IsClientInGame(BleedInfo[i][attacker])
    This is wrong. First, why would you stop bleeding when your attacker left ? Then let's say that was intended; then how would you explain someone else taking a recently-quit attacker's slot (attacker leave, someone else join), and get a kill, without even getting out of his spawn ? ... :/

    And cool thing you commented.

    Red
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 07-12-2013 , 05:59   Re: [DoD:S] Bleed
    Reply With Quote #4

    Quote:
    Originally Posted by RedSword View Post
    You may want to correct "dod_bleed_health"'s description
    Done.
    Quote:
    Originally Posted by RedSword View Post
    Also in your plugin, it seems that if I bleed from the head/chest, then from a small region (i.e. left leg), I would lose less health per tick...
    Indeed. I just suck at testing.... fixed now
    Quote:
    Originally Posted by RedSword View Post
    First, why would you stop bleeding when your attacker left ? Then let's say that was intended; then how would you explain someone else taking a recently-quit attacker's slot (attacker leave, someone else join)
    I kicked a bot which injured me and I stopped bleeding... but I havent tested if another bot joined. Really new bot killed me somehow.

    So plugin is updated, fixed all of above, hopefully
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot

    Last edited by Root_; 07-12-2013 at 12:02.
    Root_ is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 07-12-2013 , 20:59   Re: [DoD:S] Bleed
    Reply With Quote #5

    Quote:
    Originally Posted by Root_ View Post
    [...]
    Quote:
    Originally Posted by RedSword View Post
    Also in your plugin, it seems that if I bleed from the head/chest, then from a small region (i.e. left leg), I would lose less health per tick...
    Indeed. I just suck at testing.... fixed now
    Quote:
    Originally Posted by RedSword View Post
    First, why would you stop bleeding when your attacker left ? Then let's say that was intended; then how would you explain someone else taking a recently-quit attacker's slot (attacker leave, someone else join)
    I kicked a bot which injured me and I stopped bleeding... but I havent tested if another bot joined. Really new bot killed me somehow.

    So plugin is updated, fixed all of above, hopefully
    Not...

    There are still 2 things I mentioned you did not correct...
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 07-13-2013 , 02:19   Re: [DoD:S] Bleed
    Reply With Quote #6

    I've fixed bleeding damage when player received a shot in chest and then in arm or w/e, also changed descriptionn, and timer stopping when attacker is disconnected.
    About thing when attacker is disconnected and another connected - player still receiving a damage, but from another 'new' player - I have no idea how to fix that (tried to pass event userid rather than real userid, but it not helped)
    EDIT: fixed
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot

    Last edited by Root_; 07-13-2013 at 02:54.
    Root_ is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 07-13-2013 , 03:16   Re: [DoD:S] Bleed
    Reply With Quote #7

    new attackerID = (GetClientOfUserId(BleedInfo[i][attacker]) != 0) ? GetClientOfUserId(BleedInfo[i][attacker]) : 0;

    You can simply do "new attackerID = GetClientOfUserId(BleedInfo[i][attacker]);"

    And you're still preventing someone from bleeding from a higher part.

    i.e. StartBleed ==> OTHER

    then the player receives a critical hit at the chest. In Event_Player_Damaged, the victim will be considered like "already bleeding". This means a player can "prevent" a higher blood-loss from a less higher one.

    i.e. Get hit in the leg --> Bleeding 2/sec ; Bleeding --> Get hit in the stomach --> still bleed 2/sec, rather than 3/sec.





    Red
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 07-13-2013 at 03:17.
    RedSword is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 07-13-2013 , 03:50   Re: [DoD:S] Bleed
    Reply With Quote #8

    Okay RedSword I've fixed this - now damage is increasing every time player get damaged while bleeding.
    Thanks for feedback!
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 07-13-2013 , 11:27   Re: [DoD:S] Bleed
    Reply With Quote #9

    Code:
    if (GetClientHealth(i) > oldhp/bleedinghealth)
    I think >= would be better.

    But looks ok. Approved.

    Red
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword 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 15:25.


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