AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   DoD:S Capture Bonus (https://forums.alliedmods.net/showthread.php?t=80849)

BackAgain 11-22-2008 12:12

DoD:S Capture Bonus
 
5 Attachment(s)
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! :wink:
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)

FeuerSturm 11-22-2008 12:56

Re: DoD:S Capture Bonus
 
You should take a look at the code again.

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

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 :mrgreen:

BackAgain 11-22-2008 13:03

Re: DoD:S Capture Bonus
 
Quote:

Originally Posted by FeuerSturm (Post 716953)
You should take a look at the code again.

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

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 :mrgreen:

Ah, ok, thank you for this advice. I will fix it directly.

edit: Fixed!!! ;-)

FeuerSturm 11-22-2008 13:33

Re: DoD:S Capture Bonus
 
-- 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 :wink:

Other than that, nice plugin! :mrgreen:

Jedi 11-22-2008 13:56

Re: DoD:S Capture Bonus
 
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.

monkie 11-22-2008 21:17

Re: DoD:S Capture Bonus
 
sweet plugin.

I request here for multi-lingual UI cause my players' mother language is not English. :P

sniperkills 11-22-2008 21:53

Re: DoD:S Capture Bonus
 
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 :)

BackAgain 11-23-2008 21:47

Re: DoD:S Capture Bonus
 
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

INsane_dod 11-23-2008 23:33

Re: DoD:S Capture Bonus
 
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.

sniperkills 11-24-2008 05:57

Re: DoD:S Capture Bonus
 
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"
}


All times are GMT -4. The time now is 21:24.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.