plugins/include/cstrike.inc
author David Anderson <dvander@alliedmods.net>
Tue Nov 27 02:19:39 2007 +0000 (2007-11-27)
changeset 1729 0f60cc4ce8bb
parent 1573 979f2ccfee5a
child 1822 cb4bb315da60
permissions -rw-r--r--
added amb1191 - absolute paths
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * =============================================================================
     6  *
     7  * This file is part of the SourceMod/SourcePawn SDK.
     8  *
     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.
    12  * 
    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
    16  * details.
    17  *
    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/>.
    20  *
    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>.
    29  *
    30  * Version: $Id$
    31  */
    32 
    33 #if defined _cstrike_included
    34   #endinput
    35 #endif
    36 #define _cstrike_included
    37 
    38 #include <core>
    39 
    40 #define CS_TEAM_NONE		0	/**< No team yet. */
    41 #define CS_TEAM_SPECTATOR	1	/**< Spectators. */
    42 #define CS_TEAM_T 			2	/**< Terrorists. */
    43 #define CS_TEAM_CT			3	/**< Counter-Terrorists. */
    44 
    45 #define CS_SLOT_PRIMARY		0	/**< Primary weapon slot. */
    46 #define CS_SLOT_SECONDARY	1	/**< Secondary weapon slot. */
    47 #define CS_SLOT_GRENADE		3	/**< Grenade slot (will only return one grenade). */
    48 #define CS_SLOT_C4			4	/**< C4 slot. */
    49 
    50 /**
    51  * Respawns a player.
    52  *
    53  * @param client		Player's index.
    54  * @noreturn
    55  * @error			Invalid client index, client not in game.
    56  */
    57 native CS_RespawnPlayer(client);
    58 
    59 /**
    60  * Switches the player's team.
    61  *
    62  * @param client		Player's index.
    63  * @param team			Team index.
    64  * @noreturn
    65  * @error			Invalid client index, client not in game.
    66  */
    67 native CS_SwitchTeam(client, team);
    68 
    69 /**
    70  * Do not edit below this line!
    71  */
    72 public Extension:__ext_cstrike = 
    73 {
    74 	name = "cstrike",
    75 	file = "games/game.cstrike.ext",
    76 	autoload = 0,
    77 #if defined REQUIRE_EXTENSIONS
    78 	required = 1,
    79 #else
    80 	required = 0,
    81 #endif
    82 };
    83 
    84 #if !defined REQUIRE_EXTENSIONS
    85 public __ext_cstrike_SetNTVOptional()
    86 {
    87 	MarkNativeAsOptional("CS_RespawnPlayer");
    88 	MarkNativeAsOptional("CS_SwitchTeam");
    89 }
    90 #endif