3 * =============================================================================
4 * SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
5 * =============================================================================
7 * This file is part of the SourceMod/SourcePawn SDK.
9 * This program is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, version 3.0, as published by the
11 * Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 * You should have received a copy of the GNU General Public License along with
19 * this program. If not, see <http://www.gnu.org/licenses/>.
21 * As a special exception, AlliedModders LLC gives you permission to link the
22 * code of this program (as well as its derivative works) to "Half-Life 2," the
23 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
24 * by the Valve Corporation. You must obey the GNU General Public License in
25 * all respects for all other code used. Additionally, AlliedModders LLC grants
26 * this exception to all derivative works. AlliedModders LLC defines further
27 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
28 * or <http://www.sourcemod.net/license.php>.
33 #if defined _tf2_included
54 TFTeam_Unassigned = 0,
61 * Set's a Clients invulnrability status (ubercharge effect)
63 * @param client Player's index.
64 * @param enabled Enable/Disable invulnrability.
66 * @error Invalid client index, client not in game, or no mod support.
68 native TF2_SetPlayerInvuln(client, bool:enabled);
73 * @param client Player's index.
75 * @error Invalid client index, client not in game, or no mod support.
77 native TF2_RespawnPlayer(client);
80 * Disguises a client to the given model and team. Only has an effect on spies.
82 * Note: This only starts the disguise process and a delay occurs before the spy is fully disguised
84 * @param client Player's index.
85 * @param team Team to disguise the player as (only TFTeam_Red and TFTeam_Blue have an effect)
86 * @param class TFClassType class to disguise the player as
88 * @error Invalid client index, client not in game, or no mod support.
90 native TF2_DisguisePlayer(client, TFTeam:team, TFClassType:class);
93 * Removes the current disguise from a client. Only has an effect on spies.
95 * @param client Player's index.
97 * @error Invalid client index, client not in game, or no mod support.
99 native TF2_RemovePlayerDisguise(client);
102 * Retrieves the entity index of the CPlayerResource entity
104 * @return The current resource entity index.
106 native TF2_GetResourceEntity();
109 * Finds the TFClassType for a given class name.
111 * @param classname A classname string such as "sniper" or "demoman"
112 * @return A TFClassType constant.
114 native TFClassType:TF2_GetClass(const String:classname[]);
117 * Called on weapon fire to decide if the current shot should be critical.
118 * Return Plugin_Continue to let the original calculation or return a higher
119 * action to override the decision with the value of 'result'
121 * @note Since critical shots are also calculated client side any changes made with
122 * this will not show for the shooter. Projectile weapons such as the rocketlauncher
123 * and demoman weapons will show a critical bullet but no critical sound effect.
124 * Bullet hits should appear as expected.
126 * @param client Client Index.
127 * @param weapon Weapon entity Index.
128 * @param weaponname Classname of the weapon.
129 * @param result Buffer param for the result of the decision.
131 forward Action:TF2_CalcIsAttackCritical(client, weapon, String:weaponname[], &bool:result);
134 * Do not edit below this line!
136 public Extension:__ext_tf2 =
139 file = "game.tf2.ext",
141 #if defined REQUIRE_EXTENSIONS