Raised This Month: $140 Target: $400
 35% 

[CSS] Frag for damage (0.4, 13 Aug 2012)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
m3f_n
Junior Member
Join Date: Jul 2012
Location: Ukraine, Cherkassy
Plugin ID:
3112
Plugin Version:
0.4
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Gives frag for given dagame, controlling giving frags for kills
    Old 07-22-2012 , 21:19   [CSS] Frag for damage (0.4, 13 Aug 2012)
    Reply With Quote #1

    Description:
    ----------------------------------------
    Have you ever had situations when you have done a lot of damage, but the last bullet to death is shot by somebody other, who gets score benefit as result?
    This plugins fix
    es that by giving frags(score) for damage done, not for kills (but can be combined).

    Requirements:

    ----------------------------------------
    • SourceMod 1.4.4 or higher, is not guaranteed to work with lower versions.

    Installation:

    ----------------------------------------
    Just put .smx file to
    addons/sourcemod/plugins folder.

    Configuration (server):
    ----------------------------------------
    • Enable/disable plugin - sm_fragfordamage_enabled (0/1, def: 1)
    • Damage done (health taken) to increase score sm_fragfordamage_healthdivisor (def: 120)
    • Maximum damage that can be included to score for single hit - sm_fragfordamage_max_per_hit (def: 125)
    • Maximum damage that can be included to score for single victim (for one round or before victim dies) - sm_fragfordamage_max_per_victim (def: 125)
    • Health that is added to killer like for hit - sm_fragfordamage_kill_bonus (def: 20)
    • Blocking additional player score changes: penalty (suicide,team kill) - sm_fragfordamage_blockpenalty (0/1, def: 0), and goals(bomb defused,bomb explosion) - sm_fragfordamage_blockgoals
      (0/1, def: 0)
    • Do include kevlar damage to the score - sm_fragfordamage_kevlar (0/1, def: 0)
    cfg/sourcemod/plugin_fragfordamage.cfg is used to store configuration.

    Notes:
    • Be careful when setting sm_fragfordamage_max_per_victim on server with ability to override player`s health, all damage done after sm_fragfordamage_max_per_victim reached is not included before victim dies or new round begins.

    Changelog:

    ----------------------------------------
    Quote:
    0.1, 23 July 2012 - Initial release

    0.3, 31 July 2012 - Added features and fixed bugs
    • Bug fix + feature: had incorrect frag count on suicide, fixed, can be turned on/off - sm_fragfordamage_blocksuicidepenalty
    • Bug fix + feature: had incorrect frag count when goal done before next hit, fixed, can be turned on/off - sm_fragfordamage_blockgoals
    • Feature: added sm_fragfordamage_kill_bonus
    • Feature: added sm_fragfordamage_kevlar
    • Bug fix: score was not reset if restart is caused by that teams become to have both players.
    0.4, 13 Aug 2012 - Added features and fixed bugs
    • Few little fixes.
    • Feature: added sm_fragfordamage_max_per_victim



    Plans:
    ----------------------------------------
    Make compatible with other plugins that are working with score.
    Attached Files
    File Type: sp Get Plugin or Get Source (fragfordamage.sp - 557 views - 11.2 KB)

    Last edited by RedSword; 03-22-2014 at 23:42. Reason: Feedback given
    m3f_n is offline
    MrGuvernment
    Junior Member
    Join Date: Jul 2012
    Location: Costa Frick'n Rica
    Old 07-25-2012 , 00:52   Re: [CSS] Frag for damage (0.1, 23 July 2012)
    Reply With Quote #2

    i like the sound of this!
    MrGuvernment is offline
    Send a message via ICQ to MrGuvernment
    Sevi_FyA
    Member
    Join Date: Jul 2011
    Location: Seville
    Old 07-29-2012 , 07:12   Re: [CSS] Frag for damage (0.1, 23 July 2012)
    Reply With Quote #3

    For me it has a bug with this configuration:

    sm_fragfordamage_healthdivisor 10
    sm_fragfordamage_max_per_hit 100


    A player can never get more than 10 points for life
    __________________
    Escuseme my English, Im Spanish // My server Powered by Sourcemod


    Sevi_FyA is offline
    m3f_n
    Junior Member
    Join Date: Jul 2012
    Location: Ukraine, Cherkassy
    Old 07-30-2012 , 05:47   Re: [CSS] Frag for damage (0.1, 23 July 2012)
    Reply With Quote #4

    Hmm... If you make two shots to head with mp5 staying close to victim, you can get 19 for life on that configuration. I don`t have that bug on my machine.
    m3f_n is offline
    m3f_n
    Junior Member
    Join Date: Jul 2012
    Location: Ukraine, Cherkassy
    Old 08-13-2012 , 17:11   Re: [CSS] Frag for damage (0.4, 13 Aug 2012)
    Reply With Quote #5

    Updated to 0.4
    m3f_n is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 03-08-2014 , 01:08   Re: [CSS] Frag for damage (0.4, 13 Aug 2012)
    Reply With Quote #6

    Removed .smx as the "Get Plugin" button is functional without.
    __________________
    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 online now
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 03-22-2014 , 23:42   Re: [CSS] Frag for damage (0.4, 13 Aug 2012)
    Reply With Quote #7

    Hi there,

    if you want to have your plugin approved you should pass UserId in your timer, rather than Player Id. This prevent a scenario where a newly-joining would have his Id used in a timer's callback (and suddenly get frags, for example).

    There is also
    Quote:
    //TODO: here can be a bug when blockPenalty is on - undefined behaviour when you have killed someone of your team and then someone of oponents in less then DELAYED_RECALCULATION_TIME.
    When "blockPenalty " is on; I don't get why you use a timer when someone do teamkill. Can't you simply get the player's frag and add 1 ? (I might be wrong, but I believe this would work :/)

    Regarding your version's ConVar, I would remove FCVAR_REPLICATED as it can produce error in the client's console. I would also add FCVAR_DONTRECORD so that a client can't change the plugin's version in the plugin's config file.

    And why use a temporary variable on L245-249 and 251 ?

    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 online now
    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 22:14.


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