csdm_mod - Counter-Strike Deathmatch.
(C)1995-2004 The T C W Organization, by David "BAILOPAN" Anderson
CSDM Mod allows you to play Counter-Strike in a variety of highly configurable deathmatch scenarios.
Sections:

1. Installing
2. How to use
3. CVARs
4. Commands
5. Weapon Restriction/Limiting
6. Items
7. The credits and copyrights.
8. Changelog

I. Installing

CSDM Mod requires AMX Mod X with the ENGINE and Fun modules enabled. It was designed to run on Counter-Strike and will not work on any other mod (except Condition Zero).

To install the plugin file: Simply copy csdm_mod.amx to your addons\amxmodx\plugins\ folder and add "csdm_mod.amx" (without quotes) to addons\amxmodx\plugins.ini.

To install the required modules: Open "addons\amxmodx\modules.ini" and remove the semi-colon (";") from the lines with the Engine module and Fun module.

Make sure you also copy the folder "csdm" to your addons\amxmodx folder. It contains the predefined entity and spawn lists. RANDOM SPAWNING WILL NOT WORK OTHERWISE!

The source code to most versions is available if you want to compile it. Click Here for the CVS repository.

II. How To Use

CSDM Mod has two main modes of play. The first works with all maps and is the most normal way. Each round you get a menu asking you what guns, armor, and grenades you want (the menus can be turned on and off). The second mode is what makes CSDM Mod unique. The most popular maps have pre-defined item lists, in which items and guns are sprinkled strategically around the map. Players must find items/weapons instead of choosing them.

For Find Item mode, there are two more modes: Normal, and AssKicR's changes. AssKicR's changes include different ammo types for the AWP and Para and some new entities, as well as a different map config pack. To use his changes, set csdm_asskicr to 1 in amx.cfg.

Below are the best CVAR settings for each mode. Normal mode is set by default. Bold items must be set to the value given, but values with a "D" are already set by default. These are not all the settings available, see the list of CVARs and commands below to further tweak CSDM. Set all options in amx.cfg

NORMAL MODE
- csdm_active 1 (D)
- csdm_freeze_time 4.0 (D)
- csdm_add_items 0 (D)
- csdm_random_spawns 1 (D)
- csdm_kill_all 0 (D)
- csdm_drop_packs 0 (D)
- csdm_drop_weapons 1 (D)
- csdm_delete_time 20.0 (D)
- csdm_allow_clguns 0 (D)
- csdm_auto_drop 1 (D)
- csdm_auto_equip 1
- csdm_auto_gren 1
- csdm_spawn_spam 1
- csdm_enable_amenu 0
- csdm_enable_gmenu 0

ITEM MODE
- csdm_active 1 (D)
- csdm_freeze_time 4.0 (D)
- csdm_add_items 1
- csdm_random_spawns 1 (D)
- csdm_kill_all 0 (D)
- csdm_drop_packs 1
- csdm_drop_weapons 1 (D)
- csdm_delete_time 20.0 (D) (maybe lower with larger servers)
- csdm_allow_clguns 0 (D) - could get chaotic otherwise
- csdm_auto_equip 0 (D)
- csdm_auto_gren 0 (D)
- csdm_spawn_spam 0
- csdm_enable_amenu 0
- csdm_enable_gmenu 0
- csdm_battery 15
- csdm_medkit 15
- csdm_explain 1
- csdm_auto_drop 0

If there are any bugs or crashes, please tell us!

Contacts:
- AMX Mod X Forums
- LambdaCore forums
- Instant Message the author
- E-mail the author

To make your own spawn points and entities in a map, use the commands available to you. If you want your version to be in the next release, contact us!

III. CVARs

CSDM Mod makes use of new cvars for your amx.cfg. It is best to not set these in game. Use their respective commands instead.

