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
16 #if defined _sdktools_functions_included
19 #define _sdktools_functions_included
22 * Removes a player's item.
24 * @param client Client index.
25 * @param item CBaseCombatWeapon entity index.
26 * @return True on success, false otherwise.
27 * @error Invalid client or entity, lack of mod support, or client not in
30 native bool:RemovePlayerItem(client, item);
33 * Gives a named item to a player.
35 * @param client Client index.
36 * @param item Item classname (such as weapon_ak47).
37 * @param iSubType Unknown.
38 * @return Entity index on success, or -1 on failure.
39 * @error Invalid client or client not in game, or lack of mod support.
41 native GivePlayerItem(client, const String:item[], iSubType=0);
44 * Returns the weapon in a player's slot.
46 * @param client Client index.
47 * @param slot Slot index (mod specific).
48 * @return Entity index on success, -1 if no weapon existed.
49 * @error Invalid client or client not in game, or lack of mod support.
51 native GetPlayerWeaponSlot(client, slot);
54 * Ignites an entity on fire.
56 * @param entity Entity index.
57 * @param time Number of seconds to set on fire.
58 * @param npc True to only affect NPCs.
59 * @param size Unknown.
60 * @param level Unknown.
62 * @error Invalid entity or client not in game, or lack of mod support.
64 native IgniteEntity(entity, Float:time, bool:npc=false, Float:size=0.0, bool:level=false);
67 * Extinguishes a player that is on fire.
69 * @param entity Entity index.
71 * @error Invalid entity or client not in game, or lack of mod support.
73 native ExtinguishEntity(client);
76 * Teleports an entity.
78 * @param entity Client index.
79 * @param origin New origin, or NULL_VECTOR for no change.
80 * @param angles New angles, or NULL_VECTOR for no change.
81 * @param velocity New velocity, or NULL_VECTOR for no change.
83 * @error Invalid entity or client not in game, or lack of mod support.
85 native TeleportEntity(entity, const Float:origin[3], const Float:angles[3], const Float:velocity[3]);
88 * Forces a player to commit suicide.
90 * @param client Client index.
92 * @error Invalid client or client not in game, or lack of mod support.
94 native ForcePlayerSuicide(client);
97 * Slaps a player in a random direction.
99 * @param client Client index.
100 * @param health Health to subtract.
101 * @param sound False to disable the sound effects.
103 * @error Invalid client or client not in game, or lack of mod support.
105 native SlapPlayer(client, health=5, bool:sound=true);
108 * Returns the client's eye angles.
110 * @param client Player's index.
111 * @param ang Destination vector to store the client's eye angles.
113 * @error Invalid client index, client not in game, or no mod support.
115 native GetClientEyeAngles(client, Float:ang[3]);
120 stock IgnitePlayer(client, Float:time, bool:npc=false, Float:size=0.0, bool:level=false)
122 return IgniteEntity(client, time, npc, size, level);
128 stock ExtinguishClient(client)
130 return ExtinguishEntity(client);
136 stock TeleportPlayer(client, const Float:origin[3], const Float:angles[3], const Float:velocity[3])
138 return TeleportEntity(client, origin, angles, velocity);