Updated CS:GO Cstrike ext gamedata.
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 _sdktools_tempents_included
36 #define _sdktools_tempents_included
39 * Called when a temp entity is going to be sent.
41 * @param te_name TE name.
42 * @param Players Array containing target player indexes.
43 * @param numClients Number of players in the array.
44 * @param delay Delay in seconds to send the TE.
45 * @return Plugin_Continue to allow the transmission of the TE, Plugin_Stop to block it.
47 functag public Action:TEHook(const String:te_name[], const Players[], numClients, Float:delay);
50 * Hooks a temp entity.
52 * @param te_name TE name to hook.
53 * @param hook Function to use as a hook.
55 * @error Temp Entity name not available or invalid function hook.
57 native AddTempEntHook(const String:te_name[], TEHook:hook);
60 * Removes a temp entity hook.
62 * @param te_name TE name to unhook.
63 * @param hook Function used for the hook.
65 * @error Temp Entity name not available or invalid function hook.
67 native RemoveTempEntHook(const String:te_name[], TEHook:hook);
70 * Starts a temp entity transmission.
72 * @param te_name TE name.
74 * @error Temp Entity name not available.
76 native TE_Start(const String:te_name[]);
79 * Checks if a certain TE property exists.
81 * @param prop Property to use.
82 * @return True if the property exists, otherwise false.
84 native bool:TE_IsValidProp(const String:prop[]);
87 * Sets an integer value in the current temp entity.
89 * @param prop Property to use.
90 * @param value Integer value to set.
92 * @error Property not found.
94 native TE_WriteNum(const String:prop[], value);
97 * Reads an integer value in the current temp entity.
99 * @param prop Property to use.
100 * @return Property value.
101 * @error Property not found.
103 native TE_ReadNum(const String:prop[]);
106 * Sets a floating point number in the current temp entity.
108 * @param prop Property to use.
109 * @param value Floating point number to set.
111 * @error Property not found.
113 native TE_WriteFloat(const String:prop[], Float:value);
116 * Reads a floating point number in the current temp entity.
118 * @param prop Property to use.
119 * @noreturn Property value.
120 * @error Property not found.
122 native Float:TE_ReadFloat(const String:prop[]);
125 * Sets a vector in the current temp entity.
127 * @param prop Property to use.
128 * @param vector Vector to set.
130 * @error Property not found.
132 native TE_WriteVector(const String:prop[], const Float:vector[3]);
135 * Reads a vector in the current temp entity.
137 * @param prop Property to use.
138 * @param vector Vector to read.
140 * @error Property not found.
142 native TE_ReadVector(const String:prop[], Float:vector[3]);
145 * Sets a QAngle in the current temp entity.
147 * @param prop Property to use.
148 * @param angles Angles to set.
149 * @return True on success, otherwise false.
150 * @error Property not found.
152 native TE_WriteAngles(const String:prop[], const Float:angles[3]);
155 * Sets an array of floats in the current temp entity.
157 * @param prop Property to use.
158 * @param array Array of values to copy.
159 * @param arraySize Number of values to copy.
160 * @return True on success, otherwise false.
161 * @error Property not found.
163 native TE_WriteFloatArray(const String:prop[], const Float:array[], arraySize);
166 * Sends the current temp entity to one or more clients.
168 * @param clients Array containing player indexes to broadcast to.
169 * @param numClients Number of players in the array.
170 * @param delay Delay in seconds to send the TE.
172 * @error Invalid client index or client not in game.
174 native TE_Send(clients[], numClients, Float:delay=0.0);
177 * Sets an encoded entity index in the current temp entity.
178 * (This is usually used for m_nStartEntity and m_nEndEntity).
180 * @param prop Property to use.
181 * @param value Value to set.
183 * @error Property not found.
185 stock TE_WriteEncodedEnt(const String:prop[], value)
187 new encvalue = (value & 0x0FFF) | ((1 & 0xF)<<12);
188 return TE_WriteNum(prop, encvalue);
192 * Broadcasts the current temp entity to all clients.
193 * @note See TE_Start().
195 * @param delay Delay in seconds to send the TE.
198 stock TE_SendToAll(Float:delay=0.0)
201 new clients[MaxClients];
202 for (new i=1; i<=MaxClients; i++)
204 if (IsClientInGame(i))
206 clients[total++] = i;
209 return TE_Send(clients, total, delay);
213 * Sends the current TE to only a client.
214 * @note See TE_Start().
216 * @param client Client to send to.
217 * @param delay Delay in seconds to send the TE.
219 * @error Invalid client index or client not in game.
221 stock TE_SendToClient(client, Float:delay=0.0)
227 return TE_Send(players, 1, delay);