csdm_amxx - Counter-Strike Deathmatch.
(C)2003-2008 by David "BAILOPAN" Anderson
CSDM Mod allows you to play Counter-Strike in a variety of highly configurable deathmatch scenarios. The current version is 2.1.2.
Sections:

1. Downloading
2. Installing
3. Configuration
4. Commands
5. Developing/Codng
6. Support
7. The credits and copyrights.
8. Changelog

I. Downloading

You can always find the latest version of CSDM as a package at the CSDM Homepage.

The source code is available in full in its SVN Repository.

II. Installing

CSDM Mod requires AMX Mod X 1.8.1 or higher. Most plugins will require the Engine and CSTRIKE modules enabled. It was designed to run on Counter-Strike and will not work on any other mod (except Condition Zero).

To install the mod, follow these directions:

1. Extract the CSDM package to your addons/amxmodx folder, or extract it locally for upload to FTP.
2. Open addons/amxmodx/configs/plugins-csdm.ini file and enable/disable the plugins you want.
3. Open addons/amxmodx/configs/csdm.cfg and configure CSDM to your liking.
4. Restart your HLDS server, and you're done!

III. Configuration

Configuration is done entirely through the csdm.cfg file in amxmodx/configs. These values are NOT cvars! The csdm.cfg file is a special file that is read and parsed separately so multiple plugins can easily see values in it. Each value is explained either in the csdm.cfg file or in the documentation provided by the respective plugin.

IV. Commands

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

Admin Commands
Command | What it Does | Plugin | Access Level
--- | --- | --- | ---
csdm_enable/csdm_disable | Switches whether CSDM mode is on or off. | csdm_main | f
csdm_reload | Reloads the csdm.cfg config file. | csdm_main | f
csdm_menu | Shows the CSDM admin menu. | csdm_main | u
edit_spawns | Shows the spawn editing menu (for adding or changing map support). Map config files are stored in amxmodx/configs/csdm/map.spawns.cfg, where map is the map name. | spawn_editor | f
csdm_cache | Developers - shows information about the CSDM runtime cache. | csdm_main | f
guns, /guns, menu, enablemenu, enable_menu | Saying any of these re-enables the equip menu. | csdm_equip | ANY
csdm_ffa_enable, csdm_ffa_disable, csdm_ffa_ctrl | Enable/Disable/Menu for FFA Mode. | csdm_ffa | f

CSDM also defines two publically cvars: csdm_active (sets whether CSDM is enabled, also can be set by admins), and csdm_version (the CSDM version). Lastly, there is a public "csdm" command that displays credits.

V. Developing/Coding

CSDM 2.1 is modular. The base portion is a module built to handle and capture primitive events, as well as express things which would be computationally expensive as a plugin. It is optimized for efficiency.

The idea behind CSDM 2.1 is rather than including every portion in one plugin, developers can write simple addons, using the basic events provided by the module. This way using other modules or expensive parsing is often not necessary. For a full reference of CSDM 2.0's API, you should see csdm.inc in the scripting/include folder of the CSDM download, or view it on SVN: csdm.inc. A good example of a simple plugin using the API is csdm_tickets.sma.

The module automatically respawns players whenever a player joins, a round restarts, or a player dies. The spawn events allow plugins to interrupt or hook various importat stages in a player's death/revival. The module makes no attempt to spawn players in a certain location, it simply revives them. Instead, it allows "spawn handlers" to attach. The current spawn style handler (set by csdm_main) is notified when it can relocate a player.

The module handles the following things, notifying plugins:

- Round restarts
- Player deaths (you can block respawning)
- Player spawns (both "fake" and "real")
- Configuration file settings

Lastly, the module also contains fast routines for common things, such as setting/retrieving player positions, respawning players through the CSDM interface, and removing weapons from the world or players.

VI. Support

I do not officially support or maintain CSDM anymore, as I don't have the time. If you've got a specific question that the manual or forums can't help you with, feel free to contact me:

- IRC: #amxmodx on GameSurge, usually named BAILOPAN or dvander.
- E-mail: bailopan@gmail@com
- PM: Send me a PM on the AMX Mod X forums.

VII. The Credits and copyrights.