CVARs
Name | What it Does | Default Value | Requires Restart
--- | --- | --- | ---
csdm_active [0|1] | Sets whether to use CSDM mode or not. | 1 | No
csdm_freeze_time 4.0 | Sets the time a player is protect at their spawn. | 4.0 | No
csdm_add_items [0|1] | Sets the game mode. If 0, each round a menu will pop up asking players what guns they want. If 1, guns and items are placed around the map for players to find. | 0 | No
csdm_item_time 20.0 | Sets how long map items stay on the ground. 0=permanent | 20.0 | No
csdm_random_spawns [0|1] | Sets whether to use the pre-made random spawns or not. Requires you disable and then re-enable CSDM Mod. | 1 | Yes
csdm_kill_all [0|1] | If set to 1, friendly fire is turned on and the object is to kill anyone. | 0 | No
csdm_drop_packs [0|1] | If set to 1, players will drop a pack of goodies when they die. | 1 | No
csdm_drop_weapons [0|1] | If set to 1, players are able to drop weapons. If set to 0, weapons will disappear once they are dropped. | 1 | No
csdm_delete_time 20.0 | Sets how long temporary items, such as weapons and packs, stay on the ground. 0=permanent, except for packs, which last for a max of 30 seconds. | 20.0 | No
csdm_allow_clguns [0|1] | If set to 1, a player can type "give " or "guns" in his menu to get weapons. | 1 | No
csdm_hold_many [0|1] | If set to 1, a player can hold multiple primary and secondary weapons. Dangerous! | 0 | No
csdm_auto_equip [0|1] | If set to 1, a player will automatically get armor on respawn. | 1 | No
csdm_auto_gren [0|1] | If set to 1, a player will automatically get grenades on respawn. | 1 | No
csdm_spawn_spam [0|1] | If set to 1, a player will get an information message on respawn. | 1 | No
csdm_enable_amenu [0|1] | If set to 1, the menus have an option about armor. | 1 | No
csdm_enable_gmenu [0|1] | If set to 1, the menus have an option about grenades. | 1 | No
csdm_spawn_protect [0|1|2] | If set to 0: No spawn protect. If set to 1: Normal spawn protection. If set to 2: Spawn protection stays until freezetime no matter what. | 1 | No
csdm_medkit [15] | Sets the number of health given by a medkit. Default is 15. | 15 | No
csdm_battery [15] | ets the number of armor given by a battery. Default is 15. | 15 | No
csdm_explain [0|1] | If set to 1, will explain how to use various items in game when you get them. Right now only explain the longjump. | 1 | No
csdm_auto_drop [0|1] | If set to 1, a player will automatically drop a gun that they are selecting a new gun in menu/normal mode. | 1 | No
csdm_pack_jumps [0|1] | If set to 0, long jumps will not be packed into a pack that drops on death. | 1 | No
csdm_asskicr [0|1] | If set to 1, and csdm_add_items is 1, Asskicr's changes will be used. | 0 | No
csdm_voting [0|1|2] | If set to 1, everyone is allowed to vote for CSDM mode. If set to 2, only admins with access level "m" are. 0=disable. | 2 | No
csdm_voting [abc] | Combine a, b, c to enable different votig options. "a" is Enable/Disable CSDM. "b" is Menu/Item mode. "c" is Normal or Free-for-all voting. | abc | No
csdm_ratio [0.6] | Sets the ratio required for the vote to succeed. | 0.6 | No
csdm_votetime [45] | Sets how long a vote lasts for. | 45 | No
csdm_nextvote [180] | Sets how much time must elapse before another vote is called. | 180 | No

IV. Commands

These are commands that can be typed through the console..

