Change SetEntData to SetEntProp, Fix giving helmet wrongly.
3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is part of the SourceMod/SourcePawn SDK. This file may only be used
8 * or modified under the Terms and Conditions of its License Agreement, which is found
9 * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins
10 * may change at any time. To view the latest information, see:
11 * http://www.sourcemod.net/license.php
13 * Version: $Id: cssdm.inc 416 2007-07-25 04:38:40Z dvander $
16 #if defined _cssdm_included
19 #define _cssdm_included
21 #define CSSDM_VERSION "2.1.6-dev"
23 #define CSSDM_MAX_WEAPONS 32
25 #define CSSDM_TEAM_T 2
26 #define CSSDM_TEAM_CT 3
30 DmWeapon_Invalid = -1,
32 DmWeapon_Secondary = 1,
38 * Called when CS:S DM is started/enabled. If CS:S DM is enabled,
39 * this will get called at the start of every map.
41 forward DM_OnStartup();
44 * Called when CS:S DM is disabled. If CS:S DM is enabled, this
45 * will get called at the end of the map.
47 forward DM_OnShutdown();
50 * Called when a player spawns and CS:S DM is active. This
51 * is a wrapper around the "player_spawn" event.
53 * @param client Client index.
56 forward DM_OnClientSpawned(client);
59 * Called when a player spawns and CS:S DM is active. This
60 * is called after all plugins are done processing
61 * DM_OnClientSpawned().
63 * @param client Client index.
66 forward DM_OnClientPostSpawned(client);
69 * Called when a player dies.
72 * @param client Client index.
73 * @return Plugin_Handled to block player from respawning.
75 forward Action:DM_OnClientDeath(client);
78 * Called when the cssdm_spawn_method cvar changes.
80 * @param method Method name.
81 * @return Plugin_Stop to handle this method.
83 forward Action:DM_OnSetSpawnMethod(const String:method[]);
86 * Returns whether CS:S DM is running or not. This should be used to
87 * check whether non-CS:S DM callbacks should be processed.
89 * @return True if CS:S DM is running, false otherwise.
91 native bool:DM_IsRunning();
94 * Retrieves the CS:S DM spawning method.
96 * @param method Method name buffer.
97 * @param maxlength Maximum size of the method name buffer.
100 native DM_GetSpawnMethod(const String:method[], maxlength);
103 * Provides lookup for a weapon by its short name.
105 * @param name Weapon short name (such as "usp").
106 * @return Weapon ID in CS:S DM, or -1 on failure.
108 native DM_GetWeaponID(const String:name[]);
111 * Gets the type of a weapon by index.
113 * @param id Weapon ID.
114 * @return Weapon type.
115 * @error Invalid weapon index.
117 native DmWeaponType:DM_GetWeaponType(index);
120 * Retrieves the classname of a weapon.
122 * @param id Weapon ID.
123 * @param classname Class name buffer.
124 * @param maxlength Maximum length of the class name buffer.
126 * @error Invalid weapon index.
128 native DM_GetWeaponClassname(id, String:classname[], maxlength);
131 * Retrieves the display name of a weapon.
133 * @param id Weapon ID.
134 * @param name Display name buffer.
135 * @param maxlength Maximum length of the display name buffer.
137 * @error Invalid weapon index.
139 native DM_GetWeaponName(id, String:name[], maxlength);
142 * Retrieves the entity index of a weapon in a player's weapon slot.
144 * @param client Client index.
145 * @param type Weapon slot type.
146 * @return Entity index, or -1 for none.
148 native DM_GetClientWeapon(client, DmWeaponType:type);
151 * Drops a client's weapon. CS:S DM removes dropped weapons from the world.
153 * @param client Client index.
154 * @param entity Weapon entity index.
156 * @error Client index invalid or not in game; weapon entity invalid.
158 native DM_DropWeapon(client, entity);
161 * Strips all items from a bot, excluding their player suit.
163 * @param client Client index.
165 * @error Invalid client index, client not in game, nor client not a bot.
167 native DM_StripBotItems(client);
170 * Returns the spawn waiting time.
172 * @return Spawn wait time, in seconds.
174 native Float:DM_GetSpawnWaitTime();
177 * Respawns a player using CS:S's low level respawning function. This can be
178 * called even if the player is not dead.
180 * @param client Client index.
181 * @param fullRespawn If true, client will be forwarded through player_spawn
184 * @error Invalid client index or client not in game.
186 native DM_RespawnClient(client, bool:fullRespawn=true);
189 * Returns whether or not a client is alive.
191 * @param client Client index.
192 * @return True if alive, false if dead.
193 * @error Invalid client index or client not in game.
195 native DM_IsClientAlive(client);
198 * Gives ammo to a player.
200 * @param client Client index.
201 * @param type Ammo type (>=0).
202 * @param count Ammo amount to give.
203 * @param noSound If true, the ammo sound will be suppressed.
204 * @return Actual ammo amount given.
205 * @error Invalid client index or client not in game.
207 native DM_GiveClientAmmo(client, type, count, bool:noSound=false);
210 * Do not edit below this line!
212 public Extension:__ext_cssdm =
216 #if defined AUTOLOAD_EXTENSIONS
221 #if defined REQUIRE_EXTENSIONS