Raised This Month: $ Target: $400

DoDs Equipment 0.0.6

Post New Thread Reply   
Thread Tools Display Modes
Join Date: Jul 2008
Plugin ID:
Plugin Version:
Plugin Category:
Fun Stuff
Plugin Game:
Day of Defeat: Source
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Modify DoDs equipment and ammo for each class
    Old 07-17-2008 , 20:12   DoDs Equipment 0.0.6
    Reply With Quote #1

    New version is here:

    Thanks to Lebson506th


    My first plugin for sourcemod is ready.
    This plugin allows you to give any weapon to any class and it allows to modify the weapons ammunitions on the fly.

    It has been tested on 2 dods servers and it works and compiles.
    Since version 0.0.6 every weapon and ammo change was tested and works.

    I want to thank strontiumdog for his [DODS] Pistols UPDATED July 15, 2008 code. He made me understand the m_iAmmo offsets faster.

    I want to thank teame06 for his GunGame:SM code. His code made me able to understand the virtual function handling faster.

    This Plugin will not work with any other nightly sourcemod builds older than 1.1.0-r2400.
    According to Lee this plugin also works with 1.0.4svn.
    Maybe it will work on other version (with exception of the 1.0.3 release, this version is not compatible), i have not tested it.

    Known bugs:
    If you assign more than 4 different weapons you aren't able to select all of them with keys. Throwing some weapons away is one of the workarrounds. If you assign a value greater than 9999 to the ammo, the clips get a random size. This is due to array memory limitations.

    Next improvements & CURRENT VERSION 0.0.6:
    • DONE: (planned this week) Nicer code and the use of functions (0.0.2).
    • DONE-partially: Support for removing equipment on the fly (0.0.3).
    • FIXED: fixed the riflegren bug. You can now set the amount of riflegrens for the rifleman class. (0.0.4)
    • DONE: Nicer code and more errortesting (0.0.4)
    • FIXED: Fixed a mg ammo bug. You can now set the mg ammo. (0.0.5)
    • FIXED: Refixed the mg ammo, i have tested it and it works now. sorry for the mistake... (0.0.6)
    • Includes for other plugins so you can equip on a given event. (Chancelled due to the possibility to exec configs. If someone wants this feature message me.)
    • Set the equipment for single players.
    The CSS version is comming soon.

    1. Upload the .cfg into <DoDModDir>/cfg/sourcemod
    2. Upload the .smx file into <DoDModDir>/addons/sourcemod/plugins
    3. Type into HLSW or into the gameserver console: sm plugins refresh
    1. Upload the new dod_equip.smx into the <DoDModDir>/addons/sourcemod/plugins folder.
    2. Upload the new dod_equip.cfg into <DoDModDir>/cfg/sourcemod
    3. type into the hlsw or into the gameserver console:
      sm plugins list
      you will get a list with loaded plugins. The list has the form
      "NUM Name Author ..."
      Remember the NUM and type into the console
    4. sm plugins unload NUM
      then type
    5. sm plugins refresh
    Be shure to get the new config. All cvar names are changed.
    Sorry for this change but in the jungle of server cvars its important to have them structured.
    They will not be changed again.
    You can only assign 4 whitespace seperated values in one cvar.
    The ammo numbers are not allowed to exceed 9999!!!!!!!!
    The configuration file holds 3 server cvars for each class.

    The first cvar is used to remove all equipment from the class before the assignment of any other equipment.
    The second cvar for one class is the equipment cvar. You set the weapons in this cvar.
    The third cvar is the corresponding ammunition cvar. You set the weapon ammo corresponding to the the weapon, whitch was set in the equipment cvar.
    Every weapon an every ammo assignment needs to be seperated with a whitespace.
    Every weapon assignment needs a ammo asignment.
    If you set the clear cvars to "yes" all weapons are removed prior to equiping. This means only the weapons equiped in the cvars are aviable to the players.

    Here are two examples that have the same result:
    sm_equip_rifle_clear_ger "no"
    sm_equip_rifle_equip_ger "weapon_riflegren_ger weapon_p38"
    sm_equip_rifle_ammo_ger "3 80"

    sm_equip_rifle_clear_ger "no"
    sm_equip_rifle_equip_ger "weapon_p38 weapon_riflegren_ger"
    sm_equip_rifle_ammo_ger "80 3"

    Example 999 ammo for the assault class primary weapon 3 smokes and 3 frags:
    sm_equip_assault_clear_us "no"
    sm_equip_assault_equip_us "weapon_thompson weapon_smoke_us weapon_frag_us"
    sm_equip_assault_ammo_us "999 3 3"

    Example 999 bullets for the us sniper. The us sniper also gets the 30cal with 9999 bullets, the colt with 70 bullets and 3 frag grenades.
    After coding version 0.0.3 of this plugin i found a possible workarround to let the sniper class select the mg. If it works i will post it here.
    sm_equip_sniper_clear_us "no"
    sm_equip_sniper_equip_us "weapon_30cal weapon_spring weapon_colt weapon_frag_us"
    sm_equip_sniper_ammo_us "9999 999 70 3"

    Have fun with the plugin.
    Attached Files
    File Type: cfg dod_equip.cfg (2.9 KB, 3106 views)
    File Type: cfg dod_balls.cfg (1.7 KB, 2285 views)
    File Type: sp Get Plugin or Get Source (dod_equip.sp - 4484 views - 16.2 KB)

    Last edited by Lis; 04-23-2009 at 11:32.
    Lis is offline
    Send a message via ICQ to Lis Send a message via MSN to Lis
    Senior Member
    Join Date: Jul 2007
    Location: Killadelphia
    Old 07-17-2008 , 22:08   Re: DoDs Equipment
    Reply With Quote #2

    i will check this out. thanks

    just a heads up, it says counterstrike source for category at the top of this page.
    monkman is offline
    Join Date: Mar 2008
    Old 07-19-2008 , 19:04   Re: DoDs Equipment
    Reply With Quote #3

    Will this be able to strip all weapons at map start via a map config?

    There is a football map I would like to do this on
    INsane_dod is offline
    Join Date: Jul 2008
    Old 07-19-2008 , 19:31   Re: DoDs Equipment
    Reply With Quote #4

    If you are on DoDs you are able to create a .cfg file with the map name in the DoDModDir/cfg folder. This config is executed if the map is loaded.

    dod_football.cfg would be executed if you change the map do dod_football. You can put all needet cvars into this .cfg.

    CSS does not have such a feature. Thought you can ask http://forums.alliedmods.net/showthread.php?p=590466 this guy if he implements a per map config execution.

    Last thing is:
    This plugin does not support removing of weapons currently. You need to wait until version 0.0.3 arrives . Since you made your request i try to speed things up a little.

    Oh yes thanks and sorry.
    Changed the category.

    Last edited by Lis; 07-24-2008 at 14:54.
    Lis is offline
    Send a message via ICQ to Lis Send a message via MSN to Lis
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 07-19-2008 , 21:24   Re: DoDs Equipment
    Reply With Quote #5

    As far as I know CS:S does have map specific configs built in, but I'm not sure. Anyway, I was planning on adding that to my plugin, but I don't have much time at the moment to update it. But there are plenty of plugins that do map specific configs, as listed here.
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami is offline
    Join Date: Jul 2008
    Old 07-19-2008 , 21:42   Re: DoDs Equipment
    Reply With Quote #6

    @DJ Tsunami:

    Ah you are right. I missed that.


    Look at May 12, 2005:
    When a map is loaded, an associated .cfg file is automatically evaluated. This cfg file must be located in the cstrike/maps/cfg folder and be named <mapname>.cfg. For instance, the file cstrike/maps/cfg/de_dust.cfg will be evaluated when the map de_dust is loaded. This is useful for per-map rules, bot rosters, etc.

    Last edited by Lis; 07-20-2008 at 00:42.
    Lis is offline
    Send a message via ICQ to Lis Send a message via MSN to Lis
    Join Date: May 2008
    Old 07-21-2008 , 11:51   Re: DoDs Equipment 0.0.3
    Reply With Quote #7

    Love the plugin, very useful!!I do have one thing i cant get to work righ though;
    I cannot get more than the default number of rifle grenades, i have this code:

    sm_dod_rifle_clear_ger "yes"
    sm_dod_rifle_equip_ger "weapon_k98 weapon_riflegren_ger"
    sm_dod_rifle_ammo_ger "500 250"
    sm_dod_rifle_clear_us "yes"
    sm_dod_rifle_equip_us "weapon_garand weapon_riflegren_us"
    sm_dod_rifle_ammo_us "500 250"
    have also tried this:

    sm_dod_rifle_clear_ger "no"
    sm_dod_rifle_equip_ger "weapon_k98 weapon_riflegren_ger weapon_p38"
    sm_dod_rifle_ammo_ger "500 250 150"
    sm_dod_rifle_clear_us "no"
    sm_dod_rifle_equip_us "weapon_garand weapon_riflegren_us weapon_colt"
    sm_dod_rifle_ammo_us "500 250 150"
    I get the pistols and the extra rifle ammo but no extra rifle nades.

    Windows server sm version 1.0.4svn (latest as of time of this post)
    Other wise great plugin!


    Last edited by spacedkadet; 07-21-2008 at 12:17.
    spacedkadet is offline
    Join Date: Jul 2008
    Old 07-21-2008 , 14:27   Re: DoDs Equipment 0.0.3
    Reply With Quote #8

    Thanks for your response Lee. Nice to hear you like it.

    I tried the same and it seems the script does not set the riflegrenades in the right way. Thats a script bug and not your fault, sorry for this error. I will fix this within the next days.

    Since i havent found any riflegren ammo offsets i try to find another way to set the ammount of rifflegrenades.

    A dods uses offsets for the riflegrens i just did not saw them the first time.

    Last edited by Lis; 07-24-2008 at 04:15.
    Lis is offline
    Send a message via ICQ to Lis Send a message via MSN to Lis
    Join Date: May 2008
    Old 07-25-2008 , 02:09   Re: DoDs Equipment 0.0.4
    Reply With Quote #9

    what do each of the configs do?
    Kahless is offline
    Join Date: Jul 2008
    Old 07-25-2008 , 04:58   Re: DoDs Equipment 0.0.4
    Reply With Quote #10

    The first config simply gives some classes 3 frag grenades and more pistol ammo. The rifleclass also gets a pistol.
    The second config is the one i use with the dod_balls map.
    The dod_balls config sets 100 grenades 600 rockets 1000 mg ammo and so on.
    Lis is offline
    Send a message via ICQ to Lis Send a message via MSN to Lis

    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 06:02.

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