Admin Commands
Command | What it Does | Version Implemented | Access Level
--- | --- | --- | ---
csdm_enable [0|1] | Switches whether CSDM mode is on or off. | 1.0 | O
csdm_items [0|1] | Switches whether CSDM is in item mode (1) or menu mode (0). | 1.0 | O
csdm_version | Reports the version of CSDM being used. | 1.0 | ANY
csdm_setspawn <0|1|2>. | Creates a spawn point where you are standing, and records the view angles. 0 is default and means "random team". 1=T spawn, 2=CT spawn. | 1.0 | P
csdm_setspawnv <0|1|2>. | Legacy. Same thing as csdm_setspawn. | 1.0 | P
csdm_delspawn | Deletes spawn point from list. | 1.0 | P
csdm_setent | Creates an entity at your origin and reports its number. CSDM specific entities are "pistol_ammo", "shotgun_ammo", "smg_ammo", "rifle_ammo", "full_ammo", and "armor". Also supported are "item_battery", "item_healthkit", "item_longjump", and "weapon_<name>". weapon_shield IS NOT SUPPORTED, DO NOT USE IT. | 1.0 | P
csdm_delent | Deletes entity number from list. Note, if there's a marker there, it will not be removed. | 1.0 | P
csdm_viewspawns | Places obvious markers at each spawn, so a developer can see what he's doing. | 1.0 | P
csdm_spawncount | Shows the number of spawns available to you in a map. | 1.54 | P
csdm_rement | Removes an entity by direct id number. Very dangerous, especially when used below 33. | 1.0 | P
csdm_origin | Reports your origin. Useful for admins/developers debugging or setting entity/spawn points. | 1.0 | ANY
csdm_near | Reports your nearest spawn point. Useful for admins/developers debugging or setting entity/spawn points. | 1.0 | P
csdm_set_amenu | Toggles armor menu. | 1.0 | M
csdm_set_gmenu | Toggles grenade menu. | 1.0 | M
csdm_killall | Toggles free for all mode - you must kill teammates too! Automatically sets the CVARs for you. | 1.0 | M
csdm_look | Returns entity information of what you're looking at. Currently works most of the time - don't look at the sky =) | 1.0 | P
csdm_entinfo | Returns the class name of an entity id. Requires XTRAFUN. | 1.0 | P
csdm_entdump [n] | Returns a table of entity information starting after entity [n] (recommended start-150). Appends the dump to addons\amx\logs\csdm-ents.txt. Requires XTRAFUN. | 1.0 | P
csdm_cancelvote | Cancels any vote in progress. | 1.1 | M
csdm_vote OR vote_csdm | Starts a vote to enable CSDM. | 1.1 | ANY/M
Client Commands
respawn | If you're dead, this will respawn you. | 1.0 | ANY
guns | If enabled, this will bring up the gun selection menu. | 1.0 | ANY
give | If enabled, this will give you any weapon. Use names only, for example "ak47", not "weapon_ak47". | 1.0 | ANY
enable_menu | Will switch whether the gun selection menu automatically comes up or not. | 1.0 | ANY
vote_csdm OR csdm_vote | Starts a vote to enable CSDM. | 1.1 | ANY/M

V. Weapon Restriction

As of version 1.1, CSDM Mod contains built-in weapon blocking and restriction.

Open or create the file addons\amx\csdm\blocked.cfg and add one weapon per line to prevent that weapon from being given to players and from being spawned. You can also limit how many weapons are in play. For Menu/Normal mode, this limits based on people's weapon choices. For Find Item mode, this is based on who is holding what. For example:

    addons\amx\csdm\blocked.cfg:
    shield
    smokegrenade
    flashbang
    awp 5

This will block any usage of shields, smokegrenades, flashbangs, and limit the awp to 5 instances.

VI. Items

Items you can Get
Pistol Ammo = Contains ammo for all pistols | Shotgun Ammo = Contains ammo for both shotguns | Smg Ammo = Contains ammo for all smgs | Rifle Ammo = Contains ammo for all rifles
Medikit = Gives you health | Battery = Gives you armor | Drop Pack = When you kill a player they will drop this, containing their stuff. | Long Jump = Use this by pressing Duck+Jump while moving forward - you will jump far!
Awp ammo = (AssKicR) Gives ammo for awp | Armor = Full armor and helmet | Ammo Box = (AssKicR) Full ammo | Para ammo = (AssKicR) Para ammo

VII. The Credits and copyrights.

(C)1995-2004 The TCW Organization and David "BAILOPAN" Anderson

This would not have been possible without the help of Freecode, AssKicR, and PM.

Original idea by isbunk (lagbeast).

http://www.tcwonline.org/

* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

AMX Mod X can be found here: http://www.amxmodx.org/

The people who contributed to csdm_mod are:

- Developer: David "BAILOPAN" Anderson ( root@tcwonline.org )
- Ideas, solutions, fixes, contributors: isbunk, AssKicR, Freecode
- Beta testing: BAILOPAN, isbunk, AssKicR, Freecode
- HUGE THANKS to PM OnoTo, the mastermind who indirectly solved the 02-09 CSDM Entity Removal Problem. Amen.
- Pre 1.50 Spawn points: BAILOPAN, isbunk
- Entity+Spawn points: BAILOPAN, AssKicR, Romaaa
- Random tips: AssKicR, Freecode, PM
- Thank you to ESportsEA at http://www.esportsea.com for sponsoring the initial Steam Fixes toward CSDM, and letting me play on their premium servers =)
- Thanks to everyone who submitted bug reports and handed over their CVARs on demand ;]
- Thank you for using one of my plugins! I will code your request if I find it challenging, useful, and interesting!

