Raised This Month: $202 Target: $400
 50% 

DoD:S Capture Bonus


Post New Thread Reply   
 
Thread Tools Display Modes
Author
BackAgain
Junior Member
Join Date: Sep 2007
Plugin ID:
642
Plugin Version:
1.2.0
Plugin Category:
Gameplay
Plugin Game:
Day of Defeat: Source
Plugin Dependencies:
    Servers with this Plugin:
    8 
    Plugin Description:
    After capturing a flag you can get things like extra health or extra ammo.
    Old 11-22-2008 , 12:12   DoD:S Capture Bonus
    Reply With Quote #1

    DoD:S Capture Bonus

    Version update to 1.2

    Hey guys,

    this is a simple bonus system for Day of Defeat:Source. After you captured a flag, a menu comes up, where you can choose extra health or extra ammo. The extra ammo is based on the weapon classes. So if you are playing the SUPPORT class and you pick up an other primary weapon like a K98, you get your granades for the SUPPORT class anyway, and no rifle granades.

    I hope you have some additional ideas. So, feel free to post any of them.

    Try it and have fun

    Features:
    • Enable or disable a specific bonus type
    • Set the amount of flags you need to get the bonus
    • Set the number of clips of a specific weapon
    • Set the time of a specific bonus type, like god mode
    • Bonus: Extra ammo
    • Bonus: Extra health
    • Bonus: God mode
    • Bonus: Invisibility mode
    • Bonus: Unlimited granades
    • Bonus: Secondary weapon
    • Bonus: Unlimited stamina
    [IMG]http://img237.**************/img237/1407/unbenannt1uz7.jpg[/IMG]


    Installation:
    1. Copy the files to the sourcemod folder
    2. ../dod/addons/sourcemod/plugins/dod_capture_bonus.smx
    3. ../dod/addons/sourcemod/scripting/dod_capture_bonus.sp (not necessary)
    4. ../dod/addons/sourcemod/configs/dod_capture_bonus.cfg
    5. ../dod/addons/sourcemod/translations/dod_capture_bonus.phrases.txt
    6. Now it should work!
    Configuration:

    Code:
    //
    // Here you can configure your different bonus types and the corresponding properties.
    //
    // Properties
    // ----------
    // enabled (A bonus is 1=enabled or 0=disabled)
    // flags (Captured flags you need to get a bonus; 0=every captured flag)
    // periodic (0=bonus after x flags; 1=bonus after x, x+x, x+x+x, ... flags)
    // amount (The amount of something the player gets)
    // time (The time a bonus is active)
    // clips (How much clips of ammo)
    //
    
    "dod_capture_bonus"
    {
        "extra_ammo"
        {
            "enabled"    "1"
            "flags"    "4"
            "periodic"    "1"
            
            "clips"
            {
                "weapon_smoke_us"    "1"
                "weapon_smoke_ger"    "1"
                "weapon_frag_us"    "1"
                "weapon_frag_ger"    "1"
                "weapon_riflegren_us"    "1"
                "weapon_riflegren_ger"    "1"
                "weapon_colt"        "1"
                "weapon_p38"        "1"
                "weapon_garand"        "2"
                "weapon_k98"        "2"
                "weapon_thompson"    "2"
                "weapon_mp40"        "2"
                "weapon_bar"        "2"
                "weapon_mp44"        "2"
                "weapon_30cal"        "2"
                "weapon_mg42"        "2"
                "weapon_spring"        "2"
                "weapon_k98_scoped"    "2"
                "weapon_bazooka"    "2"
                "weapon_pschreck"    "2"
                "weapon_m1carbine"    "3"
                "weapon_c96"        "3"    
            }
        }
        
        "extra_health"
        {
            "enabled"    "1"
            "flags"    "4"
            "periodic"    "1"
            "amount"    "20"
        }
        
        "secondary_weapon"
        {
            "enabled"    "1"
            "flags"    "10"
            "periodic"    "0"
            "clips"    "3"
        }    
    
        "unlimited_stamina"
        {
            "enabled"    "1"
            "flags"    "10"
            "periodic"    "1"
            "time"    "15"
        }
    
        "unlimited_granades"
        {
            "enabled"    "1"
            "flags"    "15"
            "periodic"    "0"
        }
    
        "god"
        {
            "enabled"    "1"
            "flags"    "20"
            "periodic"    "0"
            "time"    "15"
        }
        
        "invisible"
        {
            "enabled"    "1"
            "flags"    "25"
            "periodic"    "0"
            "time"    "15"
        }
    }

    Changelog:

    1.0.1
    • Fixed some warnings appeared after compilation.
    1.1.0
    • Added a configuration file
    • Added translation file for multiple languages
    • Added God mode
    • Added Invisibility mode
    • Changed the extra health bonus
    1.2.0
    • Fixed the debug output "...Health: 1000..."
    • Added bonus "Unlimited granades"
    • Added bonus "Secondary weapon"
    • Added bonus "Unlimited stamina"
    • Changed (If only one bonus detected, no menu appears)
    • Changed (Some translations)
    • Added cvar "sm_capbon_enabled" (You can enable or disable the plugin easily)
    Attached Files
    File Type: zip dod_capture_bonus_1.2.0.zip (18.7 KB, 1059 views)
    File Type: cfg dod_capture_bonus.cfg (1.6 KB, 494 views)
    File Type: smx dod_capture_bonus.smx (10.6 KB, 421 views)
    File Type: sp Get Plugin or Get Source (dod_capture_bonus.sp - 1341 views - 23.4 KB)
    File Type: txt dod_capture_bonus.phrases.txt (2.4 KB, 494 views)
    __________________

    Last edited by BackAgain; 11-27-2008 at 14:16. Reason: Update
    BackAgain is offline
    FeuerSturm
    Veteran Member
    Join Date: Apr 2004
    Location: Germany
    Old 11-22-2008 , 12:56   Re: DoD:S Capture Bonus
    Reply With Quote #2

    You should take a look at the code again.

    The plugin does compile, but there's some warnings that you should
    fix

    Code:
    SourcePawn Compiler 1.1.0-dev
    Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC
    D:\dod_capture_bonus.sp(160) : warning 213: tag mismatch
    D:\dod_capture_bonus.sp(249) : warning 204: symbol is assigned a value that is never used: "weaponSlot2"
    D:\dod_capture_bonus.sp(125) : warning 204: symbol is assigned a value that is never used: "CvarVersion"
    D:\dod_capture_bonus.sp(95) : warning 203: symbol is never used: "WeaponSlots"
    Header size:           2828 bytes
    Code size:             5716 bytes
    Data size:             1328 bytes
    Stack/heap size:      16384 bytes; Total requirements:   26256 bytes
    4 Warnings.
    Compilation Time: 0,55 sec
    After that I'll take a look at it again and will approve it after doing a
    quick test
    __________________
    FeuerSturm is offline
    BackAgain
    Junior Member
    Join Date: Sep 2007
    Old 11-22-2008 , 13:03   Re: DoD:S Capture Bonus
    Reply With Quote #3

    Quote:
    Originally Posted by FeuerSturm View Post
    You should take a look at the code again.

    The plugin does compile, but there's some warnings that you should
    fix

    Code:
    SourcePawn Compiler 1.1.0-dev
    Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC
    D:\dod_capture_bonus.sp(160) : warning 213: tag mismatch
    D:\dod_capture_bonus.sp(249) : warning 204: symbol is assigned a value that is never used: "weaponSlot2"
    D:\dod_capture_bonus.sp(125) : warning 204: symbol is assigned a value that is never used: "CvarVersion"
    D:\dod_capture_bonus.sp(95) : warning 203: symbol is never used: "WeaponSlots"
    Header size:           2828 bytes
    Code size:             5716 bytes
    Data size:             1328 bytes
    Stack/heap size:      16384 bytes; Total requirements:   26256 bytes
    4 Warnings.
    Compilation Time: 0,55 sec
    After that I'll take a look at it again and will approve it after doing a
    quick test
    Ah, ok, thank you for this advice. I will fix it directly.

    edit: Fixed!!! ;-)
    __________________

    Last edited by BackAgain; 11-22-2008 at 13:12.
    BackAgain is offline
    FeuerSturm
    Veteran Member
    Join Date: Apr 2004
    Location: Germany
    Old 11-22-2008 , 13:33   Re: DoD:S Capture Bonus
    Reply With Quote #4

    -- APPROVED --

    I quickly tested it and it works like it should.

    You're not using any of the following functions though , so it's safe to
    remove them from the source code:

    Code:
    // Prints a chat message to all players
    public PrintChatAll(const String:message[]) {
     PrintToChatAll("\x04%s \x01%s",PLUGIN_TAG,message)
    }
    // Gets the players health
    public DodGetPlayerHealth(client) {
     return GetEntProp(client,Prop_Send,"m_iHealth")
    }
    // Gets the current weapon
    public DodGetPlayerCurrentWeapon(client) {
     return GetEntPropEnt(client,Prop_Send,"m_hActiveWeapon")
    }
    // Removes a weapon of a given slot
    public DodRemovePlayerWeapon(client,slot) {
     new entity = GetPlayerWeaponSlot(client, slot)
     
     if(entity != -1) {
      RemovePlayerItem(client,entity)
     }
    }
    // Removes all the players weapons
    public DodRemovePlayerWeapons(client) {
     for(new i=0; i < 4; i++) {
      DodRemovePlayerWeapon(client,i)
     }
    }
    Furthermore I noticed that you're just setting the health to 100
    if "Extra health" was selected, that's fine if you have less than 100hp,
    but if your health is already full, you basically waste that bonus

    Other than that, nice plugin!
    __________________
    FeuerSturm is offline
    Jedi
    Member
    Join Date: Mar 2004
    Location: Houston, TX
    Old 11-22-2008 , 13:56   Re: DoD:S Capture Bonus
    Reply With Quote #5

    BackAgain -

    This plugin is remotely similar to a plugin that FeuerSturm created for DOD v1.3. In that plugin, there were many cvars that the server admin could manipulate to customize to their preferences. That plugin was very popular. I would like to request a few features for your plugin to provide some of the options that FeuerSturm's plugin offered.
    • 1. Setup multiple awards for various levels of flag capping. For example:
      x flags = x reward
      y flags = y reward
      z flags = z reward
      a flags = a reward
      b flags = b reward

      specifically,

      5 flags = x HP increase
      10 flags = unlimited grenades
      15 flags = Carbine with unlimited ammo
      20 flags = god mode for X seconds
      25 flags = invisible for X seconds
      (these are just a few examples of potential rewards)

      2. Make the number of flags required to achieve each reward a cvar that the admin can manipulate.

      3. Make the reward variables a cvar that the admin can manipulate. For example, let the admin decide how much HP to reward or how many seconds to allow god mode, etc.

    The benefit of a plugin like this is that it will encourage campers to get out there and cap flags. Since your plugin restores health or gives ammo at every flag cap...it won't necessarily provide the same benefit of encouraging campers to cap multiple flags.

    Thanks.
    __________________
    Jedi is offline
    monkie
    Senior Member
    Join Date: Oct 2006
    Location: Shanghai, China
    Old 11-22-2008 , 21:17   Re: DoD:S Capture Bonus
    Reply With Quote #6

    sweet plugin.

    I request here for multi-lingual UI cause my players' mother language is not English.
    __________________
    monkie is offline
    Send a message via MSN to monkie Send a message via Skype™ to monkie
    sniperkills
    Senior Member
    Join Date: Apr 2008
    Old 11-22-2008 , 21:53   Re: DoD:S Capture Bonus
    Reply With Quote #7

    hi me again very nice plugin man this is kool u should add more menu options but when u cap a flag & pic health i noticed it only brings up to 100% should make it so u get alittle more health when a flag is cap like 110% or 105% cuz if u have 100% hp when u cap a flag it doesent go any higher but this is kool more menu options like maby alittle speed . & can u make a chart to tell us what weapon amo u get with what gun &all that even if u make a little help menu like !bounusmenu to show what it can do it just something to look fored to & yes im runing this plugin its kool alittle updateing would be nice i know u probly just made it so to let u know cool things can be use in it & i know alot of servers will run it if u like more ideas i will be more happy to help
    __________________
    {D}ۣۜ$ήiяҚillş
    sniperkills is offline
    BackAgain
    Junior Member
    Join Date: Sep 2007
    Old 11-23-2008 , 21:47   Re: DoD:S Capture Bonus
    Reply With Quote #8

    Version update to 1.1.0

    Hey guys, i just added some requested features. Check it out. And in future i will add some more bonus types. So, feel free and post your ideas.

    Thank you all
    __________________
    BackAgain is offline
    INsane_dod
    Member
    Join Date: Mar 2008
    Old 11-23-2008 , 23:33   Re: DoD:S Capture Bonus
    Reply With Quote #9

    Nice work. This is helpful to gameplay on some maps, some maps play better when players go for the flags... most unfortunately think a score is kills only.

    This gives personal rewards and promotes capping.

    edit: Could not get it working, the files are in the right place (using the ones in the zip) will try others.

    edit 2 : Checked the files all correctly placed, using version 2339 windows server. Can't tell you about the older version of this plug-in, I have only tried this new one.

    Last edited by INsane_dod; 11-24-2008 at 01:09.
    INsane_dod is offline
    sniperkills
    Senior Member
    Join Date: Apr 2008
    Old 11-24-2008 , 05:57   Re: DoD:S Capture Bonus
    Reply With Quote #10

    ok i added the new files but the health stays the same like when u have full health 100% u pic the 1 for health the health does not go any higher so it will be a waste of bonus
    periodic<-- but ya so far doing ok on this plugin wish u would add more menu options like speed,gravity,
    "extra_health"
    {
    "enabled" "1"
    "flags" "0"
    "periodic" "0" <---- what does this mean ?
    "amount" "20"
    }
    __________________
    {D}ۣۜ$ήiяҚillş
    sniperkills 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:47.


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