(C)2003-2006 David "BAILOPAN" Anderson
This would not have been possible without the help of Freecode, AssKicR, and PM.
Large parts of the CSDM plugin base was written by Freecode. Thank you very much, Freecode!
Thanks to Riddick51 of UFC, who sponsored CSDM 2.0!
Thanks to twistedeuphoria for being a competitor, motivating this.
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 ( www.bailopan.net )
- Developer: Mike "Freecode" Vvedenskiy ( thanks for the plugin help! )
- Developer: Borja "faluco" Ferrer ( thanks for csdm_itemmode help! )
- Ideas, solutions, fixes, contributors: isbunk, AssKicR, Freecode, PM OnoTo
- Beta testing: BAILOPAN, isbunk, AssKicR, Freecode, ESEA, KWo
- Pre 1.50 Spawn points: BAILOPAN, isbunk
- Entity+Spawn points: BAILOPAN, AssKicR, Romaaa
- Thanks to teame06 and Nick|NFo of NuclearFallout for testing and bug reporting.
- A HUGE thanks to Riddick of Ultimate Fighting Championship (UFC), who sponsored the development of CSDM 2.0.
- 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 enjoyed CSDM! This is the mod that brought me into every corner of the HL development world, and I've been very grateful for your support.

VIII. Changelog.

    ----------
    Changelog:
    ----------
    2.1.2 -- Bugfix Release (10-25-2008)
    	Fixed compatibility against latest CS 1.6 version (thanks sawce!)
    2.1.1 -- Bugfix Release (11-08-2007)
    	Fixed compatibility bug with AMX Mod X 1.8.0 and Linux.
    	Fixed two small potential RTE errors.
    	Fixed admin command having blank access permissions.
    	Merged in a few bug fixes from AMX Mod X Core.
    	Reduced or eliminated potential FreeBSD compatibility problems.
    	Commented spawn editor from being enabled by default.
    	Removed AMD64 build.
    2.1 -- Final Release (10-10-2006)
    	Fixed bots not getting defuse kits when auto-enabled.
    	Fixed defuse kits not being removed from the world on death.
    2.1-rc7 -- Private Release Candidate (10-10-2006)
    	Fixed various issues when enabling the shield (unsupported).
    2.1-rc6 -- Private Release Candidate (10-10-2006)
    	CSDM now remembers whether a user silenced their gun or not (M4A1, USP).
    	Fixed bots not getting autoarmor/grenades properly.
    2.1-rc5 -- Private Release Candidate (10-05-2006)
    	Rewrote, optimized, and improved safety of weapon deletion.
    	Added 'n' autoitem to give nightvision goggles.
    	Added 'd' autoitem to give defuse kits to CTs.
    	Fixed another spectator spawning glitch.
    	Fixed shields not being deleted if enabled.
    	Fixed being able to say "respawn" in ticket mode while dead.
    2.1-beta4 -- Public Beta (06-06-2006)
    	Rewrote many internal hooking routines to be more deterministic and faster.
    	Rewrote respawning mechanism to reduce ghosting possibilities.
    	Removed "Engine" dependency - CSDM is now Fakemeta only.
    	Added "item mode" from CSDM 1.7.
    	Added FFA mode -- and fixed reduced damage, tk messages, and scoring.
    	Re-wrote spawn editor from scratch - now actually works.
    	Added "spawn_wait_time" to csdm.cfg.
    	Fixed ghosting bugs.
    	Fixed round ticketing bugs.
    	Fixed various minor bugs.
    	Fixed various API issues (note: CSDM2.1 breaks CSDM2 API).
    2.00    Release Build 500 (10-18-2005)
    	Completely rewrote CSDM to be a modular API.
    	CSDM is now a module, controlled by separate plugins.
    	Configuration is through a unified file, rather than cvars.
    	Replaced spawn commands with a graphical, intuitive spawn editor.
    	Improved spawn algorithms.
    	Rounds can be blocked correctly again.
    	ResetHUD exploits no longer work.
    	Added round-ticketing mode.
    	Removed all support for AMX Mod (all versions).
    	Removed all support for earlier versions of CS.
    	Removed "item" and "ffa" modes (to be re-added later).
    	Vastly reduced base CPU usage.
    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