VIII. Changelog.

    ----------
    Changelog:
    ----------
    1.70 Release Build 280 (11-15-2004)
    	Updated for AMX Mod X 1.00.
    	Added KWo's bot support.  Thank you, KWo!
    	Added many more spawn points from the community.
    	Fixed a bug where some weapons could not be blocked.
    1.69 Release Build 275 (04-22-2004)
    	Fixed trivial Condition Zero support.
    	Fixed crash bug in C4 removal code (thanks to BMC for test server).
    	  Note on the above: this would cause the game to crash on Ts joining.
    	Fixed radio blocking.
    	Updated some messages.
    1.68 Release Build 268 (04-16-2004)
    	Converted to AMX Mod X.
    	Added trivial support for Condition Zero.
    	Added entities for de_train (Freeman)
    	Added entities+spawns for scoutezknives, iceworld, awp_map, ka_legoland (-[Dos]- Clan).
    	Added cvar csdm_sounds (defaults to 1) to turn the spawning sounds off.
    	Fixed bad variable notation in for loops.
    	Fixed references to get_user_weapons (AMX bug).
    	Fixed errors relating to grenade blocking.
    	Hostages SHOULD be restored properly on csdm shutdown now.
    	Note: There was an intermediary 1.67 release for trivial AMXx support.
    1.60 Release Build 260 (02-25-2004)
    	!!! NEW SPAWN CREATION ALGORITHM
    	!!! NEW WEAPON DELETION ALGORITHM
    	!!! FIXED CPU/LAG PROBLEMS
    	!!! NEW MAP PACK
    	Added weapon restriction and limiting.
    	Added C4 disabling.
    	Added restartround to clear maps for CSDM.
    	Added the ability to fully switch CSDM on and off WITHOUT RESTARTING.
    	Added new cvar - csdm_steam (defaults to 1).
    	Added more voting options and changed voting code.
    	Fixed spawn point manipulation commands.
    	Fixed spawn point view angles.
    	Fixed csdm_drop_weapons - you can drop weapons again.
    	Fixed possible internal entity collision problem.
    	Fixed spawning to work with new Steam engine.
    	Fixed bug where round restart made it impossible to use or get longjumps.
    	Fixed bug where pressing "2" in menu mode would not rebuy armor or grenades.
    	Fixed bug where voting for CSDM actually did nothing.  Oops.
    	Fixed bugs in file parsing algorithms.
    	Fixed bugs in entity parsing algorithms.
    	Fixed menus to show P90.
    	Fixed weapon blocking (1.30+).
    	Fixed menus so they no longer disappear on invalid selection.
    	Changed some CVAR defaults.
    	Removed map cleaning process to appease new Steam engine.
    	Removed csdm_allow_smoke - use blocked.cfg.
    1.13 Release Build 191 (02-02-2004)
    	Added entities for cs_estate( AssKicR).
    	Fixed minor bug with ammo.
    1.10 Release Build 190 (02-01-2004)
    	Added pseudo-random spawning (based on cvar timer).
    	Added weapon blocking/restrictions.
    	Added AssKicR's changes.
    	Added voting to enable CSDM.
    	Fixed sound issues with items.
    	Fixed random spawning algorithm.
    	Fixed csdm_delete_time.
    	Completely removed debug mode.
    	Made csdm_viewspawns show T or CTs.
    	Enhanced readme.
    	NOTE: AssKicR is now the CSDM maintainer.
    1.00 Release Build 184 (01-29-2004)
    	Fixed small error in command blocking.
    	Fixed error not being able to pick up MP5s.
    1.00 FINAL RELEASE 183 (01-28-2004)
    	Final Public Release
    	Added auto-gun dropping option.
    	Fixed internal entity table (fixes csdm_delent).
    	Reverted to original entity creation system.
    	Redefined de_dust entities.
    	Added entities for cs_militia (BAILOPAN).
    	Added entities for cs_office (BAILOPAN).
    	Added entities for cs_siege (AssKicR).
    	Added entities for de_inferno (AssKicR).
    1.00 Release Build 178 (01-27-2004)
    	Rewrote weapon entity collision/creation system.
    	Wrote a weaponbox deletion system that will safely remove weapons.
    1.00 Release Build 171 (01-26-2004)
    	Removed unncessary tempent code.
    	Hardened crashed protection?
    1.00 Release build 170 (01-26-2004)
    	Added requirement of Xtrafun (to count entities).
    	Added native support for item_healthkit, item_battery, and item_longjump.
    	Added more cvars for control.
    	Rewrote entity system.  Fixed crashes.
    	Fixed spawn/spectator stacking.
    	Fixed all entity timing problems.
    	Fixed having to restart the plugin to make changes.
    	Separated debugging mode into optional compile.
    1.00 Beta build 148: (01-12-2004)
    	Fixed csdm_setspawn, csdm_setspawnv.
    	Fixed small bug in respawn code.
    	Removed csdm_add_items requirement for csdm_viewspawns.
    1.00 Beta build 145: (01-12-2004)
    	Added better buy-blocking, thank you AssKicR.
    	Added csdm_look, thank you AssKicR.
    	Added csdm_spawn_protect which has new modes.
    	Added new says: players can now say "guns", "enablemenu", "menu", and "enable_menu".
    	Changed how csdm_setspawn works -- more random and now can set predefined spawn values.
    	Fixed weapon dropping AGAIN, this time for bots too.
    	Fixed that annoying team join bug.
    	Fixed HUD problems by using double spawn trick - again.
    	Re-formatted all spawn entries for new format.
    1.00 Beta build 143: (01-12-2004)
    	Completely rewrote weapon dropping code.
    	Added new debug code - csdm_debug.
    	Added opt-out option for menus.
    	Removed double respawn hack.
    	Fixed menus again.
    	Fixed crashing bug in force_drop_all().
    	Fixed possible edict slot problem in replaceWeapons().
    	Fixed loading/viewing spawn angle vectors.
    1.00 Beta build 138: (01-10-2004)
    	Fixed issues with enable_menu and guns.
    	Fixed issues with csdm_spawn_spam.
    	Added CVAR csdm_allow_smoke, default 1.
    	Finished removing debug code.
    1.00 Beta build 137: (01-10-2004)
    	Fixed errors in csdm_setent.
    	Fixed error with first spawn.
    	Fixed how weapons kind of plop down. (AssKicR)
    	Added de_aztec entities.
    	Removed some issues with dropping weapons.
    	Removed debug mode.
    1.00 Beta build 136: (01-10-2004)
    	Fixed readMapFile() - DO NOT USE BUILD 135
    	Made so "guns" and "respawn" can be used through say.
    1.00 Beta build 135: (01-10-2004)
    	Now uses HEV suit for csdm_viewspawns.
    	Removed dummyguerilla precache.
    	Changed respawning, again.  Not instaneous anymore.
    	Fixed potential crash bug with menus?
    	Fixed csdm_killall bug.
    	csdm_setspawnv records angles.
    	Removed HUD-redrawing code.
    1.00 Beta build 134: (01-07-2004)
    	Fixed all HUD message problems.
    	Fixed spawning problems.
    	Fixed weapon dropping problems.
    	Fixed weapon deletion problems.
    	Fixed weapons dropping on death problems.
    	Fixed spawn weapon problems in normal mode.
    	Added csdm_ent, fixed csdm_delent.
    	Added skeleton code for csdm_look.
    1.00 Beta build 131: (01-07-2004)
    	Added blocking of radio again.
    	Fixed csdm_kill_all issue.
    1.00 Beta build 130: (01-07-2004)
    	Fixed dropping issue.
    	Fixed weapons not disappearing issue.
    	Reverted to some older code.
    1.00 Beta build 128: (01-07-2004)
    	Changed "armour" to "armor".
    	Fixed secondary weapon bug.
    	Made guns re-enable menu.
    	Increased MAX_ENTS to 200.
    	[Unrelated] Finished de_dust ents.
    	Fixed clip sizes for flashbang, fiveseven.
    	Removed blank line error in spawn/ent files.
    	Fixed crosshairs.
    	Fixed menu issues, again.
    1.00 Beta build 127: (01-07-2004)
    	Changed "armour" to "armor".
    	Fixed secondary weapon bug.
    	Made guns re-enable menu.
    	Increased MAX_ENTS to 200.
    	[Unrelated] Finished de_dust ents.
    1.00 Beta Build 126: (01-07-2004)
    	Fixed more spawning issues.
    	Added more to menu options.
    	Added csdm_set_amenu, csdm_set_gmenu, csdm_near, csdm_debug
    	Added CVARs csdm_enable_amenu, csdm_enable_gmenu
    	Resolved end of map crashing issue.
    1.00 Beta Build 121: (01-06-2004)
    	Fixed spawning issues.
    	Unblocked radio and audio messages.
    1.00 Beta Build 120: (01-06-2004)
    	Removed old drop hook code and task code.
    1.00 Beta Build 119: (01-06-2004)
    	Fixed equip bug
    1.00 Beta Build 118: (01-06-2004)
    	Initial beta release