<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peace-Maker</id>
	<title>AlliedModders Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peace-Maker"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/Peace-Maker"/>
	<updated>2026-05-25T23:01:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=11251</id>
		<title>SDKTools (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=11251"/>
		<updated>2021-10-28T16:33:02Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Add CRC32 section specialization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The SDKTools extension is an extension for various functions provided by the Source SDK.  Additionally, it has the ability to dynamically call many C++ functions in the SDK, for example, from CBaseEntity or any derived class.&lt;br /&gt;
&lt;br /&gt;
SDKTools contains simplified versions of SDK functions pre-written for ease of use.  These can be found in the additional include files:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_functions.inc&amp;lt;/tt&amp;gt; - Popular functions from the SDK.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt; - [[#Sound Functions|Sound-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents.inc&amp;lt;/tt&amp;gt; - [[#TempEnt Functions|TempEnt-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents_stocks.inc&amp;lt;/tt&amp;gt; - [[TempEnts (SourceMod SDKTools)|TempEnt Stocks for convenience]].&lt;br /&gt;
&lt;br /&gt;
SDKTools is powered by &amp;quot;BinTools,&amp;quot; a powerful extension for creating dynamic C/C++ calls.  BinTools is automatically loaded by SDKTools.&lt;br /&gt;
&lt;br /&gt;
=GameConfigs=&lt;br /&gt;
GameConfig files go into the &amp;quot;gamedata&amp;quot; folder under &amp;quot;sourcemod.&amp;quot;  In older revisions it was under &amp;quot;sourcemod/configs&amp;quot; which is now deprecated.&lt;br /&gt;
&lt;br /&gt;
==Virtual Offsets==&lt;br /&gt;
For adding virtual offsets, add sub-sections to the &amp;quot;Offsets&amp;quot; section of your game config file.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;cstrike&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Offsets&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;GiveNamedItem&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;329&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;330&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;quot;EyePosition&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;117&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;118&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      // Get offset of CPlayerResource::m_iBotDifficulty sendprop.&lt;br /&gt;
      // Dynamic way for FindSendPropInfo(class, prop);&lt;br /&gt;
      &amp;quot;BotDifficulty&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;class&amp;quot; &amp;quot;CPlayerResource&amp;quot;&lt;br /&gt;
        &amp;quot;prop&amp;quot;    &amp;quot;m_iBotDifficulty&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Signature Scans==&lt;br /&gt;
For automated signature scans, add sub-sections to the &amp;quot;Signatures&amp;quot; section of your game config file.  These are the properties for a signature:&lt;br /&gt;
*&amp;lt;tt&amp;gt;library&amp;lt;/tt&amp;gt;: The library to search for the pattern or symbol for: &amp;quot;server&amp;quot;, &amp;quot;engine&amp;quot; or &amp;quot;matchmaking_ds&amp;quot; (defaults to &amp;quot;server&amp;quot;).&lt;br /&gt;
*&amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;linux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mac&amp;lt;/tt&amp;gt;: A pattern or symbol for that platform:&lt;br /&gt;
&lt;br /&gt;
You can put a pattern to search for in memory or a symbol name to lookup:&lt;br /&gt;
*A signature written in binary; for example, &amp;quot;\x56&amp;quot; instead of &amp;quot;0x56&amp;quot; -- the '*' (\x2A) character is a single byte wildcard.&lt;br /&gt;
*A named symbol.  To use a named symbol, start the string with the '@' character.  If a signature begins with '@', write the character in hexadecimal as above.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;cstrike&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Signatures&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;RoundRespawn&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;library&amp;quot; &amp;quot;server&amp;quot;&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;\x56\x8B\xF1\x8B\x06\xFF\x90*\x04\x00\x00\x8B\x86*\x0D\x00&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;@_ZN9CCSPlayer12RoundRespawnEv&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Raw address lookups==&lt;br /&gt;
Lets you peek and poke (limitation may apply) the Source Dedicated Server memory space, and get a raw address value in an automated way.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;left4dead2&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Addresses&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;CDirector&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot;&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;signature&amp;quot; &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
          &amp;quot;read&amp;quot; &amp;quot;8&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        &amp;quot;linux&amp;quot;&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;signature&amp;quot; &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        &amp;quot;read&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
        // Since SourceMod 1.9&lt;br /&gt;
        &amp;quot;offset&amp;quot; &amp;quot;4&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;quot;Signatures&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      /* Used solely to get the offset for TheDirector */&lt;br /&gt;
      &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;library&amp;quot; &amp;quot;server&amp;quot;&lt;br /&gt;
        &amp;quot;windows&amp;quot;       &amp;quot;\x83\xEC\x14\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x53\x55\x6A\x24\xE8&amp;quot;&lt;br /&gt;
        /* 83 EC 14 57 8B F9 8B 0D ? ? ? ? E8 ? ? ? ? 84 C0 0F ? ? ? ? ? 53 55 6A 24 E8 */&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      /* Find the Director/ZombieManager singleton classes */&lt;br /&gt;
      &lt;br /&gt;
      &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;library&amp;quot; &amp;quot;server&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;@TheDirector&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in an Address entry is parse from top to bottom as commands. This example would accomplish the same thing as the following pseudo-C++ code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BYTE * GetCDirectorAddress()&lt;br /&gt;
{&lt;br /&gt;
    BYTE * pAddr;&lt;br /&gt;
&lt;br /&gt;
#if WINDOWS&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;);&lt;br /&gt;
    pAddr = *(pAddr + 8);&lt;br /&gt;
&lt;br /&gt;
#elif LINUX&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;TheDirector&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
    pAddr = *(pAddr + 0);&lt;br /&gt;
    // Since SourceMod 1.9&lt;br /&gt;
    pAddr = pAddr + 4;&lt;br /&gt;
&lt;br /&gt;
    return pAddr;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To invoke this address lookup in your Sourcepawn code, you would simply set up your GameConf handle and run something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stock Address:GetTheDirector()&lt;br /&gt;
{&lt;br /&gt;
   return GameConfGetAddress(g_hMyGameConf, &amp;quot;CDirector&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more code examples, [https://github.com/confoglteam/l4d2_direct l4d2_direct] relies heavily on Address: functions.&lt;br /&gt;
&lt;br /&gt;
==Custom Key Values==&lt;br /&gt;
To read arbitary key value pairs from a gamedata file, add them to the &amp;quot;Keys&amp;quot; section of your game config file.&lt;br /&gt;
You can have different values per platform or have a key only be available on selected platforms.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;cstrike&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Keys&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;INTERFACEVERSION_GAMEEVENTSMANAGER2&amp;quot; &amp;quot;GAMEEVENTSMANAGER002&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      // Different values per platform (since SourceMod 1.10+)&lt;br /&gt;
      &amp;quot;MyGreatKey&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;this is wundows speaking&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;linux best linux&amp;quot;&lt;br /&gt;
        &amp;quot;mac&amp;quot;   &amp;quot;wat&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;JustForLinux&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;not relevant for other platforms!&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the keys using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char buffer[512];&lt;br /&gt;
GameConfGetKeyValue(g_hMyGameConf, &amp;quot;MyGreatKey&amp;quot;, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inheritance==&lt;br /&gt;
If you wish for multiple mods to inherit from one block, you can add a special &amp;quot;#supported&amp;quot; section as the first section under a &amp;quot;#default&amp;quot; section.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;#default&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;#supported&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;game&amp;quot;    &amp;quot;dod&amp;quot;&lt;br /&gt;
      &amp;quot;engine&amp;quot;    &amp;quot;sdk2013&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;Signatures&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      // ...&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies that the given block will be read for Day of Defeat as well as any game on the Source 2013 engine branch. You can add multiple &amp;quot;game&amp;quot; or &amp;quot;engine&amp;quot; keys under the &amp;quot;#supported&amp;quot; section to list all mods or engines this section should apply to.&lt;br /&gt;
&lt;br /&gt;
==Specializing per game version based on CRC32 value==&lt;br /&gt;
If a game has multiple stable versions, you can select to apply a gamedata section to a specific game version. You can add a special &amp;quot;CRC&amp;quot; section as the first section under a &amp;quot;#default&amp;quot; section, which allows you to list the hex-encoded CRC32 values of the game's server binary that the section should apply to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;#default&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;CRC&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;server&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;linux&amp;quot;  &amp;quot;186F31F8&amp;quot;&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;D41B675F&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &amp;quot;Signatures&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      // ...&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The section would only apply if the game's server binary's CRC32 hash matches the given value for the current platform. At the moment, only the &amp;quot;server&amp;quot; binary is supported. You can add multiple &amp;quot;#default&amp;quot; and &amp;quot;CRC&amp;quot; section combinations to cover different game versions.&lt;br /&gt;
&lt;br /&gt;
=Calling Functions=&lt;br /&gt;
Calling functions is complicated and requires strict attention to the C++ API you are trying to use.  If you make a mistake, something bad '''will''' happen (and if not, you got lucky!)  SDKTools is more complicated than PimpinJuice's &amp;quot;Hacks&amp;quot; extension because it precompiles all of the information needed to convert from Plugin memory to C++ types.  This precompilation step ensures better safety and speed, but it lengthens the preparation process.&lt;br /&gt;
&lt;br /&gt;
With that said, let's look at an overview of the call creation process.  Before making calls, we must ''prepare'' the call.  This will give us a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt; which will let us make as many calls as we like.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Init&amp;lt;/b&amp;gt; - The preparation must be initialized.  Here we can specify the calling convention, which is either static, or BaseEntity/BasePlayer-based.  BasePlayer should be used when only player entities should be allowed as the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Destination&amp;lt;/b&amp;gt; - The call must have a destination address or virtual index to use.  This is normally done via &amp;lt;tt&amp;gt;PrepSDKCall_SetFromConf&amp;lt;/tt&amp;gt; which ties into gameconf files.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Return Info&amp;lt;/b&amp;gt; - If the call has return information, it must be set via &amp;lt;tt&amp;gt;PrepSDKCall_SetReturnInfo&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt; - Each parameter (if any) must be added with &amp;lt;tt&amp;gt;PrepSDKCall_AddParameter&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Finalize&amp;lt;/b&amp;gt; - The call must be finalized with &amp;lt;tt&amp;gt;EndPrepSDKCall&amp;lt;/tt&amp;gt;, which will return a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;.  If it doesn't, one or more of the preparation operations failed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the examples below, consider a plugin called &amp;quot;sdkexamples.sp&amp;quot; which has a gamedata file of &amp;quot;plugin.sdkexamples.txt&amp;quot; containing the definitions in the first section.&lt;br /&gt;
&lt;br /&gt;
==RoundRespawn Example==&lt;br /&gt;
CCSPlayer::RoundRespawn is a Counter-Strike Source function which respawns players.  It used by CS:S DM.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;void CCSPlayer::RoundRespawn()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SDKCall example:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hRoundRespawn;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
  hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
  StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
  PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, &amp;quot;RoundRespawn&amp;quot;);&lt;br /&gt;
  hRoundRespawn = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void RespawnPlayer(int client)&lt;br /&gt;
{&lt;br /&gt;
  SDKCall(hRoundRespawn, client);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we did not have to set any extra information for parameters or return info, since CCSPlayer::RoundRespawn has no parameters and has a void return.&lt;br /&gt;
&lt;br /&gt;
==GiveNamedItem Example==&lt;br /&gt;
GiveNamedItem will give a player a named item.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual CBaseEntity *CBasePlayer::GiveNamedItem(const char *item, int iSubType = 0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGiveNamedItem;&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
  hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
  PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;GiveNamedItem&amp;quot;);&lt;br /&gt;
  PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);&lt;br /&gt;
  PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);&lt;br /&gt;
  PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);&lt;br /&gt;
  hGiveNamedItem = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GiveItem(int client, const char[] item)&lt;br /&gt;
{&lt;br /&gt;
  return SDKCall(hGiveNamedItem, client, item, 0);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetEyePosition Example==&lt;br /&gt;
Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual Vector CBaseEntity::EyePosition();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGetEyePosition;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
  hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
  PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;EyePosition&amp;quot;);&lt;br /&gt;
  PrepSDKCall_SetReturnInfo(SDKType_Vector, SDKPass_ByValue);&lt;br /&gt;
  hGetEyePosition= EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GetEyePosition(int client, float pos[3])&lt;br /&gt;
{&lt;br /&gt;
  SDKCall(hGetEyePosition, client, pos);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the vector is returned as the third parameter (first parameter after the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer).&lt;br /&gt;
&lt;br /&gt;
=TempEnt Functions=&lt;br /&gt;
TempEnts, also called &amp;quot;temporary entities,&amp;quot; &amp;quot;tempentities,&amp;quot; or &amp;quot;TEs,&amp;quot; are quick graphical displays that are too simple to justify the overhead of a &amp;lt;tt&amp;gt;CBaseEntity&amp;lt;/tt&amp;gt; instantiation or full server-side networkability.  In the SDK, they are statically defined instances that can be &amp;quot;played back&amp;quot; to the client by simply sending a copy of its network class properties.&lt;br /&gt;
&lt;br /&gt;
Temporary Entities are mod-dependent, in that a mod can change any of their properties or even the &amp;lt;tt&amp;gt;ITempEnts&amp;lt;/tt&amp;gt; class definition.  Because of this, SourceMod takes a very flexible approach:&lt;br /&gt;
*&amp;lt;b&amp;gt;First&amp;lt;/b&amp;gt;, a temp entity is ''started'' by name using &amp;lt;tt&amp;gt;TE_Start&amp;lt;/tt&amp;gt;.  A list of all tempent names and their network classes can be dumped with &amp;lt;tt&amp;gt;sm_print_telist&amp;lt;/tt&amp;gt; (SDKTools must be loaded).&lt;br /&gt;
*&amp;lt;b&amp;gt;Second&amp;lt;/b&amp;gt;, all of the tempent's properties are set via the &amp;lt;tt&amp;gt;TE_Write&amp;lt;/tt&amp;gt; natives.  All tempent properties can be dumped to a file using &amp;lt;tt&amp;gt;sm_dump_teprops&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Third&amp;lt;/b&amp;gt;, the properties are transmitted using &amp;lt;tt&amp;gt;TE_Send&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;TE_SendToAll&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;TE_SendToClient&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a convenience, SourceMod provides a number of pre-written stocks for SDK-defined temporary entities.  While the &amp;lt;tt&amp;gt;TE_*&amp;lt;/tt&amp;gt; natives are guaranteed to work on any fully-supported SourceMod mod, the &amp;lt;tt&amp;gt;TE_Setup*&amp;lt;/tt&amp;gt; stocks are not, as a mod might change the property layouts or the functionalities of the SDK-defined tempents.&lt;br /&gt;
&lt;br /&gt;
Some examples are below.  For pictures, see [[TempEnts (SourceMod SDKTools)]].&lt;br /&gt;
&lt;br /&gt;
Using stocks:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
  TE_SetupMetalSparks(pos, dir);&lt;br /&gt;
  TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not using stocks:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
  TE_Start(&amp;quot;Metal Sparks&amp;quot;);&lt;br /&gt;
  TE_WriteVector(&amp;quot;m_vecPos&amp;quot;, pos);&lt;br /&gt;
  TE_WriteVector(&amp;quot;m_vecDir&amp;quot;, dir);&lt;br /&gt;
  TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sound Functions=&lt;br /&gt;
SDKTools exposes various sound-related members of IVEngineServer and IEngineSound.  The basic functions are in &amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitAmbientSound&amp;lt;/tt&amp;gt;: Plays an ambient sound from an origin.&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitSound, EmitSoundToClient, EmitSoundToAll&amp;lt;/tt&amp;gt;: Plays a sound to a list of clients from a specific entity.&lt;br /&gt;
&lt;br /&gt;
There are a few important properties about sounds:&lt;br /&gt;
*&amp;lt;b&amp;gt;Entity&amp;lt;/b&amp;gt;: The entity the sound should come from.  When playing a generic sound file to player(s), you should use &amp;lt;tt&amp;gt;SOUND_FROM_PLAYER&amp;lt;/tt&amp;gt;, which is a special SourceMod macro for making the sound come from the player target.  For ambient sounds you'd use &amp;lt;tt&amp;gt;SOUND_FROM_WORLD&amp;lt;/tt&amp;gt;, and for sounds from an entity you'd use the entity index.&lt;br /&gt;
*&amp;lt;b&amp;gt;Channel&amp;lt;/b&amp;gt;: Exposed as &amp;lt;tt&amp;gt;SNDCHAN_*&amp;lt;/tt&amp;gt;, normally you only need to use &amp;lt;tt&amp;gt;SNDCHAN_AUTO&amp;lt;/tt&amp;gt;.  The channel affects how the sound is spatialized[?]&lt;br /&gt;
*&amp;lt;b&amp;gt;Level&amp;lt;/b&amp;gt;: The decibel level.  There are a number of predefined levels as &amp;lt;tt&amp;gt;SNDLEVEL_*&amp;lt;/tt&amp;gt; -- the standard one is &amp;lt;tt&amp;gt;SNDLEVEL_NORMAL&amp;lt;/tt&amp;gt;.  Half-Life 1 used attenuation values instead; you can convert from these using &amp;lt;tt&amp;gt;ATTN_TO_SNDLEVEL()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Volume&amp;lt;/b&amp;gt;: The volume, on a scale of 0.0 to 1.0.  To use a volume other than the default, the &amp;lt;tt&amp;gt;SND_CHANGEVOL&amp;lt;/tt&amp;gt; flag should be included in the &amp;quot;flags&amp;quot; parameter.  The default volume is &amp;lt;tt&amp;gt;SNDVOL_NORMAL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Pitch&amp;lt;/b&amp;gt;: The pitch; predefined values are &amp;lt;tt&amp;gt;SNDPITCH_*&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;SNDPITCH_NORMAL&amp;lt;/tt&amp;gt; being the default.  &amp;lt;tt&amp;gt;SND_CHANGEPITCH&amp;lt;/tt&amp;gt; should be passed to use a non-default pitch.&lt;br /&gt;
*&amp;lt;b&amp;gt;Origin&amp;lt;/b&amp;gt;: If specified, an origin to play the sound from.&lt;br /&gt;
&lt;br /&gt;
Some very simple examples:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;&lt;br /&gt;
EmitSoundToClient(client, &amp;quot;bot/affirmative.wav&amp;quot;);&lt;br /&gt;
EmitSoundToAll(&amp;quot;radio/terwin.wav&amp;quot;);&lt;br /&gt;
&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Supported Mods=&lt;br /&gt;
SDKTools must have specific support added for each mod.  So far, default support exists for the following modifications:&lt;br /&gt;
*Counter-Strike: Source&lt;br /&gt;
*Day of Defeat: Source&lt;br /&gt;
*Dystopia&lt;br /&gt;
*Half-Life 2: Deathmatch&lt;br /&gt;
*Insurgency (only some of the CBasePlayer SDK functions are available)&lt;br /&gt;
*Pirates, Vikings, and Knights II&lt;br /&gt;
*The Ship&lt;br /&gt;
*SourceForts&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Vfunc_offsets_%28SourceMM%29|Virtual Functions]]&lt;br /&gt;
*[[TempEnts (SourceMod SDKTools)|TempEnts]]&lt;br /&gt;
*[[Useful_Signatures_%28Source%29|Useful Signatures]]&lt;br /&gt;
*[[Signature_Scanning|Signature Scanning]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=11250</id>
		<title>SDKTools (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=11250"/>
		<updated>2021-10-28T16:20:22Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: /* Inheritance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The SDKTools extension is an extension for various functions provided by the Source SDK.  Additionally, it has the ability to dynamically call many C++ functions in the SDK, for example, from CBaseEntity or any derived class.&lt;br /&gt;
&lt;br /&gt;
SDKTools contains simplified versions of SDK functions pre-written for ease of use.  These can be found in the additional include files:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_functions.inc&amp;lt;/tt&amp;gt; - Popular functions from the SDK.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt; - [[#Sound Functions|Sound-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents.inc&amp;lt;/tt&amp;gt; - [[#TempEnt Functions|TempEnt-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents_stocks.inc&amp;lt;/tt&amp;gt; - [[TempEnts (SourceMod SDKTools)|TempEnt Stocks for convenience]].&lt;br /&gt;
&lt;br /&gt;
SDKTools is powered by &amp;quot;BinTools,&amp;quot; a powerful extension for creating dynamic C/C++ calls.  BinTools is automatically loaded by SDKTools.&lt;br /&gt;
&lt;br /&gt;
=GameConfigs=&lt;br /&gt;
GameConfig files go into the &amp;quot;gamedata&amp;quot; folder under &amp;quot;sourcemod.&amp;quot;  In older revisions it was under &amp;quot;sourcemod/configs&amp;quot; which is now deprecated.&lt;br /&gt;
&lt;br /&gt;
==Virtual Offsets==&lt;br /&gt;
For adding virtual offsets, add sub-sections to the &amp;quot;Offsets&amp;quot; section of your game config file.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;cstrike&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Offsets&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;GiveNamedItem&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;329&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;330&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;quot;EyePosition&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;117&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;118&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      // Get offset of CPlayerResource::m_iBotDifficulty sendprop.&lt;br /&gt;
      // Dynamic way for FindSendPropInfo(class, prop);&lt;br /&gt;
      &amp;quot;BotDifficulty&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;class&amp;quot; &amp;quot;CPlayerResource&amp;quot;&lt;br /&gt;
        &amp;quot;prop&amp;quot;    &amp;quot;m_iBotDifficulty&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Signature Scans==&lt;br /&gt;
For automated signature scans, add sub-sections to the &amp;quot;Signatures&amp;quot; section of your game config file.  These are the properties for a signature:&lt;br /&gt;
*&amp;lt;tt&amp;gt;library&amp;lt;/tt&amp;gt;: The library to search for the pattern or symbol for: &amp;quot;server&amp;quot;, &amp;quot;engine&amp;quot; or &amp;quot;matchmaking_ds&amp;quot; (defaults to &amp;quot;server&amp;quot;).&lt;br /&gt;
*&amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;linux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mac&amp;lt;/tt&amp;gt;: A pattern or symbol for that platform:&lt;br /&gt;
&lt;br /&gt;
You can put a pattern to search for in memory or a symbol name to lookup:&lt;br /&gt;
*A signature written in binary; for example, &amp;quot;\x56&amp;quot; instead of &amp;quot;0x56&amp;quot; -- the '*' (\x2A) character is a single byte wildcard.&lt;br /&gt;
*A named symbol.  To use a named symbol, start the string with the '@' character.  If a signature begins with '@', write the character in hexadecimal as above.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;cstrike&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Signatures&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;RoundRespawn&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;library&amp;quot; &amp;quot;server&amp;quot;&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;\x56\x8B\xF1\x8B\x06\xFF\x90*\x04\x00\x00\x8B\x86*\x0D\x00&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;@_ZN9CCSPlayer12RoundRespawnEv&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Raw address lookups==&lt;br /&gt;
Lets you peek and poke (limitation may apply) the Source Dedicated Server memory space, and get a raw address value in an automated way.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;left4dead2&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Addresses&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;CDirector&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot;&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;signature&amp;quot; &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
          &amp;quot;read&amp;quot; &amp;quot;8&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        &amp;quot;linux&amp;quot;&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;signature&amp;quot; &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        &amp;quot;read&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
        // Since SourceMod 1.9&lt;br /&gt;
        &amp;quot;offset&amp;quot; &amp;quot;4&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;quot;Signatures&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      /* Used solely to get the offset for TheDirector */&lt;br /&gt;
      &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;library&amp;quot; &amp;quot;server&amp;quot;&lt;br /&gt;
        &amp;quot;windows&amp;quot;       &amp;quot;\x83\xEC\x14\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x53\x55\x6A\x24\xE8&amp;quot;&lt;br /&gt;
        /* 83 EC 14 57 8B F9 8B 0D ? ? ? ? E8 ? ? ? ? 84 C0 0F ? ? ? ? ? 53 55 6A 24 E8 */&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      /* Find the Director/ZombieManager singleton classes */&lt;br /&gt;
      &lt;br /&gt;
      &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;library&amp;quot; &amp;quot;server&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;@TheDirector&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in an Address entry is parse from top to bottom as commands. This example would accomplish the same thing as the following pseudo-C++ code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BYTE * GetCDirectorAddress()&lt;br /&gt;
{&lt;br /&gt;
    BYTE * pAddr;&lt;br /&gt;
&lt;br /&gt;
#if WINDOWS&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;);&lt;br /&gt;
    pAddr = *(pAddr + 8);&lt;br /&gt;
&lt;br /&gt;
#elif LINUX&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;TheDirector&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
    pAddr = *(pAddr + 0);&lt;br /&gt;
    // Since SourceMod 1.9&lt;br /&gt;
    pAddr = pAddr + 4;&lt;br /&gt;
&lt;br /&gt;
    return pAddr;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To invoke this address lookup in your Sourcepawn code, you would simply set up your GameConf handle and run something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stock Address:GetTheDirector()&lt;br /&gt;
{&lt;br /&gt;
   return GameConfGetAddress(g_hMyGameConf, &amp;quot;CDirector&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more code examples, [https://github.com/confoglteam/l4d2_direct l4d2_direct] relies heavily on Address: functions.&lt;br /&gt;
&lt;br /&gt;
==Custom Key Values==&lt;br /&gt;
To read arbitary key value pairs from a gamedata file, add them to the &amp;quot;Keys&amp;quot; section of your game config file.&lt;br /&gt;
You can have different values per platform or have a key only be available on selected platforms.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;cstrike&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Keys&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;INTERFACEVERSION_GAMEEVENTSMANAGER2&amp;quot; &amp;quot;GAMEEVENTSMANAGER002&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      // Different values per platform (since SourceMod 1.10+)&lt;br /&gt;
      &amp;quot;MyGreatKey&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;windows&amp;quot; &amp;quot;this is wundows speaking&amp;quot;&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;linux best linux&amp;quot;&lt;br /&gt;
        &amp;quot;mac&amp;quot;   &amp;quot;wat&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      &amp;quot;JustForLinux&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;linux&amp;quot;   &amp;quot;not relevant for other platforms!&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the keys using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char buffer[512];&lt;br /&gt;
GameConfGetKeyValue(g_hMyGameConf, &amp;quot;MyGreatKey&amp;quot;, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inheritance==&lt;br /&gt;
If you wish for multiple mods to inherit from one block, you can add a special &amp;quot;#supported&amp;quot; section as the first section under a &amp;quot;#default&amp;quot; section.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;#default&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;#supported&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;game&amp;quot;    &amp;quot;dod&amp;quot;&lt;br /&gt;
      &amp;quot;engine&amp;quot;    &amp;quot;sdk2013&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;Signatures&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;RoundRespawn&amp;quot;&lt;br /&gt;
      {&lt;br /&gt;
        // ...&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies that the given block will be read for Day of Defeat as well as any game on the Source 2013 engine branch. You can add multiple &amp;quot;game&amp;quot; or &amp;quot;engine&amp;quot; keys under the &amp;quot;#supported&amp;quot; section to list all mods or engines this section should apply to.&lt;br /&gt;
&lt;br /&gt;
=Calling Functions=&lt;br /&gt;
Calling functions is complicated and requires strict attention to the C++ API you are trying to use.  If you make a mistake, something bad '''will''' happen (and if not, you got lucky!)  SDKTools is more complicated than PimpinJuice's &amp;quot;Hacks&amp;quot; extension because it precompiles all of the information needed to convert from Plugin memory to C++ types.  This precompilation step ensures better safety and speed, but it lengthens the preparation process.&lt;br /&gt;
&lt;br /&gt;
With that said, let's look at an overview of the call creation process.  Before making calls, we must ''prepare'' the call.  This will give us a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt; which will let us make as many calls as we like.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Init&amp;lt;/b&amp;gt; - The preparation must be initialized.  Here we can specify the calling convention, which is either static, or BaseEntity/BasePlayer-based.  BasePlayer should be used when only player entities should be allowed as the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Destination&amp;lt;/b&amp;gt; - The call must have a destination address or virtual index to use.  This is normally done via &amp;lt;tt&amp;gt;PrepSDKCall_SetFromConf&amp;lt;/tt&amp;gt; which ties into gameconf files.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Return Info&amp;lt;/b&amp;gt; - If the call has return information, it must be set via &amp;lt;tt&amp;gt;PrepSDKCall_SetReturnInfo&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt; - Each parameter (if any) must be added with &amp;lt;tt&amp;gt;PrepSDKCall_AddParameter&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Finalize&amp;lt;/b&amp;gt; - The call must be finalized with &amp;lt;tt&amp;gt;EndPrepSDKCall&amp;lt;/tt&amp;gt;, which will return a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;.  If it doesn't, one or more of the preparation operations failed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the examples below, consider a plugin called &amp;quot;sdkexamples.sp&amp;quot; which has a gamedata file of &amp;quot;plugin.sdkexamples.txt&amp;quot; containing the definitions in the first section.&lt;br /&gt;
&lt;br /&gt;
==RoundRespawn Example==&lt;br /&gt;
CCSPlayer::RoundRespawn is a Counter-Strike Source function which respawns players.  It used by CS:S DM.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;void CCSPlayer::RoundRespawn()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SDKCall example:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hRoundRespawn;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
  hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
  StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
  PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, &amp;quot;RoundRespawn&amp;quot;);&lt;br /&gt;
  hRoundRespawn = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void RespawnPlayer(int client)&lt;br /&gt;
{&lt;br /&gt;
  SDKCall(hRoundRespawn, client);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we did not have to set any extra information for parameters or return info, since CCSPlayer::RoundRespawn has no parameters and has a void return.&lt;br /&gt;
&lt;br /&gt;
==GiveNamedItem Example==&lt;br /&gt;
GiveNamedItem will give a player a named item.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual CBaseEntity *CBasePlayer::GiveNamedItem(const char *item, int iSubType = 0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGiveNamedItem;&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
  hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
  PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;GiveNamedItem&amp;quot;);&lt;br /&gt;
  PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);&lt;br /&gt;
  PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);&lt;br /&gt;
  PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);&lt;br /&gt;
  hGiveNamedItem = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GiveItem(int client, const char[] item)&lt;br /&gt;
{&lt;br /&gt;
  return SDKCall(hGiveNamedItem, client, item, 0);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetEyePosition Example==&lt;br /&gt;
Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual Vector CBaseEntity::EyePosition();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGetEyePosition;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
  hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
  PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;EyePosition&amp;quot;);&lt;br /&gt;
  PrepSDKCall_SetReturnInfo(SDKType_Vector, SDKPass_ByValue);&lt;br /&gt;
  hGetEyePosition= EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GetEyePosition(int client, float pos[3])&lt;br /&gt;
{&lt;br /&gt;
  SDKCall(hGetEyePosition, client, pos);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the vector is returned as the third parameter (first parameter after the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer).&lt;br /&gt;
&lt;br /&gt;
=TempEnt Functions=&lt;br /&gt;
TempEnts, also called &amp;quot;temporary entities,&amp;quot; &amp;quot;tempentities,&amp;quot; or &amp;quot;TEs,&amp;quot; are quick graphical displays that are too simple to justify the overhead of a &amp;lt;tt&amp;gt;CBaseEntity&amp;lt;/tt&amp;gt; instantiation or full server-side networkability.  In the SDK, they are statically defined instances that can be &amp;quot;played back&amp;quot; to the client by simply sending a copy of its network class properties.&lt;br /&gt;
&lt;br /&gt;
Temporary Entities are mod-dependent, in that a mod can change any of their properties or even the &amp;lt;tt&amp;gt;ITempEnts&amp;lt;/tt&amp;gt; class definition.  Because of this, SourceMod takes a very flexible approach:&lt;br /&gt;
*&amp;lt;b&amp;gt;First&amp;lt;/b&amp;gt;, a temp entity is ''started'' by name using &amp;lt;tt&amp;gt;TE_Start&amp;lt;/tt&amp;gt;.  A list of all tempent names and their network classes can be dumped with &amp;lt;tt&amp;gt;sm_print_telist&amp;lt;/tt&amp;gt; (SDKTools must be loaded).&lt;br /&gt;
*&amp;lt;b&amp;gt;Second&amp;lt;/b&amp;gt;, all of the tempent's properties are set via the &amp;lt;tt&amp;gt;TE_Write&amp;lt;/tt&amp;gt; natives.  All tempent properties can be dumped to a file using &amp;lt;tt&amp;gt;sm_dump_teprops&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Third&amp;lt;/b&amp;gt;, the properties are transmitted using &amp;lt;tt&amp;gt;TE_Send&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;TE_SendToAll&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;TE_SendToClient&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a convenience, SourceMod provides a number of pre-written stocks for SDK-defined temporary entities.  While the &amp;lt;tt&amp;gt;TE_*&amp;lt;/tt&amp;gt; natives are guaranteed to work on any fully-supported SourceMod mod, the &amp;lt;tt&amp;gt;TE_Setup*&amp;lt;/tt&amp;gt; stocks are not, as a mod might change the property layouts or the functionalities of the SDK-defined tempents.&lt;br /&gt;
&lt;br /&gt;
Some examples are below.  For pictures, see [[TempEnts (SourceMod SDKTools)]].&lt;br /&gt;
&lt;br /&gt;
Using stocks:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
  TE_SetupMetalSparks(pos, dir);&lt;br /&gt;
  TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not using stocks:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
  TE_Start(&amp;quot;Metal Sparks&amp;quot;);&lt;br /&gt;
  TE_WriteVector(&amp;quot;m_vecPos&amp;quot;, pos);&lt;br /&gt;
  TE_WriteVector(&amp;quot;m_vecDir&amp;quot;, dir);&lt;br /&gt;
  TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sound Functions=&lt;br /&gt;
SDKTools exposes various sound-related members of IVEngineServer and IEngineSound.  The basic functions are in &amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitAmbientSound&amp;lt;/tt&amp;gt;: Plays an ambient sound from an origin.&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitSound, EmitSoundToClient, EmitSoundToAll&amp;lt;/tt&amp;gt;: Plays a sound to a list of clients from a specific entity.&lt;br /&gt;
&lt;br /&gt;
There are a few important properties about sounds:&lt;br /&gt;
*&amp;lt;b&amp;gt;Entity&amp;lt;/b&amp;gt;: The entity the sound should come from.  When playing a generic sound file to player(s), you should use &amp;lt;tt&amp;gt;SOUND_FROM_PLAYER&amp;lt;/tt&amp;gt;, which is a special SourceMod macro for making the sound come from the player target.  For ambient sounds you'd use &amp;lt;tt&amp;gt;SOUND_FROM_WORLD&amp;lt;/tt&amp;gt;, and for sounds from an entity you'd use the entity index.&lt;br /&gt;
*&amp;lt;b&amp;gt;Channel&amp;lt;/b&amp;gt;: Exposed as &amp;lt;tt&amp;gt;SNDCHAN_*&amp;lt;/tt&amp;gt;, normally you only need to use &amp;lt;tt&amp;gt;SNDCHAN_AUTO&amp;lt;/tt&amp;gt;.  The channel affects how the sound is spatialized[?]&lt;br /&gt;
*&amp;lt;b&amp;gt;Level&amp;lt;/b&amp;gt;: The decibel level.  There are a number of predefined levels as &amp;lt;tt&amp;gt;SNDLEVEL_*&amp;lt;/tt&amp;gt; -- the standard one is &amp;lt;tt&amp;gt;SNDLEVEL_NORMAL&amp;lt;/tt&amp;gt;.  Half-Life 1 used attenuation values instead; you can convert from these using &amp;lt;tt&amp;gt;ATTN_TO_SNDLEVEL()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Volume&amp;lt;/b&amp;gt;: The volume, on a scale of 0.0 to 1.0.  To use a volume other than the default, the &amp;lt;tt&amp;gt;SND_CHANGEVOL&amp;lt;/tt&amp;gt; flag should be included in the &amp;quot;flags&amp;quot; parameter.  The default volume is &amp;lt;tt&amp;gt;SNDVOL_NORMAL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Pitch&amp;lt;/b&amp;gt;: The pitch; predefined values are &amp;lt;tt&amp;gt;SNDPITCH_*&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;SNDPITCH_NORMAL&amp;lt;/tt&amp;gt; being the default.  &amp;lt;tt&amp;gt;SND_CHANGEPITCH&amp;lt;/tt&amp;gt; should be passed to use a non-default pitch.&lt;br /&gt;
*&amp;lt;b&amp;gt;Origin&amp;lt;/b&amp;gt;: If specified, an origin to play the sound from.&lt;br /&gt;
&lt;br /&gt;
Some very simple examples:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;&lt;br /&gt;
EmitSoundToClient(client, &amp;quot;bot/affirmative.wav&amp;quot;);&lt;br /&gt;
EmitSoundToAll(&amp;quot;radio/terwin.wav&amp;quot;);&lt;br /&gt;
&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Supported Mods=&lt;br /&gt;
SDKTools must have specific support added for each mod.  So far, default support exists for the following modifications:&lt;br /&gt;
*Counter-Strike: Source&lt;br /&gt;
*Day of Defeat: Source&lt;br /&gt;
*Dystopia&lt;br /&gt;
*Half-Life 2: Deathmatch&lt;br /&gt;
*Insurgency (only some of the CBasePlayer SDK functions are available)&lt;br /&gt;
*Pirates, Vikings, and Knights II&lt;br /&gt;
*The Ship&lt;br /&gt;
*SourceForts&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Vfunc_offsets_%28SourceMM%29|Virtual Functions]]&lt;br /&gt;
*[[TempEnts (SourceMod SDKTools)|TempEnts]]&lt;br /&gt;
*[[Useful_Signatures_%28Source%29|Useful Signatures]]&lt;br /&gt;
*[[Signature_Scanning|Signature Scanning]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SQL_(SourceMod_Scripting)&amp;diff=11194</id>
		<title>SQL (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SQL_(SourceMod_Scripting)&amp;diff=11194"/>
		<updated>2021-06-06T14:57:27Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Mention Postgres driver&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|SQL (SourceMod_Scripting)}}&lt;br /&gt;
This article is an introduction to using SourceMod's SQL features.  It is not an introduction or tutorial about SQL or any specific SQL implementation.&lt;br /&gt;
&lt;br /&gt;
SourceMod's SQL layer is formally called ''DBI'', or the '''D'''ata'''b'''ase '''I'''nterface.  The interface is a generic abstraction of common SQL functions.  To connect to a specific database implementation (such as MySQL, or sqLite), a SourceMod DBI &amp;quot;driver&amp;quot; must be loaded.  Currently, there are drivers for MySQL, PostgreSQL (pgsql), and SQLite.&lt;br /&gt;
&lt;br /&gt;
SourceMod automatically detects and loads drivers on demand (if they exist, of course).  All database natives are in &amp;lt;tt&amp;gt;scripting/include/dbi.inc&amp;lt;/tt&amp;gt;.  The C++ API is in &amp;lt;tt&amp;gt;public/IDBDriver.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Connecting=&lt;br /&gt;
There are two ways to connect to a database.  The first is through named configurations.  Named configurations are preset configurations listed in &amp;lt;tt&amp;gt;configs/databases.cfg&amp;lt;/tt&amp;gt;.  SourceMod specifies that if SQL is being used, there should always be one configuration named &amp;quot;default.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
An example of such a configuration looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;   &amp;quot;default&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
        &amp;quot;host&amp;quot;              &amp;quot;localhost&amp;quot;&lt;br /&gt;
        &amp;quot;database&amp;quot;          &amp;quot;sourcemod&amp;quot;&lt;br /&gt;
        &amp;quot;user&amp;quot;              &amp;quot;root&amp;quot;&lt;br /&gt;
        &amp;quot;pass&amp;quot;              &amp;quot;&amp;quot;&lt;br /&gt;
        //&amp;quot;timeout&amp;quot;         &amp;quot;0&amp;quot;&lt;br /&gt;
        //&amp;quot;port&amp;quot;            &amp;quot;0&amp;quot;&lt;br /&gt;
    }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connections based on named configurations can be instantiated with either &amp;lt;tt&amp;gt;SQL_Connect&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SQL_DefConnect&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
The other option is to use &amp;lt;tt&amp;gt;SQL_ConnectCustom&amp;lt;/tt&amp;gt; and manually specify all connection parameters by passing a keyvalue handle containing them.&lt;br /&gt;
&lt;br /&gt;
Example of a typical connection:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;char error[255];&lt;br /&gt;
Database db = SQL_DefConnect(error, sizeof(error));&lt;br /&gt;
&lt;br /&gt;
if (db == null)&lt;br /&gt;
{&lt;br /&gt;
    PrintToServer(&amp;quot;Could not connect: %s&amp;quot;, error);&lt;br /&gt;
} &lt;br /&gt;
else &lt;br /&gt;
{&lt;br /&gt;
    delete db;&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Queries=&lt;br /&gt;
&lt;br /&gt;
==No Results==&lt;br /&gt;
The simplest queries are ones which do not return results -- for example, CREATE, DROP, UPDATE, INSERT, and DELETE.  For such queries it is recommended to use &amp;lt;tt&amp;gt;SQL_FastQuery()&amp;lt;/tt&amp;gt;.  The name does not imply that the query will be faster, but rather, it is faster to write code using this function.  For example, given that &amp;lt;tt&amp;gt;db&amp;lt;/tt&amp;gt; is a valid database Handle:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;if (!SQL_FastQuery(db, &amp;quot;UPDATE stats SET players = players + 1&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
    char error[255];&lt;br /&gt;
    SQL_GetError(db, error, sizeof(error));&lt;br /&gt;
    PrintToServer(&amp;quot;Failed to query (error: %s)&amp;quot;, error);&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
If a query returns a result set and the results must be processed, you must use &amp;lt;tt&amp;gt;SQL_Query()&amp;lt;/tt&amp;gt;.  Unlike &amp;lt;tt&amp;gt;SQL_FastQuery()&amp;lt;/tt&amp;gt;, this function returns a Handle which must be closed.&lt;br /&gt;
&lt;br /&gt;
An example of a query which will produce results is:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;DBResultSet query = SQL_Query(db, &amp;quot;SELECT userid FROM vb_user WHERE username = 'BAILOPAN'&amp;quot;);&lt;br /&gt;
if (query == null)&lt;br /&gt;
{&lt;br /&gt;
    char error[255];&lt;br /&gt;
    SQL_GetError(db, error, sizeof(error));&lt;br /&gt;
    PrintToServer(&amp;quot;Failed to query (error: %s)&amp;quot;, error);&lt;br /&gt;
} &lt;br /&gt;
else &lt;br /&gt;
{&lt;br /&gt;
    /* Process results here! */&lt;br /&gt;
&lt;br /&gt;
    /* Free the Handle */&lt;br /&gt;
    delete query;&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Prepared Statements=&lt;br /&gt;
Prepared statements are another method of querying.  The idea behind a prepared statement is that you construct a query &amp;quot;template&amp;quot; once, and re-use it as many times as needed.  Prepared statements have the following benefits:&lt;br /&gt;
*A good SQL implementation will be able to cache the query better if it is a prepared statement.&lt;br /&gt;
*You don't have to rebuild the entire query string every execution.&lt;br /&gt;
*You don't have to allocate a new query structure on every execution.&lt;br /&gt;
*Input is &amp;quot;always&amp;quot; secure (more on this later).&lt;br /&gt;
&lt;br /&gt;
A prepared statement has &amp;quot;markers&amp;quot; for inputs.  For example, let's consider a function that takes in a database Handle and a name, and retrieves some info from a table:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;int GetSomeInfo(Database db, const char[] name)&lt;br /&gt;
{&lt;br /&gt;
    DBResultSet hQuery;&lt;br /&gt;
    char query[100];&lt;br /&gt;
&lt;br /&gt;
    /* Create enough space to make sure our string is quoted properly  */&lt;br /&gt;
    int buffer_len = strlen(name) * 2 + 1;&lt;br /&gt;
    char[] new_name = new char[buffer_len];&lt;br /&gt;
&lt;br /&gt;
    /* Ask the SQL driver to make sure our string is safely quoted */&lt;br /&gt;
    db.Escape(name, new_name, buffer_len);&lt;br /&gt;
&lt;br /&gt;
    /* Build the query */&lt;br /&gt;
    Format(query, sizeof(query), &amp;quot;SELECT userid FROM vb_user WHERE username = '%s'&amp;quot;, new_name);&lt;br /&gt;
    &lt;br /&gt;
    /* Execute the query */&lt;br /&gt;
    if ((hQuery = SQL_Query(query)) == null)&lt;br /&gt;
    {&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* Get some info here */&lt;br /&gt;
&lt;br /&gt;
    delete hQuery;&lt;br /&gt;
    &lt;br /&gt;
    /* return info; */&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Observe a version with prepared statements:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;DBStatement hUserStmt = null;&lt;br /&gt;
int GetSomeInfo(Database db, const char[] name)&lt;br /&gt;
{&lt;br /&gt;
    /* Check if we haven't already created the statement */&lt;br /&gt;
    if (hUserStmt == null)&lt;br /&gt;
    {&lt;br /&gt;
        char error[255];&lt;br /&gt;
        hUserStmt = SQL_PrepareQuery(db, &amp;quot;SELECT userid FROM vb_user WHERE username = ?&amp;quot;, error, sizeof(error));&lt;br /&gt;
        if (hUserStmt == null)&lt;br /&gt;
        {&lt;br /&gt;
            return 0;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    SQL_BindParamString(hUserStmt, 0, name, false);&lt;br /&gt;
    if (!SQL_Execute(hUserStmt))&lt;br /&gt;
    {&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* Get some info here */&lt;br /&gt;
    /* return info; */&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important differences:&lt;br /&gt;
*The input string (&amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;) did not need to be backticked (quoted).  The SQL engine automatically performs all type safety and insertion checks.&lt;br /&gt;
*There was no need for quotation marks around the parameter marker, &amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;, even though it accepted a string.&lt;br /&gt;
*We only needed to create the statement Handle once; after that it can live for the lifetime of the database connection.&lt;br /&gt;
&lt;br /&gt;
=Processing Results=&lt;br /&gt;
Processing results is done in the same manner for both normal queries and prepared statements.  The important functions are:&lt;br /&gt;
*&amp;lt;tt&amp;gt;SQL_GetRowCount()&amp;lt;/tt&amp;gt; - Returns the number of rows.&lt;br /&gt;
*&amp;lt;tt&amp;gt;SQL_FetchRow()&amp;lt;/tt&amp;gt; - Fetches the next row if one is available.&lt;br /&gt;
*&amp;lt;tt&amp;gt;SQL_Fetch[Int|String|Float]()&amp;lt;/tt&amp;gt; - Fetches data from a field in the current row.&lt;br /&gt;
&lt;br /&gt;
Let's consider a sample table that looks like this:&lt;br /&gt;
&amp;lt;sql&amp;gt;CREATE TABLE users (&lt;br /&gt;
    name VARCHAR(64) NOT NULL PRIMARY KEY,&lt;br /&gt;
    age INT UNSIGNED NOT NULL&lt;br /&gt;
);&amp;lt;/sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example has code that will print out all users matching a certain age.  There is an example for both prepared statements and normal queries.&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;void PrintResults(Handle query)&lt;br /&gt;
{&lt;br /&gt;
    /* Even if we have just one row, you must call SQL_FetchRow() first */&lt;br /&gt;
    char name[MAX_NAME_LENGTH];&lt;br /&gt;
    while (SQL_FetchRow(query))&lt;br /&gt;
    {&lt;br /&gt;
        SQL_FetchString(query, 0, name, sizeof(name));&lt;br /&gt;
        PrintToServer(&amp;quot;Name \&amp;quot;%s\&amp;quot; was found.&amp;quot;, name);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool GetByAge_Query(Database db, int age)&lt;br /&gt;
{&lt;br /&gt;
    char query[100];&lt;br /&gt;
    Format(query, sizeof(query), &amp;quot;SELECT name FROM users WHERE age = %d&amp;quot;, age);&lt;br /&gt;
&lt;br /&gt;
    DBResultSet hQuery = SQL_Query(db, query);&lt;br /&gt;
    if (hQuery == null)&lt;br /&gt;
    {&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    PrintResults(hQuery);&lt;br /&gt;
&lt;br /&gt;
    delete hQuery;&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
DBStatement hAgeStmt = null;&lt;br /&gt;
bool GetByAge_Statement(Database db, int age)&lt;br /&gt;
{&lt;br /&gt;
    if (hAgeSmt == null)&lt;br /&gt;
    {&lt;br /&gt;
        char error[255];&lt;br /&gt;
        if ((hAgeStmt = SQL_PrepareQuery(db, &lt;br /&gt;
            &amp;quot;SELECT name FROM users WHERE age = ?&amp;quot;, &lt;br /&gt;
            error, &lt;br /&gt;
            sizeof(error))) == null)&lt;br /&gt;
        {&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    SQL_BindParamInt(hAgeStmt, 0, age);&lt;br /&gt;
    if (!SQL_Execute(hAgeStmt))&lt;br /&gt;
    {&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    PrintResults(hAgeStmt);&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that these examples did not close the statement Handles.  These examples assume a global database instance that is only closed when the plugin is unloaded.  For plugins which maintain temporary database connections, prepared statement Handles must be freed or else the database connection will never be closed.&lt;br /&gt;
&lt;br /&gt;
=Threading=&lt;br /&gt;
SourceMod supports threaded SQL querying.  That is, SQL operations can be completed in a separate thread from main gameplay.  If your database server is remote or requires a network connection, queries can cause noticeable gameplay lag, and supporting threading is often a good idea if your queries occur in the middle of gameplay.&lt;br /&gt;
&lt;br /&gt;
Threaded queries are ''asynchronous''.  That is, they are dispatched and you can only find the results through a callback.  Although the callback is guaranteed to fire eventually, it may not fire in any specific given timeframe.  Certain drivers may not support threading; if this is the case, an RTE will be thrown.  If the threader cannot start or the threader is currently disabled, SourceMod will transparently execute the query in the main thread as a fallback.&lt;br /&gt;
&lt;br /&gt;
==Operations==&lt;br /&gt;
All threaded operations (except connecting) use the same callback for result notification: &amp;lt;tt&amp;gt;SQLQueryCallback&amp;lt;/tt&amp;gt;.  The parameters are:&lt;br /&gt;
*&amp;lt;tt&amp;gt;db&amp;lt;/tt&amp;gt; - The cloned database handle.  If the db handle was not found or was invalidated, &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt; is passed.&lt;br /&gt;
*&amp;lt;tt&amp;gt;results&amp;lt;/tt&amp;gt; - Result object, or null on failure.&lt;br /&gt;
*&amp;lt;tt&amp;gt;error&amp;lt;/tt&amp;gt; - An error string.&lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; - Custom data that can be passed via some SQL operations.&lt;br /&gt;
&lt;br /&gt;
The following operations can be done via threads:&lt;br /&gt;
*&amp;lt;b&amp;gt;Connection&amp;lt;/b&amp;gt;, via &amp;lt;tt&amp;gt;SQL_TConnect&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Querying&amp;lt;/b&amp;gt;, via &amp;lt;tt&amp;gt;SQL_TQuery()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*''Note: prepared statements are not yet available for the threader.''&lt;br /&gt;
&lt;br /&gt;
It is always safe to chain one operation from another.&lt;br /&gt;
&lt;br /&gt;
===Connecting===&lt;br /&gt;
It is not necessary to make a threaded connection in order to make threaded queries.  However, creating a threaded connection will not pause the game server if a connection cannot be immediately established. &lt;br /&gt;
Connecting however uses a different callback: &amp;lt;tt&amp;gt;SQLConnectCallback&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following parameters are used for the threaded connection callback:&lt;br /&gt;
*&amp;lt;tt&amp;gt;db&amp;lt;/tt&amp;gt;: Handle to the database connection, or &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt; if it could not be found.&lt;br /&gt;
*&amp;lt;tt&amp;gt;error&amp;lt;/tt&amp;gt;: The error string, if any.&lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt;: Unused (0)&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;Database hDatabase = null;&lt;br /&gt;
&lt;br /&gt;
void StartSQL()&lt;br /&gt;
{&lt;br /&gt;
    Database.Connect(GotDatabase);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void GotDatabase(Database db, const char[] error, any data)&lt;br /&gt;
{&lt;br /&gt;
    if (db == null)&lt;br /&gt;
    {&lt;br /&gt;
        LogError(&amp;quot;Database failure: %s&amp;quot;, error);&lt;br /&gt;
    } &lt;br /&gt;
    else &lt;br /&gt;
    {&lt;br /&gt;
        hDatabase = db;&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Querying===&lt;br /&gt;
Threaded queries can be performed on any database Handle as long as the driver supports threading.  All query results for the first result set are retrieved while in the thread.  If your query returns more than one set of results (for example, &amp;lt;tt&amp;gt;CALL&amp;lt;/tt&amp;gt; on MySQL with certain functions), the behaviour of the threader is undefined at this time.  &amp;lt;b&amp;gt;Note that if you want to perform both threaded and non-threaded queries on the same connection, you MUST read the &amp;quot;Locking&amp;quot; section below.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Query operations use the following callback parameters:&lt;br /&gt;
*&amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt;: A Handle to the database used to query.  The Handle is not the same as the Handle originally passed; however, it will test positively with &amp;lt;tt&amp;gt;SQL_IsSameConnection&amp;lt;/tt&amp;gt;.  The Handle can be cloned but it cannot be closed (it is closed automatically).  It may be &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt; in the case of a serious error (for example, the driver being unloaded).&lt;br /&gt;
*&amp;lt;tt&amp;gt;hndl&amp;lt;/tt&amp;gt;: A Handle to the query.  It can be cloned, but not closed (it is closed automatically).  It may be &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt; if there was an error.&lt;br /&gt;
*&amp;lt;tt&amp;gt;error&amp;lt;/tt&amp;gt;: Error string, if any.&lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt;: Optional user-defined data passed in through &amp;lt;tt&amp;gt;SQL_TQuery()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example, continuing from above:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;void CheckSteamID(int userid, const char[] auth)&lt;br /&gt;
{&lt;br /&gt;
    char query[255];&lt;br /&gt;
    FormatEx(query, sizeof(query), &amp;quot;SELECT userid FROM users WHERE steamid = '%s'&amp;quot;, auth);&lt;br /&gt;
    hdatabase.Query(T_CheckSteamID, query, userid);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void T_CheckSteamID(Database db, DBResultSet results, const char[] error, any data)&lt;br /&gt;
{&lt;br /&gt;
    int client = 0;&lt;br /&gt;
&lt;br /&gt;
    /* Make sure the client didn't disconnect while the thread was running */&lt;br /&gt;
    if ((client = GetClientOfUserId(data)) == 0)&lt;br /&gt;
    {&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (db == null || results == null || error[0] != '\0')&lt;br /&gt;
    {&lt;br /&gt;
        LogError(&amp;quot;Query failed! %s&amp;quot;, error);&lt;br /&gt;
        KickClient(client, &amp;quot;Authorization failed&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else if (results.RowCount == 0)&lt;br /&gt;
    {&lt;br /&gt;
        KickClient(client, &amp;quot;You are not a member&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Locking==&lt;br /&gt;
It is possible to run both threaded and non-threaded queries on the same connection.  However, without the proper precautions, you could corrupt the network stream (even if it's local), corrupt memory, or otherwise cause a crash in the SQL driver.  To solve this, SourceMod has ''database locking''.  Locking is done via &amp;lt;tt&amp;gt;SQL_LockDatabase()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SQL_UnlockDatabase&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Whenever performing any of the following non-threaded operations on a database, it is absolutely necessary to enclose the entire operation with a lock:&lt;br /&gt;
*&amp;lt;tt&amp;gt;SQL_Query()&amp;lt;/tt&amp;gt; (and &amp;lt;tt&amp;gt;SQL_FetchMoreResults&amp;lt;/tt&amp;gt; pairings)&lt;br /&gt;
*&amp;lt;tt&amp;gt;SQL_FastQuery&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;SQL_PrepareQuery&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;SQL_Bind*&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SQL_Execute&amp;lt;/tt&amp;gt; pairings&lt;br /&gt;
&lt;br /&gt;
The rule of thumb is: if your operation is going to use the database connection, it must be locked until the operation is fully completed.  &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;sourcepawn&amp;gt;bool GetByAge_Query(Database db, int age)&lt;br /&gt;
{&lt;br /&gt;
    char query[100];&lt;br /&gt;
    FormatEx(query, sizeof(query), &amp;quot;SELECT name FROM users WHERE age = %d&amp;quot;, age);&lt;br /&gt;
&lt;br /&gt;
    SQL_LockDatabase(db);&lt;br /&gt;
&lt;br /&gt;
    DBResultSet hQuery = SQL_Query(db, query);&lt;br /&gt;
    if (hQuery == null)&lt;br /&gt;
    {&lt;br /&gt;
        SQL_UnlockDatabase(db);&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    SQL_UnlockDatabase(db);&lt;br /&gt;
&lt;br /&gt;
    PrintResults(hQuery);&lt;br /&gt;
&lt;br /&gt;
    delete hQuery;&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&amp;lt;/sourcepawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it was only necessary to lock the query; SourceMod pre-fetches the result set, and thus the network queue is clean.&lt;br /&gt;
&lt;br /&gt;
===Warnings===&lt;br /&gt;
*&amp;lt;b&amp;gt;Never&amp;lt;/b&amp;gt; call &amp;lt;tt&amp;gt;SQL_LockDatabase&amp;lt;/tt&amp;gt; right before a threaded operation.  You will deadlock the server and have to terminate/kill it.  &lt;br /&gt;
*&amp;lt;b&amp;gt;Always pair every Lock with an Unlock.&amp;lt;/b&amp;gt;  Otherwise you risk a deadlock.&lt;br /&gt;
*If your query returns multiple result sets, for example, a procedure call on MySQL that returns results, you must lock both the query and the entire fetch operation.  SourceMod is only able to fetch one result set at a time, and all result sets must be cleared before a new query is started.&lt;br /&gt;
&lt;br /&gt;
==Priority==&lt;br /&gt;
Threaded SQL operations are placed in a simple priority queue.  The priority levels are &amp;lt;tt&amp;gt;High&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Medium&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;Low&amp;lt;/tt&amp;gt;.  Connections always have the highest priority.  &lt;br /&gt;
&lt;br /&gt;
Changing the priority can be useful if you have many queries with different purposes.  For example, a statistics plugin might execute 10 queries on death, and one query on join.  Because the statistics might rely on the join info, the join query might need to be high priority, while the death queries can be low priority.&lt;br /&gt;
&lt;br /&gt;
You should &amp;lt;b&amp;gt;never&amp;lt;/b&amp;gt; simply assign a high priority to all of your queries simply because you want them to get done fast.  Not only does it not work that way, but you may be inserting subtle problems into other plugins by being greedy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SQLite=&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://www.sqlite.org/ SQLite] is a fast local-file SQL database engine and SourceMod provides a DBI driver for it.  SQLite differs from MySQL, and thus MySQL queries may not work in SQLite.  The driver type for connections is &amp;lt;tt&amp;gt;sqlite&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Since SQLite is local only, most of the connection parameters can be ignored.  The only connection parameter required is &amp;lt;tt&amp;gt;database&amp;lt;/tt&amp;gt;, which specifies the file name of the database.  Databases are created on demand if they do not already exist, and are stored in &amp;lt;tt&amp;gt;addons/sourcemod/data/sqlite&amp;lt;/tt&amp;gt;.  An extension of &amp;quot;.sq3&amp;quot; is automatically appended to the file name.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can specify sub-folders in the database name.  For example, &amp;quot;cssdm/players&amp;quot; will become &amp;lt;tt&amp;gt;addons/sourcemod/data/sqlite/cssdm/players.sq3&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
SQLite supports the threading layer, and requires all of the same rules as the MySQL driver (including locks on shared connections).&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://www.sqlite.org SQLite Homepage]&lt;br /&gt;
*[http://sqlitebrowser.sourceforge.net/ SQLite Browser]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
&lt;br /&gt;
{{LanguageSwitch}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10509</id>
		<title>SDKTools (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10509"/>
		<updated>2018-02-06T15:42:25Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Add documentation for &amp;quot;offset&amp;quot; key in &amp;quot;Addresses&amp;quot; section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The SDKTools extension is an extension for various functions provided by the Source SDK.  Additionally, it has the ability to dynamically call many C++ functions in the SDK, for example, from CBaseEntity or any derived class.&lt;br /&gt;
&lt;br /&gt;
SDKTools contains simplified versions of SDK functions pre-written for ease of use.  These can be found in the additional include files:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_functions.inc&amp;lt;/tt&amp;gt; - Popular functions from the SDK.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt; - [[#Sound Functions|Sound-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents.inc&amp;lt;/tt&amp;gt; - [[#TempEnt Functions|TempEnt-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents_stocks.inc&amp;lt;/tt&amp;gt; - [[TempEnts (SourceMod SDKTools)|TempEnt Stocks for convenience]].&lt;br /&gt;
&lt;br /&gt;
SDKTools is powered by &amp;quot;BinTools,&amp;quot; a powerful extension for creating dynamic C/C++ calls.  BinTools is automatically loaded by SDKTools.&lt;br /&gt;
&lt;br /&gt;
=GameConfigs=&lt;br /&gt;
GameConfig files go into the &amp;quot;gamedata&amp;quot; folder under &amp;quot;sourcemod.&amp;quot;  In older revisions it was under &amp;quot;sourcemod/configs&amp;quot; which is now deprecated.&lt;br /&gt;
&lt;br /&gt;
==Virtual Offsets==&lt;br /&gt;
For adding virtual offsets, add sub-sections to the &amp;quot;Offsets&amp;quot; section of your game config file.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Offsets&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;GiveNamedItem&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;329&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;330&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
			&amp;quot;EyePosition&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;117&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;118&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Get offset of CPlayerResource::m_iBotDifficulty sendprop.&lt;br /&gt;
			// Dynamic way for FindSendPropInfo(class, prop);&lt;br /&gt;
			&amp;quot;BotDifficulty&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;class&amp;quot;	&amp;quot;CPlayerResource&amp;quot;&lt;br /&gt;
				&amp;quot;prop&amp;quot;		&amp;quot;m_iBotDifficulty&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Signature Scans==&lt;br /&gt;
For automated signature scans, add sub-sections to the &amp;quot;Signatures&amp;quot; section of your game config file.  These are the properties for a signature:&lt;br /&gt;
*&amp;lt;tt&amp;gt;library&amp;lt;/tt&amp;gt;: The library to search for the pattern or symbol for: &amp;quot;server&amp;quot;, &amp;quot;engine&amp;quot; or &amp;quot;matchmaking_ds&amp;quot; (defaults to &amp;quot;server&amp;quot;).&lt;br /&gt;
*&amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;linux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mac&amp;lt;/tt&amp;gt;: A pattern or symbol for that platform:&lt;br /&gt;
&lt;br /&gt;
You can put a pattern to search for in memory or a symbol name to lookup:&lt;br /&gt;
*A signature written in binary; for example, &amp;quot;\x56&amp;quot; instead of &amp;quot;0x56&amp;quot; -- the '*' (\x2A) character is a single byte wildcard.&lt;br /&gt;
*A named symbol.  To use a named symbol, start the string with the '@' character.  If a signature begins with '@', write the character in hexadecimal as above.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;RoundRespawn&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;\x56\x8B\xF1\x8B\x06\xFF\x90*\x04\x00\x00\x8B\x86*\x0D\x00&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@_ZN9CCSPlayer12RoundRespawnEv&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Raw address lookups==&lt;br /&gt;
Lets you peek and poke (limitation may apply) the Source Dedicated Server memory space, and get a raw address value in an automated way.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;left4dead2&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Addresses&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;CDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
					&amp;quot;read&amp;quot; &amp;quot;8&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;linux&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;read&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
				// Since SourceMod 1.9&lt;br /&gt;
				&amp;quot;offset&amp;quot; &amp;quot;4&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			/* Used solely to get the offset for TheDirector */&lt;br /&gt;
			&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;       &amp;quot;\x83\xEC\x14\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x53\x55\x6A\x24\xE8&amp;quot;&lt;br /&gt;
				/* 83 EC 14 57 8B F9 8B 0D ? ? ? ? E8 ? ? ? ? 84 C0 0F ? ? ? ? ? 53 55 6A 24 E8 */&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			/* Find the Director/ZombieManager singleton classes */&lt;br /&gt;
			&lt;br /&gt;
			&amp;quot;TheDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@TheDirector&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in an Address entry is parse from top to bottom as commands. This example would accomplish the same thing as the following pseudo-C++ code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BYTE * GetCDirectorAddress()&lt;br /&gt;
{&lt;br /&gt;
    BYTE * pAddr;&lt;br /&gt;
&lt;br /&gt;
#if WINDOWS&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;);&lt;br /&gt;
    pAddr = *(pAddr + 8);&lt;br /&gt;
&lt;br /&gt;
#elif LINUX&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;TheDirector&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
    pAddr = *(pAddr + 0);&lt;br /&gt;
    // Since SourceMod 1.9&lt;br /&gt;
    pAddr = pAddr + 4;&lt;br /&gt;
&lt;br /&gt;
    return pAddr;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To invoke this address lookup in your Sourcepawn code, you would simply set up your GameConf handle and run something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stock Address:GetTheDirector()&lt;br /&gt;
{&lt;br /&gt;
   return GameConfGetAddress(g_hMyGameConf, &amp;quot;CDirector&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more code examples, [https://github.com/confoglteam/l4d2_direct l4d2_direct] relies heavily on Address: functions.&lt;br /&gt;
&lt;br /&gt;
==Custom Key Values==&lt;br /&gt;
To read arbitary key value pairs from a gamedata file, add them to the &amp;quot;Keys&amp;quot; section of your game config file.&lt;br /&gt;
You can have different values per platform or have a key only be available on selected platforms.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Keys&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;INTERFACEVERSION_GAMEEVENTSMANAGER2&amp;quot;	&amp;quot;GAMEEVENTSMANAGER002&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			// Different values per platform (since SourceMod 1.10+)&lt;br /&gt;
			&amp;quot;MyGreatKey&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;this is wundows speaking&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;linux best linux&amp;quot;&lt;br /&gt;
				&amp;quot;mac&amp;quot;		&amp;quot;wat&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			&amp;quot;JustForLinux&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;not relevant for other platforms!&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the keys using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char buffer[512];&lt;br /&gt;
GameConfGetKeyValue(g_hMyGameConf, &amp;quot;MyGreatKey&amp;quot;, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inheritance==&lt;br /&gt;
If you wish for multiple mods to inherit from one block, you can add a special &amp;quot;#supported&amp;quot; section under a &amp;quot;#default&amp;quot; section.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;#default&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;#supported&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;game&amp;quot;		&amp;quot;dod&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies that the given block will be read for Day of Defeat as well.&lt;br /&gt;
&lt;br /&gt;
=Calling Functions=&lt;br /&gt;
Calling functions is complicated and requires strict attention to the C++ API you are trying to use.  If you make a mistake, something bad '''will''' happen (and if not, you got lucky!)  SDKTools is more complicated than PimpinJuice's &amp;quot;Hacks&amp;quot; extension because it precompiles all of the information needed to convert from Plugin memory to C++ types.  This precompilation step ensures better safety and speed, but it lengthens the preparation process.&lt;br /&gt;
&lt;br /&gt;
With that said, let's look at an overview of the call creation process.  Before making calls, we must ''prepare'' the call.  This will give us a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt; which will let us make as many calls as we like.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Init&amp;lt;/b&amp;gt; - The preparation must be initialized.  Here we can specify the calling convention, which is either static, or BaseEntity/BasePlayer-based.  BasePlayer should be used when only player entities should be allowed as the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Destination&amp;lt;/b&amp;gt; - The call must have a destination address or virtual index to use.  This is normally done via &amp;lt;tt&amp;gt;PrepSDKCall_SetFromConf&amp;lt;/tt&amp;gt; which ties into gameconf files.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Return Info&amp;lt;/b&amp;gt; - If the call has return information, it must be set via &amp;lt;tt&amp;gt;PrepSDKCall_SetReturnInfo&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt; - Each parameter (if any) must be added with &amp;lt;tt&amp;gt;PrepSDKCall_AddParameter&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Finalize&amp;lt;/b&amp;gt; - The call must be finalized with &amp;lt;tt&amp;gt;EndPrepSDKCall&amp;lt;/tt&amp;gt;, which will return a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;.  If it doesn't, one or more of the preparation operations failed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the examples below, consider a plugin called &amp;quot;sdkexamples.sp&amp;quot; which has a gamedata file of &amp;quot;plugin.sdkexamples.txt&amp;quot; containing the definitions in the first section.&lt;br /&gt;
&lt;br /&gt;
==RoundRespawn Example==&lt;br /&gt;
CCSPlayer::RoundRespawn is a Counter-Strike Source function which respawns players.  It used by CS:S DM.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;void CCSPlayer::RoundRespawn()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SDKCall example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hRoundRespawn;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, &amp;quot;RoundRespawn&amp;quot;);&lt;br /&gt;
	hRoundRespawn = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void RespawnPlayer(int client)&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hRoundRespawn, client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we did not have to set any extra information for parameters or return info, since CCSPlayer::RoundRespawn has no parameters and has a void return.&lt;br /&gt;
&lt;br /&gt;
==GiveNamedItem Example==&lt;br /&gt;
GiveNamedItem will give a player a named item.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual CBaseEntity *CBasePlayer::GiveNamedItem(const char *item, int iSubType = 0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGiveNamedItem;&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;GiveNamedItem&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);&lt;br /&gt;
	hGiveNamedItem = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GiveItem(int client, const char[] item)&lt;br /&gt;
{&lt;br /&gt;
	return SDKCall(hGiveNamedItem, client, item, 0);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetEyePosition Example==&lt;br /&gt;
Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual Vector CBaseEntity::EyePosition();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGetEyePosition;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;EyePosition&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_Vector, SDKPass_ByValue);&lt;br /&gt;
	hGetEyePosition= EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GetEyePosition(int client, float pos[3])&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hGetEyePosition, client, pos);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the vector is returned as the third parameter (first parameter after the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer).&lt;br /&gt;
&lt;br /&gt;
=TempEnt Functions=&lt;br /&gt;
TempEnts, also called &amp;quot;temporary entities,&amp;quot; &amp;quot;tempentities,&amp;quot; or &amp;quot;TEs,&amp;quot; are quick graphical displays that are too simple to justify the overhead of a &amp;lt;tt&amp;gt;CBaseEntity&amp;lt;/tt&amp;gt; instantiation or full server-side networkability.  In the SDK, they are statically defined instances that can be &amp;quot;played back&amp;quot; to the client by simply sending a copy of its network class properties.&lt;br /&gt;
&lt;br /&gt;
Temporary Entities are mod-dependent, in that a mod can change any of their properties or even the &amp;lt;tt&amp;gt;ITempEnts&amp;lt;/tt&amp;gt; class definition.  Because of this, SourceMod takes a very flexible approach:&lt;br /&gt;
*&amp;lt;b&amp;gt;First&amp;lt;/b&amp;gt;, a temp entity is ''started'' by name using &amp;lt;tt&amp;gt;TE_Start&amp;lt;/tt&amp;gt;.  A list of all tempent names and their network classes can be dumped with &amp;lt;tt&amp;gt;sm_print_telist&amp;lt;/tt&amp;gt; (SDKTools must be loaded).&lt;br /&gt;
*&amp;lt;b&amp;gt;Second&amp;lt;/b&amp;gt;, all of the tempent's properties are set via the &amp;lt;tt&amp;gt;TE_Write&amp;lt;/tt&amp;gt; natives.  All tempent properties can be dumped to a file using &amp;lt;tt&amp;gt;sm_dump_teprops&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Third&amp;lt;/b&amp;gt;, the properties are transmitted using &amp;lt;tt&amp;gt;TE_Send&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;TE_SendToAll&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;TE_SendToClient&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a convenience, SourceMod provides a number of pre-written stocks for SDK-defined temporary entities.  While the &amp;lt;tt&amp;gt;TE_*&amp;lt;/tt&amp;gt; natives are guaranteed to work on any fully-supported SourceMod mod, the &amp;lt;tt&amp;gt;TE_Setup*&amp;lt;/tt&amp;gt; stocks are not, as a mod might change the property layouts or the functionalities of the SDK-defined tempents.&lt;br /&gt;
&lt;br /&gt;
Some examples are below.  For pictures, see [[TempEnts (SourceMod SDKTools)]].&lt;br /&gt;
&lt;br /&gt;
Using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_SetupMetalSparks(pos, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_Start(&amp;quot;Metal Sparks&amp;quot;);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecPos&amp;quot;, pos);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecDir&amp;quot;, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sound Functions=&lt;br /&gt;
SDKTools exposes various sound-related members of IVEngineServer and IEngineSound.  The basic functions are in &amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitAmbientSound&amp;lt;/tt&amp;gt;: Plays an ambient sound from an origin.&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitSound, EmitSoundToClient, EmitSoundToAll&amp;lt;/tt&amp;gt;: Plays a sound to a list of clients from a specific entity.&lt;br /&gt;
&lt;br /&gt;
There are a few important properties about sounds:&lt;br /&gt;
*&amp;lt;b&amp;gt;Entity&amp;lt;/b&amp;gt;: The entity the sound should come from.  When playing a generic sound file to player(s), you should use &amp;lt;tt&amp;gt;SOUND_FROM_PLAYER&amp;lt;/tt&amp;gt;, which is a special SourceMod macro for making the sound come from the player target.  For ambient sounds you'd use &amp;lt;tt&amp;gt;SOUND_FROM_WORLD&amp;lt;/tt&amp;gt;, and for sounds from an entity you'd use the entity index.&lt;br /&gt;
*&amp;lt;b&amp;gt;Channel&amp;lt;/b&amp;gt;: Exposed as &amp;lt;tt&amp;gt;SNDCHAN_*&amp;lt;/tt&amp;gt;, normally you only need to use &amp;lt;tt&amp;gt;SNDCHAN_AUTO&amp;lt;/tt&amp;gt;.  The channel affects how the sound is spatialized[?]&lt;br /&gt;
*&amp;lt;b&amp;gt;Level&amp;lt;/b&amp;gt;: The decibel level.  There are a number of predefined levels as &amp;lt;tt&amp;gt;SNDLEVEL_*&amp;lt;/tt&amp;gt; -- the standard one is &amp;lt;tt&amp;gt;SNDLEVEL_NORMAL&amp;lt;/tt&amp;gt;.  Half-Life 1 used attenuation values instead; you can convert from these using &amp;lt;tt&amp;gt;ATTN_TO_SNDLEVEL()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Volume&amp;lt;/b&amp;gt;: The volume, on a scale of 0.0 to 1.0.  To use a volume other than the default, the &amp;lt;tt&amp;gt;SND_CHANGEVOL&amp;lt;/tt&amp;gt; flag should be included in the &amp;quot;flags&amp;quot; parameter.  The default volume is &amp;lt;tt&amp;gt;SNDVOL_NORMAL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Pitch&amp;lt;/b&amp;gt;: The pitch; predefined values are &amp;lt;tt&amp;gt;SNDPITCH_*&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;SNDPITCH_NORMAL&amp;lt;/tt&amp;gt; being the default.  &amp;lt;tt&amp;gt;SND_CHANGEPITCH&amp;lt;/tt&amp;gt; should be passed to use a non-default pitch.&lt;br /&gt;
*&amp;lt;b&amp;gt;Origin&amp;lt;/b&amp;gt;: If specified, an origin to play the sound from.&lt;br /&gt;
&lt;br /&gt;
Some very simple examples:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
EmitSoundToClient(client, &amp;quot;bot/affirmative.wav&amp;quot;);&lt;br /&gt;
EmitSoundToAll(&amp;quot;radio/terwin.wav&amp;quot;);&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Supported Mods=&lt;br /&gt;
SDKTools must have specific support added for each mod.  So far, default support exists for the following modifications:&lt;br /&gt;
*Counter-Strike: Source&lt;br /&gt;
*Day of Defeat: Source&lt;br /&gt;
*Dystopia&lt;br /&gt;
*Half-Life 2: Deathmatch&lt;br /&gt;
*Insurgency (only some of the CBasePlayer SDK functions are available)&lt;br /&gt;
*Pirates, Vikings, and Knights II&lt;br /&gt;
*The Ship&lt;br /&gt;
*SourceForts&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Vfunc_offsets_%28SourceMM%29|Virtual Functions]]&lt;br /&gt;
*[[TempEnts (SourceMod SDKTools)|TempEnts]]&lt;br /&gt;
*[[Useful_Signatures_%28Source%29|Useful Signatures]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10508</id>
		<title>SDKTools (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10508"/>
		<updated>2018-02-06T15:37:43Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Update &amp;quot;Signatures&amp;quot; section description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The SDKTools extension is an extension for various functions provided by the Source SDK.  Additionally, it has the ability to dynamically call many C++ functions in the SDK, for example, from CBaseEntity or any derived class.&lt;br /&gt;
&lt;br /&gt;
SDKTools contains simplified versions of SDK functions pre-written for ease of use.  These can be found in the additional include files:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_functions.inc&amp;lt;/tt&amp;gt; - Popular functions from the SDK.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt; - [[#Sound Functions|Sound-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents.inc&amp;lt;/tt&amp;gt; - [[#TempEnt Functions|TempEnt-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents_stocks.inc&amp;lt;/tt&amp;gt; - [[TempEnts (SourceMod SDKTools)|TempEnt Stocks for convenience]].&lt;br /&gt;
&lt;br /&gt;
SDKTools is powered by &amp;quot;BinTools,&amp;quot; a powerful extension for creating dynamic C/C++ calls.  BinTools is automatically loaded by SDKTools.&lt;br /&gt;
&lt;br /&gt;
=GameConfigs=&lt;br /&gt;
GameConfig files go into the &amp;quot;gamedata&amp;quot; folder under &amp;quot;sourcemod.&amp;quot;  In older revisions it was under &amp;quot;sourcemod/configs&amp;quot; which is now deprecated.&lt;br /&gt;
&lt;br /&gt;
==Virtual Offsets==&lt;br /&gt;
For adding virtual offsets, add sub-sections to the &amp;quot;Offsets&amp;quot; section of your game config file.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Offsets&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;GiveNamedItem&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;329&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;330&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
			&amp;quot;EyePosition&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;117&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;118&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Get offset of CPlayerResource::m_iBotDifficulty sendprop.&lt;br /&gt;
			// Dynamic way for FindSendPropInfo(class, prop);&lt;br /&gt;
			&amp;quot;BotDifficulty&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;class&amp;quot;	&amp;quot;CPlayerResource&amp;quot;&lt;br /&gt;
				&amp;quot;prop&amp;quot;		&amp;quot;m_iBotDifficulty&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Signature Scans==&lt;br /&gt;
For automated signature scans, add sub-sections to the &amp;quot;Signatures&amp;quot; section of your game config file.  These are the properties for a signature:&lt;br /&gt;
*&amp;lt;tt&amp;gt;library&amp;lt;/tt&amp;gt;: The library to search for the pattern or symbol for: &amp;quot;server&amp;quot;, &amp;quot;engine&amp;quot; or &amp;quot;matchmaking_ds&amp;quot; (defaults to &amp;quot;server&amp;quot;).&lt;br /&gt;
*&amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;linux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mac&amp;lt;/tt&amp;gt;: A pattern or symbol for that platform:&lt;br /&gt;
&lt;br /&gt;
You can put a pattern to search for in memory or a symbol name to lookup:&lt;br /&gt;
*A signature written in binary; for example, &amp;quot;\x56&amp;quot; instead of &amp;quot;0x56&amp;quot; -- the '*' (\x2A) character is a single byte wildcard.&lt;br /&gt;
*A named symbol.  To use a named symbol, start the string with the '@' character.  If a signature begins with '@', write the character in hexadecimal as above.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;RoundRespawn&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;\x56\x8B\xF1\x8B\x06\xFF\x90*\x04\x00\x00\x8B\x86*\x0D\x00&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@_ZN9CCSPlayer12RoundRespawnEv&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Raw address lookups==&lt;br /&gt;
Lets you peek and poke (limitation may apply) the Source Dedicated Server memory space, and get a raw address value in an automated way.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;left4dead2&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Addresses&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;CDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
					&amp;quot;read&amp;quot; &amp;quot;8&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;linux&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;read&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			/* Used solely to get the offset for TheDirector */&lt;br /&gt;
			&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;       &amp;quot;\x83\xEC\x14\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x53\x55\x6A\x24\xE8&amp;quot;&lt;br /&gt;
				/* 83 EC 14 57 8B F9 8B 0D ? ? ? ? E8 ? ? ? ? 84 C0 0F ? ? ? ? ? 53 55 6A 24 E8 */&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			/* Find the Director/ZombieManager singleton classes */&lt;br /&gt;
			&lt;br /&gt;
			&amp;quot;TheDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@TheDirector&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in an Address entry is parse from top to bottom as commands. This example would accomplish the same thing as the following pseudo-C++ code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BYTE * GetCDirectorAddress()&lt;br /&gt;
{&lt;br /&gt;
    BYTE * pAddr;&lt;br /&gt;
&lt;br /&gt;
#if WINDOWS&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;);&lt;br /&gt;
    pAddr = *(pAddr + 8);&lt;br /&gt;
&lt;br /&gt;
#elif LINUX&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;TheDirector&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
    pAddr = *(pAddr + 0);&lt;br /&gt;
&lt;br /&gt;
    return pAddr;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To invoke this address lookup in your Sourcepawn code, you would simply set up your GameConf handle and run something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stock Address:GetTheDirector()&lt;br /&gt;
{&lt;br /&gt;
   return GameConfGetAddress(g_hMyGameConf, &amp;quot;CDirector&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more code examples, [https://github.com/confoglteam/l4d2_direct l4d2_direct] relies heavily on Address: functions.&lt;br /&gt;
&lt;br /&gt;
==Custom Key Values==&lt;br /&gt;
To read arbitary key value pairs from a gamedata file, add them to the &amp;quot;Keys&amp;quot; section of your game config file.&lt;br /&gt;
You can have different values per platform or have a key only be available on selected platforms.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Keys&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;INTERFACEVERSION_GAMEEVENTSMANAGER2&amp;quot;	&amp;quot;GAMEEVENTSMANAGER002&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			// Different values per platform (since SourceMod 1.10+)&lt;br /&gt;
			&amp;quot;MyGreatKey&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;this is wundows speaking&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;linux best linux&amp;quot;&lt;br /&gt;
				&amp;quot;mac&amp;quot;		&amp;quot;wat&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			&amp;quot;JustForLinux&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;not relevant for other platforms!&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the keys using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char buffer[512];&lt;br /&gt;
GameConfGetKeyValue(g_hMyGameConf, &amp;quot;MyGreatKey&amp;quot;, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inheritance==&lt;br /&gt;
If you wish for multiple mods to inherit from one block, you can add a special &amp;quot;#supported&amp;quot; section under a &amp;quot;#default&amp;quot; section.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;#default&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;#supported&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;game&amp;quot;		&amp;quot;dod&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies that the given block will be read for Day of Defeat as well.&lt;br /&gt;
&lt;br /&gt;
=Calling Functions=&lt;br /&gt;
Calling functions is complicated and requires strict attention to the C++ API you are trying to use.  If you make a mistake, something bad '''will''' happen (and if not, you got lucky!)  SDKTools is more complicated than PimpinJuice's &amp;quot;Hacks&amp;quot; extension because it precompiles all of the information needed to convert from Plugin memory to C++ types.  This precompilation step ensures better safety and speed, but it lengthens the preparation process.&lt;br /&gt;
&lt;br /&gt;
With that said, let's look at an overview of the call creation process.  Before making calls, we must ''prepare'' the call.  This will give us a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt; which will let us make as many calls as we like.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Init&amp;lt;/b&amp;gt; - The preparation must be initialized.  Here we can specify the calling convention, which is either static, or BaseEntity/BasePlayer-based.  BasePlayer should be used when only player entities should be allowed as the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Destination&amp;lt;/b&amp;gt; - The call must have a destination address or virtual index to use.  This is normally done via &amp;lt;tt&amp;gt;PrepSDKCall_SetFromConf&amp;lt;/tt&amp;gt; which ties into gameconf files.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Return Info&amp;lt;/b&amp;gt; - If the call has return information, it must be set via &amp;lt;tt&amp;gt;PrepSDKCall_SetReturnInfo&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt; - Each parameter (if any) must be added with &amp;lt;tt&amp;gt;PrepSDKCall_AddParameter&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Finalize&amp;lt;/b&amp;gt; - The call must be finalized with &amp;lt;tt&amp;gt;EndPrepSDKCall&amp;lt;/tt&amp;gt;, which will return a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;.  If it doesn't, one or more of the preparation operations failed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the examples below, consider a plugin called &amp;quot;sdkexamples.sp&amp;quot; which has a gamedata file of &amp;quot;plugin.sdkexamples.txt&amp;quot; containing the definitions in the first section.&lt;br /&gt;
&lt;br /&gt;
==RoundRespawn Example==&lt;br /&gt;
CCSPlayer::RoundRespawn is a Counter-Strike Source function which respawns players.  It used by CS:S DM.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;void CCSPlayer::RoundRespawn()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SDKCall example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hRoundRespawn;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, &amp;quot;RoundRespawn&amp;quot;);&lt;br /&gt;
	hRoundRespawn = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void RespawnPlayer(int client)&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hRoundRespawn, client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we did not have to set any extra information for parameters or return info, since CCSPlayer::RoundRespawn has no parameters and has a void return.&lt;br /&gt;
&lt;br /&gt;
==GiveNamedItem Example==&lt;br /&gt;
GiveNamedItem will give a player a named item.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual CBaseEntity *CBasePlayer::GiveNamedItem(const char *item, int iSubType = 0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGiveNamedItem;&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;GiveNamedItem&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);&lt;br /&gt;
	hGiveNamedItem = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GiveItem(int client, const char[] item)&lt;br /&gt;
{&lt;br /&gt;
	return SDKCall(hGiveNamedItem, client, item, 0);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetEyePosition Example==&lt;br /&gt;
Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual Vector CBaseEntity::EyePosition();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGetEyePosition;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;EyePosition&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_Vector, SDKPass_ByValue);&lt;br /&gt;
	hGetEyePosition= EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GetEyePosition(int client, float pos[3])&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hGetEyePosition, client, pos);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the vector is returned as the third parameter (first parameter after the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer).&lt;br /&gt;
&lt;br /&gt;
=TempEnt Functions=&lt;br /&gt;
TempEnts, also called &amp;quot;temporary entities,&amp;quot; &amp;quot;tempentities,&amp;quot; or &amp;quot;TEs,&amp;quot; are quick graphical displays that are too simple to justify the overhead of a &amp;lt;tt&amp;gt;CBaseEntity&amp;lt;/tt&amp;gt; instantiation or full server-side networkability.  In the SDK, they are statically defined instances that can be &amp;quot;played back&amp;quot; to the client by simply sending a copy of its network class properties.&lt;br /&gt;
&lt;br /&gt;
Temporary Entities are mod-dependent, in that a mod can change any of their properties or even the &amp;lt;tt&amp;gt;ITempEnts&amp;lt;/tt&amp;gt; class definition.  Because of this, SourceMod takes a very flexible approach:&lt;br /&gt;
*&amp;lt;b&amp;gt;First&amp;lt;/b&amp;gt;, a temp entity is ''started'' by name using &amp;lt;tt&amp;gt;TE_Start&amp;lt;/tt&amp;gt;.  A list of all tempent names and their network classes can be dumped with &amp;lt;tt&amp;gt;sm_print_telist&amp;lt;/tt&amp;gt; (SDKTools must be loaded).&lt;br /&gt;
*&amp;lt;b&amp;gt;Second&amp;lt;/b&amp;gt;, all of the tempent's properties are set via the &amp;lt;tt&amp;gt;TE_Write&amp;lt;/tt&amp;gt; natives.  All tempent properties can be dumped to a file using &amp;lt;tt&amp;gt;sm_dump_teprops&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Third&amp;lt;/b&amp;gt;, the properties are transmitted using &amp;lt;tt&amp;gt;TE_Send&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;TE_SendToAll&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;TE_SendToClient&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a convenience, SourceMod provides a number of pre-written stocks for SDK-defined temporary entities.  While the &amp;lt;tt&amp;gt;TE_*&amp;lt;/tt&amp;gt; natives are guaranteed to work on any fully-supported SourceMod mod, the &amp;lt;tt&amp;gt;TE_Setup*&amp;lt;/tt&amp;gt; stocks are not, as a mod might change the property layouts or the functionalities of the SDK-defined tempents.&lt;br /&gt;
&lt;br /&gt;
Some examples are below.  For pictures, see [[TempEnts (SourceMod SDKTools)]].&lt;br /&gt;
&lt;br /&gt;
Using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_SetupMetalSparks(pos, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_Start(&amp;quot;Metal Sparks&amp;quot;);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecPos&amp;quot;, pos);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecDir&amp;quot;, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sound Functions=&lt;br /&gt;
SDKTools exposes various sound-related members of IVEngineServer and IEngineSound.  The basic functions are in &amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitAmbientSound&amp;lt;/tt&amp;gt;: Plays an ambient sound from an origin.&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitSound, EmitSoundToClient, EmitSoundToAll&amp;lt;/tt&amp;gt;: Plays a sound to a list of clients from a specific entity.&lt;br /&gt;
&lt;br /&gt;
There are a few important properties about sounds:&lt;br /&gt;
*&amp;lt;b&amp;gt;Entity&amp;lt;/b&amp;gt;: The entity the sound should come from.  When playing a generic sound file to player(s), you should use &amp;lt;tt&amp;gt;SOUND_FROM_PLAYER&amp;lt;/tt&amp;gt;, which is a special SourceMod macro for making the sound come from the player target.  For ambient sounds you'd use &amp;lt;tt&amp;gt;SOUND_FROM_WORLD&amp;lt;/tt&amp;gt;, and for sounds from an entity you'd use the entity index.&lt;br /&gt;
*&amp;lt;b&amp;gt;Channel&amp;lt;/b&amp;gt;: Exposed as &amp;lt;tt&amp;gt;SNDCHAN_*&amp;lt;/tt&amp;gt;, normally you only need to use &amp;lt;tt&amp;gt;SNDCHAN_AUTO&amp;lt;/tt&amp;gt;.  The channel affects how the sound is spatialized[?]&lt;br /&gt;
*&amp;lt;b&amp;gt;Level&amp;lt;/b&amp;gt;: The decibel level.  There are a number of predefined levels as &amp;lt;tt&amp;gt;SNDLEVEL_*&amp;lt;/tt&amp;gt; -- the standard one is &amp;lt;tt&amp;gt;SNDLEVEL_NORMAL&amp;lt;/tt&amp;gt;.  Half-Life 1 used attenuation values instead; you can convert from these using &amp;lt;tt&amp;gt;ATTN_TO_SNDLEVEL()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Volume&amp;lt;/b&amp;gt;: The volume, on a scale of 0.0 to 1.0.  To use a volume other than the default, the &amp;lt;tt&amp;gt;SND_CHANGEVOL&amp;lt;/tt&amp;gt; flag should be included in the &amp;quot;flags&amp;quot; parameter.  The default volume is &amp;lt;tt&amp;gt;SNDVOL_NORMAL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Pitch&amp;lt;/b&amp;gt;: The pitch; predefined values are &amp;lt;tt&amp;gt;SNDPITCH_*&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;SNDPITCH_NORMAL&amp;lt;/tt&amp;gt; being the default.  &amp;lt;tt&amp;gt;SND_CHANGEPITCH&amp;lt;/tt&amp;gt; should be passed to use a non-default pitch.&lt;br /&gt;
*&amp;lt;b&amp;gt;Origin&amp;lt;/b&amp;gt;: If specified, an origin to play the sound from.&lt;br /&gt;
&lt;br /&gt;
Some very simple examples:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
EmitSoundToClient(client, &amp;quot;bot/affirmative.wav&amp;quot;);&lt;br /&gt;
EmitSoundToAll(&amp;quot;radio/terwin.wav&amp;quot;);&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Supported Mods=&lt;br /&gt;
SDKTools must have specific support added for each mod.  So far, default support exists for the following modifications:&lt;br /&gt;
*Counter-Strike: Source&lt;br /&gt;
*Day of Defeat: Source&lt;br /&gt;
*Dystopia&lt;br /&gt;
*Half-Life 2: Deathmatch&lt;br /&gt;
*Insurgency (only some of the CBasePlayer SDK functions are available)&lt;br /&gt;
*Pirates, Vikings, and Knights II&lt;br /&gt;
*The Ship&lt;br /&gt;
*SourceForts&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Vfunc_offsets_%28SourceMM%29|Virtual Functions]]&lt;br /&gt;
*[[TempEnts (SourceMod SDKTools)|TempEnts]]&lt;br /&gt;
*[[Useful_Signatures_%28Source%29|Useful Signatures]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10507</id>
		<title>SDKTools (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10507"/>
		<updated>2018-02-06T15:27:22Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Add documentation for sendprop offset lookup in &amp;quot;Offsets&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The SDKTools extension is an extension for various functions provided by the Source SDK.  Additionally, it has the ability to dynamically call many C++ functions in the SDK, for example, from CBaseEntity or any derived class.&lt;br /&gt;
&lt;br /&gt;
SDKTools contains simplified versions of SDK functions pre-written for ease of use.  These can be found in the additional include files:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_functions.inc&amp;lt;/tt&amp;gt; - Popular functions from the SDK.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt; - [[#Sound Functions|Sound-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents.inc&amp;lt;/tt&amp;gt; - [[#TempEnt Functions|TempEnt-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents_stocks.inc&amp;lt;/tt&amp;gt; - [[TempEnts (SourceMod SDKTools)|TempEnt Stocks for convenience]].&lt;br /&gt;
&lt;br /&gt;
SDKTools is powered by &amp;quot;BinTools,&amp;quot; a powerful extension for creating dynamic C/C++ calls.  BinTools is automatically loaded by SDKTools.&lt;br /&gt;
&lt;br /&gt;
=GameConfigs=&lt;br /&gt;
GameConfig files go into the &amp;quot;gamedata&amp;quot; folder under &amp;quot;sourcemod.&amp;quot;  In older revisions it was under &amp;quot;sourcemod/configs&amp;quot; which is now deprecated.&lt;br /&gt;
&lt;br /&gt;
==Virtual Offsets==&lt;br /&gt;
For adding virtual offsets, add sub-sections to the &amp;quot;Offsets&amp;quot; section of your game config file.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Offsets&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;GiveNamedItem&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;329&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;330&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
			&amp;quot;EyePosition&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;117&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;118&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Get offset of CPlayerResource::m_iBotDifficulty sendprop.&lt;br /&gt;
			// Dynamic way for FindSendPropInfo(class, prop);&lt;br /&gt;
			&amp;quot;BotDifficulty&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;class&amp;quot;	&amp;quot;CPlayerResource&amp;quot;&lt;br /&gt;
				&amp;quot;prop&amp;quot;		&amp;quot;m_iBotDifficulty&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Signature Scans==&lt;br /&gt;
For automated signature scans, add sub-sections to the &amp;quot;Signatures&amp;quot; section of your game config file.  There are three properties for a signature:&lt;br /&gt;
*&amp;lt;tt&amp;gt;library&amp;lt;/tt&amp;gt;: Must be &amp;quot;server&amp;quot; right now.&lt;br /&gt;
*&amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;: A signature written in binary; for example, &amp;quot;\x56&amp;quot; instead of &amp;quot;0x56&amp;quot; -- the '*' character is a single byte wildcard.&lt;br /&gt;
*&amp;lt;tt&amp;gt;linux&amp;lt;/tt&amp;gt;: Either a signature as with &amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;, or a named symbol.  To use a named symbol, start the string with the '@' character.  If a signature begins with '@', write the character in hexadecimal as above.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;RoundRespawn&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;\x56\x8B\xF1\x8B\x06\xFF\x90*\x04\x00\x00\x8B\x86*\x0D\x00&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@_ZN9CCSPlayer12RoundRespawnEv&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Raw address lookups==&lt;br /&gt;
Lets you peek and poke (limitation may apply) the Source Dedicated Server memory space, and get a raw address value in an automated way.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;left4dead2&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Addresses&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;CDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
					&amp;quot;read&amp;quot; &amp;quot;8&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;linux&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;read&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			/* Used solely to get the offset for TheDirector */&lt;br /&gt;
			&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;       &amp;quot;\x83\xEC\x14\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x53\x55\x6A\x24\xE8&amp;quot;&lt;br /&gt;
				/* 83 EC 14 57 8B F9 8B 0D ? ? ? ? E8 ? ? ? ? 84 C0 0F ? ? ? ? ? 53 55 6A 24 E8 */&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			/* Find the Director/ZombieManager singleton classes */&lt;br /&gt;
			&lt;br /&gt;
			&amp;quot;TheDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@TheDirector&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in an Address entry is parse from top to bottom as commands. This example would accomplish the same thing as the following pseudo-C++ code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BYTE * GetCDirectorAddress()&lt;br /&gt;
{&lt;br /&gt;
    BYTE * pAddr;&lt;br /&gt;
&lt;br /&gt;
#if WINDOWS&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;);&lt;br /&gt;
    pAddr = *(pAddr + 8);&lt;br /&gt;
&lt;br /&gt;
#elif LINUX&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;TheDirector&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
    pAddr = *(pAddr + 0);&lt;br /&gt;
&lt;br /&gt;
    return pAddr;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To invoke this address lookup in your Sourcepawn code, you would simply set up your GameConf handle and run something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stock Address:GetTheDirector()&lt;br /&gt;
{&lt;br /&gt;
   return GameConfGetAddress(g_hMyGameConf, &amp;quot;CDirector&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more code examples, [https://github.com/confoglteam/l4d2_direct l4d2_direct] relies heavily on Address: functions.&lt;br /&gt;
&lt;br /&gt;
==Custom Key Values==&lt;br /&gt;
To read arbitary key value pairs from a gamedata file, add them to the &amp;quot;Keys&amp;quot; section of your game config file.&lt;br /&gt;
You can have different values per platform or have a key only be available on selected platforms.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Keys&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;INTERFACEVERSION_GAMEEVENTSMANAGER2&amp;quot;	&amp;quot;GAMEEVENTSMANAGER002&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			// Different values per platform (since SourceMod 1.10+)&lt;br /&gt;
			&amp;quot;MyGreatKey&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;this is wundows speaking&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;linux best linux&amp;quot;&lt;br /&gt;
				&amp;quot;mac&amp;quot;		&amp;quot;wat&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			&amp;quot;JustForLinux&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;not relevant for other platforms!&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the keys using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char buffer[512];&lt;br /&gt;
GameConfGetKeyValue(g_hMyGameConf, &amp;quot;MyGreatKey&amp;quot;, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inheritance==&lt;br /&gt;
If you wish for multiple mods to inherit from one block, you can add a special &amp;quot;#supported&amp;quot; section under a &amp;quot;#default&amp;quot; section.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;#default&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;#supported&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;game&amp;quot;		&amp;quot;dod&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies that the given block will be read for Day of Defeat as well.&lt;br /&gt;
&lt;br /&gt;
=Calling Functions=&lt;br /&gt;
Calling functions is complicated and requires strict attention to the C++ API you are trying to use.  If you make a mistake, something bad '''will''' happen (and if not, you got lucky!)  SDKTools is more complicated than PimpinJuice's &amp;quot;Hacks&amp;quot; extension because it precompiles all of the information needed to convert from Plugin memory to C++ types.  This precompilation step ensures better safety and speed, but it lengthens the preparation process.&lt;br /&gt;
&lt;br /&gt;
With that said, let's look at an overview of the call creation process.  Before making calls, we must ''prepare'' the call.  This will give us a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt; which will let us make as many calls as we like.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Init&amp;lt;/b&amp;gt; - The preparation must be initialized.  Here we can specify the calling convention, which is either static, or BaseEntity/BasePlayer-based.  BasePlayer should be used when only player entities should be allowed as the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Destination&amp;lt;/b&amp;gt; - The call must have a destination address or virtual index to use.  This is normally done via &amp;lt;tt&amp;gt;PrepSDKCall_SetFromConf&amp;lt;/tt&amp;gt; which ties into gameconf files.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Return Info&amp;lt;/b&amp;gt; - If the call has return information, it must be set via &amp;lt;tt&amp;gt;PrepSDKCall_SetReturnInfo&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt; - Each parameter (if any) must be added with &amp;lt;tt&amp;gt;PrepSDKCall_AddParameter&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Finalize&amp;lt;/b&amp;gt; - The call must be finalized with &amp;lt;tt&amp;gt;EndPrepSDKCall&amp;lt;/tt&amp;gt;, which will return a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;.  If it doesn't, one or more of the preparation operations failed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the examples below, consider a plugin called &amp;quot;sdkexamples.sp&amp;quot; which has a gamedata file of &amp;quot;plugin.sdkexamples.txt&amp;quot; containing the definitions in the first section.&lt;br /&gt;
&lt;br /&gt;
==RoundRespawn Example==&lt;br /&gt;
CCSPlayer::RoundRespawn is a Counter-Strike Source function which respawns players.  It used by CS:S DM.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;void CCSPlayer::RoundRespawn()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SDKCall example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hRoundRespawn;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, &amp;quot;RoundRespawn&amp;quot;);&lt;br /&gt;
	hRoundRespawn = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void RespawnPlayer(int client)&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hRoundRespawn, client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we did not have to set any extra information for parameters or return info, since CCSPlayer::RoundRespawn has no parameters and has a void return.&lt;br /&gt;
&lt;br /&gt;
==GiveNamedItem Example==&lt;br /&gt;
GiveNamedItem will give a player a named item.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual CBaseEntity *CBasePlayer::GiveNamedItem(const char *item, int iSubType = 0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGiveNamedItem;&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;GiveNamedItem&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);&lt;br /&gt;
	hGiveNamedItem = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GiveItem(int client, const char[] item)&lt;br /&gt;
{&lt;br /&gt;
	return SDKCall(hGiveNamedItem, client, item, 0);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetEyePosition Example==&lt;br /&gt;
Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual Vector CBaseEntity::EyePosition();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGetEyePosition;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;EyePosition&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_Vector, SDKPass_ByValue);&lt;br /&gt;
	hGetEyePosition= EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GetEyePosition(int client, float pos[3])&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hGetEyePosition, client, pos);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the vector is returned as the third parameter (first parameter after the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer).&lt;br /&gt;
&lt;br /&gt;
=TempEnt Functions=&lt;br /&gt;
TempEnts, also called &amp;quot;temporary entities,&amp;quot; &amp;quot;tempentities,&amp;quot; or &amp;quot;TEs,&amp;quot; are quick graphical displays that are too simple to justify the overhead of a &amp;lt;tt&amp;gt;CBaseEntity&amp;lt;/tt&amp;gt; instantiation or full server-side networkability.  In the SDK, they are statically defined instances that can be &amp;quot;played back&amp;quot; to the client by simply sending a copy of its network class properties.&lt;br /&gt;
&lt;br /&gt;
Temporary Entities are mod-dependent, in that a mod can change any of their properties or even the &amp;lt;tt&amp;gt;ITempEnts&amp;lt;/tt&amp;gt; class definition.  Because of this, SourceMod takes a very flexible approach:&lt;br /&gt;
*&amp;lt;b&amp;gt;First&amp;lt;/b&amp;gt;, a temp entity is ''started'' by name using &amp;lt;tt&amp;gt;TE_Start&amp;lt;/tt&amp;gt;.  A list of all tempent names and their network classes can be dumped with &amp;lt;tt&amp;gt;sm_print_telist&amp;lt;/tt&amp;gt; (SDKTools must be loaded).&lt;br /&gt;
*&amp;lt;b&amp;gt;Second&amp;lt;/b&amp;gt;, all of the tempent's properties are set via the &amp;lt;tt&amp;gt;TE_Write&amp;lt;/tt&amp;gt; natives.  All tempent properties can be dumped to a file using &amp;lt;tt&amp;gt;sm_dump_teprops&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Third&amp;lt;/b&amp;gt;, the properties are transmitted using &amp;lt;tt&amp;gt;TE_Send&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;TE_SendToAll&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;TE_SendToClient&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a convenience, SourceMod provides a number of pre-written stocks for SDK-defined temporary entities.  While the &amp;lt;tt&amp;gt;TE_*&amp;lt;/tt&amp;gt; natives are guaranteed to work on any fully-supported SourceMod mod, the &amp;lt;tt&amp;gt;TE_Setup*&amp;lt;/tt&amp;gt; stocks are not, as a mod might change the property layouts or the functionalities of the SDK-defined tempents.&lt;br /&gt;
&lt;br /&gt;
Some examples are below.  For pictures, see [[TempEnts (SourceMod SDKTools)]].&lt;br /&gt;
&lt;br /&gt;
Using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_SetupMetalSparks(pos, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_Start(&amp;quot;Metal Sparks&amp;quot;);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecPos&amp;quot;, pos);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecDir&amp;quot;, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sound Functions=&lt;br /&gt;
SDKTools exposes various sound-related members of IVEngineServer and IEngineSound.  The basic functions are in &amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitAmbientSound&amp;lt;/tt&amp;gt;: Plays an ambient sound from an origin.&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitSound, EmitSoundToClient, EmitSoundToAll&amp;lt;/tt&amp;gt;: Plays a sound to a list of clients from a specific entity.&lt;br /&gt;
&lt;br /&gt;
There are a few important properties about sounds:&lt;br /&gt;
*&amp;lt;b&amp;gt;Entity&amp;lt;/b&amp;gt;: The entity the sound should come from.  When playing a generic sound file to player(s), you should use &amp;lt;tt&amp;gt;SOUND_FROM_PLAYER&amp;lt;/tt&amp;gt;, which is a special SourceMod macro for making the sound come from the player target.  For ambient sounds you'd use &amp;lt;tt&amp;gt;SOUND_FROM_WORLD&amp;lt;/tt&amp;gt;, and for sounds from an entity you'd use the entity index.&lt;br /&gt;
*&amp;lt;b&amp;gt;Channel&amp;lt;/b&amp;gt;: Exposed as &amp;lt;tt&amp;gt;SNDCHAN_*&amp;lt;/tt&amp;gt;, normally you only need to use &amp;lt;tt&amp;gt;SNDCHAN_AUTO&amp;lt;/tt&amp;gt;.  The channel affects how the sound is spatialized[?]&lt;br /&gt;
*&amp;lt;b&amp;gt;Level&amp;lt;/b&amp;gt;: The decibel level.  There are a number of predefined levels as &amp;lt;tt&amp;gt;SNDLEVEL_*&amp;lt;/tt&amp;gt; -- the standard one is &amp;lt;tt&amp;gt;SNDLEVEL_NORMAL&amp;lt;/tt&amp;gt;.  Half-Life 1 used attenuation values instead; you can convert from these using &amp;lt;tt&amp;gt;ATTN_TO_SNDLEVEL()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Volume&amp;lt;/b&amp;gt;: The volume, on a scale of 0.0 to 1.0.  To use a volume other than the default, the &amp;lt;tt&amp;gt;SND_CHANGEVOL&amp;lt;/tt&amp;gt; flag should be included in the &amp;quot;flags&amp;quot; parameter.  The default volume is &amp;lt;tt&amp;gt;SNDVOL_NORMAL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Pitch&amp;lt;/b&amp;gt;: The pitch; predefined values are &amp;lt;tt&amp;gt;SNDPITCH_*&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;SNDPITCH_NORMAL&amp;lt;/tt&amp;gt; being the default.  &amp;lt;tt&amp;gt;SND_CHANGEPITCH&amp;lt;/tt&amp;gt; should be passed to use a non-default pitch.&lt;br /&gt;
*&amp;lt;b&amp;gt;Origin&amp;lt;/b&amp;gt;: If specified, an origin to play the sound from.&lt;br /&gt;
&lt;br /&gt;
Some very simple examples:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
EmitSoundToClient(client, &amp;quot;bot/affirmative.wav&amp;quot;);&lt;br /&gt;
EmitSoundToAll(&amp;quot;radio/terwin.wav&amp;quot;);&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Supported Mods=&lt;br /&gt;
SDKTools must have specific support added for each mod.  So far, default support exists for the following modifications:&lt;br /&gt;
*Counter-Strike: Source&lt;br /&gt;
*Day of Defeat: Source&lt;br /&gt;
*Dystopia&lt;br /&gt;
*Half-Life 2: Deathmatch&lt;br /&gt;
*Insurgency (only some of the CBasePlayer SDK functions are available)&lt;br /&gt;
*Pirates, Vikings, and Knights II&lt;br /&gt;
*The Ship&lt;br /&gt;
*SourceForts&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Vfunc_offsets_%28SourceMM%29|Virtual Functions]]&lt;br /&gt;
*[[TempEnts (SourceMod SDKTools)|TempEnts]]&lt;br /&gt;
*[[Useful_Signatures_%28Source%29|Useful Signatures]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10506</id>
		<title>SDKTools (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SDKTools_(SourceMod_Scripting)&amp;diff=10506"/>
		<updated>2018-02-06T15:13:20Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Add gamedata &amp;quot;Keys&amp;quot; section documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The SDKTools extension is an extension for various functions provided by the Source SDK.  Additionally, it has the ability to dynamically call many C++ functions in the SDK, for example, from CBaseEntity or any derived class.&lt;br /&gt;
&lt;br /&gt;
SDKTools contains simplified versions of SDK functions pre-written for ease of use.  These can be found in the additional include files:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_functions.inc&amp;lt;/tt&amp;gt; - Popular functions from the SDK.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt; - [[#Sound Functions|Sound-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents.inc&amp;lt;/tt&amp;gt; - [[#TempEnt Functions|TempEnt-related functions]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;sdktools_tempents_stocks.inc&amp;lt;/tt&amp;gt; - [[TempEnts (SourceMod SDKTools)|TempEnt Stocks for convenience]].&lt;br /&gt;
&lt;br /&gt;
SDKTools is powered by &amp;quot;BinTools,&amp;quot; a powerful extension for creating dynamic C/C++ calls.  BinTools is automatically loaded by SDKTools.&lt;br /&gt;
&lt;br /&gt;
=GameConfigs=&lt;br /&gt;
GameConfig files go into the &amp;quot;gamedata&amp;quot; folder under &amp;quot;sourcemod.&amp;quot;  In older revisions it was under &amp;quot;sourcemod/configs&amp;quot; which is now deprecated.&lt;br /&gt;
&lt;br /&gt;
==Virtual Offsets==&lt;br /&gt;
For adding virtual offsets, add sub-sections to the &amp;quot;Offsets&amp;quot; section of your game config file.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Offsets&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;GiveNamedItem&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;329&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;330&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
			&amp;quot;EyePosition&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;117&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;118&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Signature Scans==&lt;br /&gt;
For automated signature scans, add sub-sections to the &amp;quot;Signatures&amp;quot; section of your game config file.  There are three properties for a signature:&lt;br /&gt;
*&amp;lt;tt&amp;gt;library&amp;lt;/tt&amp;gt;: Must be &amp;quot;server&amp;quot; right now.&lt;br /&gt;
*&amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;: A signature written in binary; for example, &amp;quot;\x56&amp;quot; instead of &amp;quot;0x56&amp;quot; -- the '*' character is a single byte wildcard.&lt;br /&gt;
*&amp;lt;tt&amp;gt;linux&amp;lt;/tt&amp;gt;: Either a signature as with &amp;lt;tt&amp;gt;windows&amp;lt;/tt&amp;gt;, or a named symbol.  To use a named symbol, start the string with the '@' character.  If a signature begins with '@', write the character in hexadecimal as above.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;RoundRespawn&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;\x56\x8B\xF1\x8B\x06\xFF\x90*\x04\x00\x00\x8B\x86*\x0D\x00&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@_ZN9CCSPlayer12RoundRespawnEv&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Raw address lookups==&lt;br /&gt;
Lets you peek and poke (limitation may apply) the Source Dedicated Server memory space, and get a raw address value in an automated way.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;left4dead2&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Addresses&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;CDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
					&amp;quot;read&amp;quot; &amp;quot;8&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;linux&amp;quot;&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;signature&amp;quot; &amp;quot;TheDirector&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
				&amp;quot;read&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		&amp;quot;Signatures&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			/* Used solely to get the offset for TheDirector */&lt;br /&gt;
			&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;windows&amp;quot;       &amp;quot;\x83\xEC\x14\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x53\x55\x6A\x24\xE8&amp;quot;&lt;br /&gt;
				/* 83 EC 14 57 8B F9 8B 0D ? ? ? ? E8 ? ? ? ? 84 C0 0F ? ? ? ? ? 53 55 6A 24 E8 */&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			/* Find the Director/ZombieManager singleton classes */&lt;br /&gt;
			&lt;br /&gt;
			&amp;quot;TheDirector&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;library&amp;quot;	&amp;quot;server&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;@TheDirector&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in an Address entry is parse from top to bottom as commands. This example would accomplish the same thing as the following pseudo-C++ code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BYTE * GetCDirectorAddress()&lt;br /&gt;
{&lt;br /&gt;
    BYTE * pAddr;&lt;br /&gt;
&lt;br /&gt;
#if WINDOWS&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;DirectorMusicBanks_OnRoundStart&amp;quot;);&lt;br /&gt;
    pAddr = *(pAddr + 8);&lt;br /&gt;
&lt;br /&gt;
#elif LINUX&lt;br /&gt;
&lt;br /&gt;
    pAddr = FindSignature(&amp;quot;TheDirector&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
    pAddr = *(pAddr + 0);&lt;br /&gt;
&lt;br /&gt;
    return pAddr;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To invoke this address lookup in your Sourcepawn code, you would simply set up your GameConf handle and run something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stock Address:GetTheDirector()&lt;br /&gt;
{&lt;br /&gt;
   return GameConfGetAddress(g_hMyGameConf, &amp;quot;CDirector&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more code examples, [https://github.com/confoglteam/l4d2_direct l4d2_direct] relies heavily on Address: functions.&lt;br /&gt;
&lt;br /&gt;
==Custom Key Values==&lt;br /&gt;
To read arbitary key value pairs from a gamedata file, add them to the &amp;quot;Keys&amp;quot; section of your game config file.&lt;br /&gt;
You can have different values per platform or have a key only be available on selected platforms.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;cstrike&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;Keys&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;INTERFACEVERSION_GAMEEVENTSMANAGER2&amp;quot;	&amp;quot;GAMEEVENTSMANAGER002&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			// Different values per platform (since SourceMod 1.10+)&lt;br /&gt;
			&amp;quot;MyGreatKey&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;windows&amp;quot;	&amp;quot;this is wundows speaking&amp;quot;&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;linux best linux&amp;quot;&lt;br /&gt;
				&amp;quot;mac&amp;quot;		&amp;quot;wat&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			&amp;quot;JustForLinux&amp;quot;&lt;br /&gt;
			{&lt;br /&gt;
				&amp;quot;linux&amp;quot;		&amp;quot;not relevant for other platforms!&amp;quot;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the keys using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char buffer[512];&lt;br /&gt;
GameConfGetKeyValue(g_hMyGameConf, &amp;quot;MyGreatKey&amp;quot;, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inheritance==&lt;br /&gt;
If you wish for multiple mods to inherit from one block, you can add a special &amp;quot;#supported&amp;quot; section under a &amp;quot;#default&amp;quot; section.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Games&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;#default&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;#supported&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;game&amp;quot;		&amp;quot;dod&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies that the given block will be read for Day of Defeat as well.&lt;br /&gt;
&lt;br /&gt;
=Calling Functions=&lt;br /&gt;
Calling functions is complicated and requires strict attention to the C++ API you are trying to use.  If you make a mistake, something bad '''will''' happen (and if not, you got lucky!)  SDKTools is more complicated than PimpinJuice's &amp;quot;Hacks&amp;quot; extension because it precompiles all of the information needed to convert from Plugin memory to C++ types.  This precompilation step ensures better safety and speed, but it lengthens the preparation process.&lt;br /&gt;
&lt;br /&gt;
With that said, let's look at an overview of the call creation process.  Before making calls, we must ''prepare'' the call.  This will give us a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt; which will let us make as many calls as we like.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Init&amp;lt;/b&amp;gt; - The preparation must be initialized.  Here we can specify the calling convention, which is either static, or BaseEntity/BasePlayer-based.  BasePlayer should be used when only player entities should be allowed as the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Destination&amp;lt;/b&amp;gt; - The call must have a destination address or virtual index to use.  This is normally done via &amp;lt;tt&amp;gt;PrepSDKCall_SetFromConf&amp;lt;/tt&amp;gt; which ties into gameconf files.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Return Info&amp;lt;/b&amp;gt; - If the call has return information, it must be set via &amp;lt;tt&amp;gt;PrepSDKCall_SetReturnInfo&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt; - Each parameter (if any) must be added with &amp;lt;tt&amp;gt;PrepSDKCall_AddParameter&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Finalize&amp;lt;/b&amp;gt; - The call must be finalized with &amp;lt;tt&amp;gt;EndPrepSDKCall&amp;lt;/tt&amp;gt;, which will return a &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;.  If it doesn't, one or more of the preparation operations failed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the examples below, consider a plugin called &amp;quot;sdkexamples.sp&amp;quot; which has a gamedata file of &amp;quot;plugin.sdkexamples.txt&amp;quot; containing the definitions in the first section.&lt;br /&gt;
&lt;br /&gt;
==RoundRespawn Example==&lt;br /&gt;
CCSPlayer::RoundRespawn is a Counter-Strike Source function which respawns players.  It used by CS:S DM.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;void CCSPlayer::RoundRespawn()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SDKCall example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hRoundRespawn;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, &amp;quot;RoundRespawn&amp;quot;);&lt;br /&gt;
	hRoundRespawn = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void RespawnPlayer(int client)&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hRoundRespawn, client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we did not have to set any extra information for parameters or return info, since CCSPlayer::RoundRespawn has no parameters and has a void return.&lt;br /&gt;
&lt;br /&gt;
==GiveNamedItem Example==&lt;br /&gt;
GiveNamedItem will give a player a named item.  Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual CBaseEntity *CBasePlayer::GiveNamedItem(const char *item, int iSubType = 0);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGiveNamedItem;&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;GiveNamedItem&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);&lt;br /&gt;
	PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);&lt;br /&gt;
	hGiveNamedItem = EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GiveItem(int client, const char[] item)&lt;br /&gt;
{&lt;br /&gt;
	return SDKCall(hGiveNamedItem, client, item, 0);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetEyePosition Example==&lt;br /&gt;
Prototype:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtual Vector CBaseEntity::EyePosition();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Handle hGameConf;&lt;br /&gt;
Handle hGetEyePosition;&lt;br /&gt;
&lt;br /&gt;
public void OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	hGameConf = LoadGameConfigFile(&amp;quot;plugin.sdkexamples&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	StartPrepSDKCall(SDKCall_Player);&lt;br /&gt;
	PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, &amp;quot;EyePosition&amp;quot;);&lt;br /&gt;
	PrepSDKCall_SetReturnInfo(SDKType_Vector, SDKPass_ByValue);&lt;br /&gt;
	hGetEyePosition= EndPrepSDKCall();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
any GetEyePosition(int client, float pos[3])&lt;br /&gt;
{&lt;br /&gt;
	SDKCall(hGetEyePosition, client, pos);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the vector is returned as the third parameter (first parameter after the &amp;lt;tt&amp;gt;this&amp;lt;/tt&amp;gt; pointer).&lt;br /&gt;
&lt;br /&gt;
=TempEnt Functions=&lt;br /&gt;
TempEnts, also called &amp;quot;temporary entities,&amp;quot; &amp;quot;tempentities,&amp;quot; or &amp;quot;TEs,&amp;quot; are quick graphical displays that are too simple to justify the overhead of a &amp;lt;tt&amp;gt;CBaseEntity&amp;lt;/tt&amp;gt; instantiation or full server-side networkability.  In the SDK, they are statically defined instances that can be &amp;quot;played back&amp;quot; to the client by simply sending a copy of its network class properties.&lt;br /&gt;
&lt;br /&gt;
Temporary Entities are mod-dependent, in that a mod can change any of their properties or even the &amp;lt;tt&amp;gt;ITempEnts&amp;lt;/tt&amp;gt; class definition.  Because of this, SourceMod takes a very flexible approach:&lt;br /&gt;
*&amp;lt;b&amp;gt;First&amp;lt;/b&amp;gt;, a temp entity is ''started'' by name using &amp;lt;tt&amp;gt;TE_Start&amp;lt;/tt&amp;gt;.  A list of all tempent names and their network classes can be dumped with &amp;lt;tt&amp;gt;sm_print_telist&amp;lt;/tt&amp;gt; (SDKTools must be loaded).&lt;br /&gt;
*&amp;lt;b&amp;gt;Second&amp;lt;/b&amp;gt;, all of the tempent's properties are set via the &amp;lt;tt&amp;gt;TE_Write&amp;lt;/tt&amp;gt; natives.  All tempent properties can be dumped to a file using &amp;lt;tt&amp;gt;sm_dump_teprops&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Third&amp;lt;/b&amp;gt;, the properties are transmitted using &amp;lt;tt&amp;gt;TE_Send&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;TE_SendToAll&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;TE_SendToClient&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a convenience, SourceMod provides a number of pre-written stocks for SDK-defined temporary entities.  While the &amp;lt;tt&amp;gt;TE_*&amp;lt;/tt&amp;gt; natives are guaranteed to work on any fully-supported SourceMod mod, the &amp;lt;tt&amp;gt;TE_Setup*&amp;lt;/tt&amp;gt; stocks are not, as a mod might change the property layouts or the functionalities of the SDK-defined tempents.&lt;br /&gt;
&lt;br /&gt;
Some examples are below.  For pictures, see [[TempEnts (SourceMod SDKTools)]].&lt;br /&gt;
&lt;br /&gt;
Using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_SetupMetalSparks(pos, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not using stocks:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void SparkClient(int client, const float pos[3], const float dir[3])&lt;br /&gt;
{&lt;br /&gt;
	TE_Start(&amp;quot;Metal Sparks&amp;quot;);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecPos&amp;quot;, pos);&lt;br /&gt;
	TE_WriteVector(&amp;quot;m_vecDir&amp;quot;, dir);&lt;br /&gt;
	TE_SendToClient(client);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sound Functions=&lt;br /&gt;
SDKTools exposes various sound-related members of IVEngineServer and IEngineSound.  The basic functions are in &amp;lt;tt&amp;gt;sdktools_sound.inc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitAmbientSound&amp;lt;/tt&amp;gt;: Plays an ambient sound from an origin.&lt;br /&gt;
*&amp;lt;tt&amp;gt;EmitSound, EmitSoundToClient, EmitSoundToAll&amp;lt;/tt&amp;gt;: Plays a sound to a list of clients from a specific entity.&lt;br /&gt;
&lt;br /&gt;
There are a few important properties about sounds:&lt;br /&gt;
*&amp;lt;b&amp;gt;Entity&amp;lt;/b&amp;gt;: The entity the sound should come from.  When playing a generic sound file to player(s), you should use &amp;lt;tt&amp;gt;SOUND_FROM_PLAYER&amp;lt;/tt&amp;gt;, which is a special SourceMod macro for making the sound come from the player target.  For ambient sounds you'd use &amp;lt;tt&amp;gt;SOUND_FROM_WORLD&amp;lt;/tt&amp;gt;, and for sounds from an entity you'd use the entity index.&lt;br /&gt;
*&amp;lt;b&amp;gt;Channel&amp;lt;/b&amp;gt;: Exposed as &amp;lt;tt&amp;gt;SNDCHAN_*&amp;lt;/tt&amp;gt;, normally you only need to use &amp;lt;tt&amp;gt;SNDCHAN_AUTO&amp;lt;/tt&amp;gt;.  The channel affects how the sound is spatialized[?]&lt;br /&gt;
*&amp;lt;b&amp;gt;Level&amp;lt;/b&amp;gt;: The decibel level.  There are a number of predefined levels as &amp;lt;tt&amp;gt;SNDLEVEL_*&amp;lt;/tt&amp;gt; -- the standard one is &amp;lt;tt&amp;gt;SNDLEVEL_NORMAL&amp;lt;/tt&amp;gt;.  Half-Life 1 used attenuation values instead; you can convert from these using &amp;lt;tt&amp;gt;ATTN_TO_SNDLEVEL()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Volume&amp;lt;/b&amp;gt;: The volume, on a scale of 0.0 to 1.0.  To use a volume other than the default, the &amp;lt;tt&amp;gt;SND_CHANGEVOL&amp;lt;/tt&amp;gt; flag should be included in the &amp;quot;flags&amp;quot; parameter.  The default volume is &amp;lt;tt&amp;gt;SNDVOL_NORMAL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;b&amp;gt;Pitch&amp;lt;/b&amp;gt;: The pitch; predefined values are &amp;lt;tt&amp;gt;SNDPITCH_*&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;SNDPITCH_NORMAL&amp;lt;/tt&amp;gt; being the default.  &amp;lt;tt&amp;gt;SND_CHANGEPITCH&amp;lt;/tt&amp;gt; should be passed to use a non-default pitch.&lt;br /&gt;
*&amp;lt;b&amp;gt;Origin&amp;lt;/b&amp;gt;: If specified, an origin to play the sound from.&lt;br /&gt;
&lt;br /&gt;
Some very simple examples:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
EmitSoundToClient(client, &amp;quot;bot/affirmative.wav&amp;quot;);&lt;br /&gt;
EmitSoundToAll(&amp;quot;radio/terwin.wav&amp;quot;);&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Supported Mods=&lt;br /&gt;
SDKTools must have specific support added for each mod.  So far, default support exists for the following modifications:&lt;br /&gt;
*Counter-Strike: Source&lt;br /&gt;
*Day of Defeat: Source&lt;br /&gt;
*Dystopia&lt;br /&gt;
*Half-Life 2: Deathmatch&lt;br /&gt;
*Insurgency (only some of the CBasePlayer SDK functions are available)&lt;br /&gt;
*Pirates, Vikings, and Knights II&lt;br /&gt;
*The Ship&lt;br /&gt;
*SourceForts&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Vfunc_offsets_%28SourceMM%29|Virtual Functions]]&lt;br /&gt;
*[[TempEnts (SourceMod SDKTools)|TempEnts]]&lt;br /&gt;
*[[Useful_Signatures_%28Source%29|Useful Signatures]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=9709</id>
		<title>Nuclear Dawn Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=9709"/>
		<updated>2014-10-04T18:24:37Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Refer back to [[Game Events (Source)]] for more events.''&lt;br /&gt;
&lt;br /&gt;
=== player_death ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_death|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who died}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name killed used}}&lt;br /&gt;
{{hl2msg|short|weaponid|weapon id}}&lt;br /&gt;
{{hl2msg|long|damagebits|bits}}&lt;br /&gt;
{{hl2msg|long|customkill|custom bits}}&lt;br /&gt;
{{hl2msg|short|priority|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_hurt ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_hurt|string}}&lt;br /&gt;
{{hl2msg|1|local|Not networked}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who was hurt}}&lt;br /&gt;
{{hl2msg|short|attacker|user id who attacked}}&lt;br /&gt;
{{hl2msg|short|health|remaining health points}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name attacker used, if not the world}}&lt;br /&gt;
{{hl2msg|short|dmg_health|damage done to health}}&lt;br /&gt;
{{hl2msg|byte|hitgroup|hitgroup that was damaged}}&lt;br /&gt;
{{hl2msg|long|type|damage type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_changeclass ===&lt;br /&gt;
{{qnotice|Called when a player changes class}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_changeclass|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|class|}}&lt;br /&gt;
{{hl2msg|short|subclass|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spec_target_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spec_target_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== achievement_earned ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|achievement_earned|string}}&lt;br /&gt;
{{hl2msg|short|player|}}&lt;br /&gt;
{{hl2msg|short|achievement|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_spawned_at_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_spawned_at_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_death ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_death|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|team|the team the structure belonged to}}&lt;br /&gt;
{{hl2msg|short|entindex|The entidx of the structure}}&lt;br /&gt;
{{hl2msg|short|attacker|userid of attacking player}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name the attacker used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_damage_sparse ===&lt;br /&gt;
{{qnotice|is only fired for every 100hp taken. no spamz here}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_damage_sparse|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of structure being damaged}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that owns the structure - Todo: optimize this out!}}&lt;br /&gt;
{{hl2msg|bool|bunker|was it the bunker?}}&lt;br /&gt;
{{hl2msg|local|userid|user id that damaged the structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_sold ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_sold|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|ownerteam|the team the structure belonged to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_auto_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp using auto repair}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_auto_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_man_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp by supports}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_man_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{hl2msg|local|userid|user id that repaired the sturcture}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_built ===&lt;br /&gt;
{{qnotice|structure fully built. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_built|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_power_outage ===&lt;br /&gt;
{{qnotice|structure out of power. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_power_outage|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_start_capture ===&lt;br /&gt;
{{qnotice|Used to show the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_start_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point getting capped}}&lt;br /&gt;
{{hl2msg|short|type|type of resource point}}&lt;br /&gt;
{{hl2msg|short|capteam|team that is capping}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that currently owns the point (check for unassigned)}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_end_capture ===&lt;br /&gt;
{{qnotice|Used to hide the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_end_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that got captured}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_break_capture ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_break_capture|string}}&lt;br /&gt;
{{hl2msg|short|entindex|}}&lt;br /&gt;
{{hl2msg|float|time_remaining|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_extract ===&lt;br /&gt;
{{qnotice|Resource point has extracted some resources}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_extract|string}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that extracted the resources}}&lt;br /&gt;
{{hl2msg|short|amount|resource point that extracted the resources}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_captured ===&lt;br /&gt;
{{qnotice|When a resource point gets fully captured by a team}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_captured|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of the captrd point}}&lt;br /&gt;
{{hl2msg|short|type|the resource point type that got captured}}&lt;br /&gt;
{{hl2msg|short|team|team that captured the point}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_requested ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_requested|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_removed ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_removed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_updated ===&lt;br /&gt;
{{qnotice|When the power nexus gets updated}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_pregame ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_pregame|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== exit_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|exit_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_freezepanel|string}}&lt;br /&gt;
{{hl2msg|short|killer|entindex of the killer entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_freezepanel|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== freezecam_started ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|freezecam_started|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spawn_map_changed ===&lt;br /&gt;
{{qnotice|Called when a tgate is built, removed, or power state changes}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spawn_map_changed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== overviewmap_key_released ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|overviewmap_key_released|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== slot_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|slot_key_pressed|string}}&lt;br /&gt;
{{hl2msg|short|slot|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ironsight_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ironsight_key_pressed|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ability_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ability_key_pressed|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_reload ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_reload|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|bool|manual|player manually started the reload}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_fire_at_40 ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_fire_at_40|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|weapon|used weapon name}}&lt;br /&gt;
{{hl2msg|short|weaponid|used weapon ID}}&lt;br /&gt;
{{hl2msg|short|count|number of bullets}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== entity_visible ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|entity_visible|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who sees the entity}}&lt;br /&gt;
{{hl2msg|long|subject|Entindex of the entity they see}}&lt;br /&gt;
{{hl2msg|string|classname|Classname of the entity they see}}&lt;br /&gt;
{{hl2msg|string|entityname|name of the entity they see}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who left the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they left}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who entered the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they entered}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who entered commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_enter_commander_mode_failed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_enter_commander_mode_failed|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who tried to enter commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who left commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_restocked_from_supply_struct ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_restocked_from_supply_struct|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who was restocked}}&lt;br /&gt;
{{hl2msg|short|entidx|Entity they got supply from}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_opened_armoury_menu ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_opened_armoury_menu|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player opened kit menu from armoury}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_2d ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_2d|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_z ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_z|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera up/down}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_minimap_move ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_minimap_move|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_exited_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_exited_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player that left the gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_left_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_left_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that left valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_entered_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_entered_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that entered valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== round_win ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|round_win|string}}&lt;br /&gt;
{{hl2msg|short|team|The winning team}}&lt;br /&gt;
{{hl2msg|short|type|Type of win}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== transport_gate_created ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|transport_gate_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team that created the gate}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the new gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== last_tgate_destroyed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|last_tgate_destroyed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team who's last tgate got pwnd}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_stats_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_stats_updated|string}}&lt;br /&gt;
{{hl2msg|bool|forceupload|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== failed_to_build ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|failed_to_build|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|the commander that tried to build something with no power}}&lt;br /&gt;
{{hl2msg|short|reason|(eBuildErrorReason) 0: Ok, 1: No Power, 2: No Line of sight, 3: obstruction, 4: invalid build area}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_hint_closed ===&lt;br /&gt;
{{qnotice|The local commander closed a hint (used to re-evaluate tiered hints)}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_hint_closed|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_selected_structure ===&lt;br /&gt;
{{qnotice|The local commander selected a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_selected_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the selected structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_start ===&lt;br /&gt;
{{qnotice|Causes the assembler to flash}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_stop ===&lt;br /&gt;
{{qnotice|Causes the assembler to stop flashing}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_build_mode ===&lt;br /&gt;
{{qnotice|Local commander is in structure placement mode}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_build_mode|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_start ===&lt;br /&gt;
{{qnotice|Start flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_stop ===&lt;br /&gt;
{{qnotice|Stop flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_structure_build ===&lt;br /&gt;
{{qnotice|Start a structure building}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_structure_build|string}}&lt;br /&gt;
{{hl2msg|short|team|The team that is building the structure}}&lt;br /&gt;
{{hl2msg|short|type|The structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== promoted_to_commander ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|promoted_to_commander|string}}&lt;br /&gt;
{{hl2msg|short|userid|The user that got promoted to commander}}&lt;br /&gt;
{{hl2msg|short|teamid|The team of the promoted commander}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10m ===&lt;br /&gt;
{{qnotice|10 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5m ===&lt;br /&gt;
{{qnotice|5 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_1m ===&lt;br /&gt;
{{qnotice|1 minute left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_1m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_30s ===&lt;br /&gt;
{{qnotice|30 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_30s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10s ===&lt;br /&gt;
{{qnotice|10 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5s ===&lt;br /&gt;
{{qnotice|5 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_hospital_duty_progress ===&lt;br /&gt;
{{qnotice|progress towards hospital duty achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_hospital_duty_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_high_maintenance_progress ===&lt;br /&gt;
{{qnotice|progress towards high maintenance achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_high_maintenance_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== forward_spawn_created ===&lt;br /&gt;
{{qnotice|Fired once a forward spawn has been created. A forward spawn is defined by any created spawn point that causes the spawn cluster centroid to be split}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|forward_spawn_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== research_complete ===&lt;br /&gt;
{{qnotice|Fired when a research has finished researching}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|research_complete|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{hl2msg|short|researchid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_annotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_annotation|string}}&lt;br /&gt;
{{hl2msg|float|worldPosX|}}&lt;br /&gt;
{{hl2msg|float|worldPosY|}}&lt;br /&gt;
{{hl2msg|float|worldPosZ|}}&lt;br /&gt;
{{hl2msg|float|worldNormalX|}}&lt;br /&gt;
{{hl2msg|float|worldNormalY|}}&lt;br /&gt;
{{hl2msg|float|worldNormalZ|}}&lt;br /&gt;
{{hl2msg|long|id|}}&lt;br /&gt;
{{hl2msg|string|text|name (unlocalized)}}&lt;br /&gt;
{{hl2msg|float|lifetime|}}&lt;br /&gt;
{{hl2msg|long|visibilityBitfield|bitfield of the players that can see this}}&lt;br /&gt;
{{hl2msg|long|follow_entindex|if this is set, follow this entity}}&lt;br /&gt;
{{hl2msg|bool|show_distance|}}&lt;br /&gt;
{{hl2msg|string|play_sound|}}&lt;br /&gt;
{{hl2msg|bool|show_effect|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_annotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_annotation|string}}&lt;br /&gt;
{{hl2msg|long|id|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== end_training_session ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|end_training_session|string}}&lt;br /&gt;
{{hl2msg|string|course|}}&lt;br /&gt;
{{hl2msg|bool|successful|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== nav_generate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|nav_generate|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== medkit_heal ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|medkit_heal|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|local|entindex|entity index of medkit}}&lt;br /&gt;
{{hl2msg|local|ownerid|user id of medkit owner}}&lt;br /&gt;
{{hl2msg|local|userid|user id of player healed}}&lt;br /&gt;
{{hl2msg|local|amount|amount of health restored}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== emp_structure ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|emp_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|local|entindex|entity index of structure}}&lt;br /&gt;
{{hl2msg|local|userid|user id of player}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== setup_compass_rotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|setup_compass_rotation|string}}&lt;br /&gt;
{{hl2msg|long|rotation|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== tgate_use ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|tgate_use|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== attacked_radarkit ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|attacked_radarkit|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=9708</id>
		<title>Nuclear Dawn Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=9708"/>
		<updated>2014-10-04T18:23:48Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Refer back to [[Game Events (Source)]] for more events.''&lt;br /&gt;
&lt;br /&gt;
=== player_death ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_death|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who died}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name killed used}}&lt;br /&gt;
{{hl2msg|short|weaponid|weapon id}}&lt;br /&gt;
{{hl2msg|long|damagebits|bits}}&lt;br /&gt;
{{hl2msg|long|customkill|custom bits}}&lt;br /&gt;
{{hl2msg|short|priority|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_hurt ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_hurt|string}}&lt;br /&gt;
{{hl2msg|1|local|Not networked}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who was hurt}}&lt;br /&gt;
{{hl2msg|short|attacker|user id who attacked}}&lt;br /&gt;
{{hl2msg|short|health|remaining health points}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name attacker used, if not the world}}&lt;br /&gt;
{{hl2msg|short|dmg_health|damage done to health}}&lt;br /&gt;
{{hl2msg|byte|hitgroup|hitgroup that was damaged}}&lt;br /&gt;
{{hl2msg|long|type|damage type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_changeclass ===&lt;br /&gt;
{{qnotice|Called when a player changes class}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_changeclass|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|class|}}&lt;br /&gt;
{{hl2msg|short|subclass|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spec_target_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spec_target_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== achievement_earned ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|achievement_earned|string}}&lt;br /&gt;
{{hl2msg|short|player|}}&lt;br /&gt;
{{hl2msg|short|achievement|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_spawned_at_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_spawned_at_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_death ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_death|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|team|the team the structure belonged to}}&lt;br /&gt;
{{hl2msg|short|entindex|The entidx of the structure}}&lt;br /&gt;
{{hl2msg|short|attacker|userid of attacking player}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name the attacker used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_damage_sparse ===&lt;br /&gt;
{{qnotice|is only fired for every 100hp taken. no spamz here}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_damage_sparse|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of structure being damaged}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that owns the structure - Todo: optimize this out!}}&lt;br /&gt;
{{hl2msg|bool|bunker|was it the bunker?}}&lt;br /&gt;
{{hl2msg|local|userid|user id that damaged the structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_sold ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_sold|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|ownerteam|the team the structure belonged to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_auto_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp using auto repair}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_auto_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_man_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp by supports}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_man_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{hl2msg|local|userid|user id that repaired the sturcture}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_built ===&lt;br /&gt;
{{qnotice|structure fully built. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_built|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_power_outage ===&lt;br /&gt;
{{qnotice|structure out of power. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_power_outage|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_start_capture ===&lt;br /&gt;
{{qnotice|Used to show the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_start_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point getting capped}}&lt;br /&gt;
{{hl2msg|short|type|type of resource point}}&lt;br /&gt;
{{hl2msg|short|capteam|team that is capping}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that currently owns the point (check for unassigned)}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_end_capture ===&lt;br /&gt;
{{qnotice|Used to hide the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_end_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that got captured}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_break_capture ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_break_capture|string}}&lt;br /&gt;
{{hl2msg|short|entindex|}}&lt;br /&gt;
{{hl2msg|float|time_remaining|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_extract ===&lt;br /&gt;
{{qnotice|Resource point has extracted some resources}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_extract|string}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that extracted the resources}}&lt;br /&gt;
{{hl2msg|short|amount|resource point that extracted the resources}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_captured ===&lt;br /&gt;
{{qnotice|When a resource point gets fully captured by a team}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_captured|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of the captrd point}}&lt;br /&gt;
{{hl2msg|short|type|the resource point type that got captured}}&lt;br /&gt;
{{hl2msg|short|team|team that captured the point}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_requested ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_requested|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_removed ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_removed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_updated ===&lt;br /&gt;
{{qnotice|When the power nexus gets updated}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_pregame ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_pregame|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== exit_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|exit_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_freezepanel|string}}&lt;br /&gt;
{{hl2msg|short|killer|entindex of the killer entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_freezepanel|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== freezecam_started ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|freezecam_started|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spawn_map_changed ===&lt;br /&gt;
{{qnotice|Called when a tgate is built, removed, or power state changes}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spawn_map_changed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== overviewmap_key_released ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|overviewmap_key_released|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== slot_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|slot_key_pressed|string}}&lt;br /&gt;
{{hl2msg|short|slot|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ironsight_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ironsight_key_pressed|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ability_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ability_key_pressed|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_reload ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_reload|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|bool|manual|player manually started the reload}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_fire_at_40 ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_fire_at_40|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|weapon|used weapon name}}&lt;br /&gt;
{{hl2msg|short|weaponid|used weapon ID}}&lt;br /&gt;
{{hl2msg|short|count|number of bullets}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== entity_visible ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|entity_visible|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who sees the entity}}&lt;br /&gt;
{{hl2msg|long|subject|Entindex of the entity they see}}&lt;br /&gt;
{{hl2msg|string|classname|Classname of the entity they see}}&lt;br /&gt;
{{hl2msg|string|entityname|name of the entity they see}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who left the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they left}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who entered the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they entered}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who entered commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_enter_commander_mode_failed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_enter_commander_mode_failed|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who tried to enter commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who left commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_restocked_from_supply_struct ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_restocked_from_supply_struct|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who was restocked}}&lt;br /&gt;
{{hl2msg|short|entidx|Entity they got supply from}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_opened_armoury_menu ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_opened_armoury_menu|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player opened kit menu from armoury}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_2d ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_2d|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_z ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_z|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera up/down}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_minimap_move ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_minimap_move|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_exited_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_exited_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player that left the gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_left_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_left_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that left valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_entered_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_entered_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that entered valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== round_win ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|round_win|string}}&lt;br /&gt;
{{hl2msg|short|team|The winning team}}&lt;br /&gt;
{{hl2msg|short|type|Type of win}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== transport_gate_created ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|transport_gate_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team that created the gate}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the new gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== last_tgate_destroyed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|last_tgate_destroyed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team who's last tgate got pwnd}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_stats_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_stats_updated|string}}&lt;br /&gt;
{{hl2msg|bool|forceupload|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== failed_to_build ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|failed_to_build|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|the commander that tried to build something with no power}}&lt;br /&gt;
{{hl2msg|short|reason|(eBuildErrorReason) 0: Ok, 1: No Power, 2: No Line of sight, 3: obstruction, 4: invalid build area}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_hint_closed ===&lt;br /&gt;
{{qnotice|The local commander closed a hint (used to re-evaluate tiered hints)}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_hint_closed|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_selected_structure ===&lt;br /&gt;
{{qnotice|The local commander selected a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_selected_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the selected structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_start ===&lt;br /&gt;
{{qnotice|Causes the assembler to flash}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_stop ===&lt;br /&gt;
{{qnotice|Causes the assembler to stop flashing}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_build_mode ===&lt;br /&gt;
{{qnotice|Local commander is in structure placement mode}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_build_mode|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_start ===&lt;br /&gt;
{{qnotice|Start flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_stop ===&lt;br /&gt;
{{qnotice|Stop flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_structure_build ===&lt;br /&gt;
{{qnotice|Start a structure building}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_structure_build|string}}&lt;br /&gt;
{{hl2msg|short|team|The team that is building the structure}}&lt;br /&gt;
{{hl2msg|short|type|The structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== promoted_to_commander ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|promoted_to_commander|string}}&lt;br /&gt;
{{hl2msg|short|userid|The user that got promoted to commander}}&lt;br /&gt;
{{hl2msg|short|teamid|The team of the promoted commander}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10m ===&lt;br /&gt;
{{qnotice|10 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5m ===&lt;br /&gt;
{{qnotice|5 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_1m ===&lt;br /&gt;
{{qnotice|1 minute left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_1m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_30s ===&lt;br /&gt;
{{qnotice|30 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_30s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10s ===&lt;br /&gt;
{{qnotice|10 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5s ===&lt;br /&gt;
{{qnotice|5 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_hospital_duty_progress ===&lt;br /&gt;
{{qnotice|progress towards hospital duty achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_hospital_duty_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_high_maintenance_progress ===&lt;br /&gt;
{{qnotice|progress towards high maintenance achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_high_maintenance_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== forward_spawn_created ===&lt;br /&gt;
{{qnotice|Fired once a forward spawn has been created. A forward spawn is defined by any created spawn point that causes the spawn cluster centroid to be split}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|forward_spawn_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== research_complete ===&lt;br /&gt;
{{qnotice|Fired when a research has finished researching}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|research_complete|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{hl2msg|short|researchid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_annotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_annotation|string}}&lt;br /&gt;
{{hl2msg|float|worldPosX|}}&lt;br /&gt;
{{hl2msg|float|worldPosY|}}&lt;br /&gt;
{{hl2msg|float|worldPosZ|}}&lt;br /&gt;
{{hl2msg|float|worldNormalX|}}&lt;br /&gt;
{{hl2msg|float|worldNormalY|}}&lt;br /&gt;
{{hl2msg|float|worldNormalZ|}}&lt;br /&gt;
{{hl2msg|long|id|}}&lt;br /&gt;
{{hl2msg|string|text|name (unlocalized)}}&lt;br /&gt;
{{hl2msg|float|lifetime|}}&lt;br /&gt;
{{hl2msg|long|visibilityBitfield|bitfield of the players that can see this}}&lt;br /&gt;
{{hl2msg|long|follow_entindex|if this is set, follow this entity}}&lt;br /&gt;
{{hl2msg|bool|show_distance|}}&lt;br /&gt;
{{hl2msg|string|play_sound|}}&lt;br /&gt;
{{hl2msg|bool|show_effect|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_annotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_annotation|string}}&lt;br /&gt;
{{hl2msg|long|id|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== end_training_session ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|end_training_session|string}}&lt;br /&gt;
{{hl2msg|string|course|}}&lt;br /&gt;
{{hl2msg|bool|successful|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== nav_generate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|nav_generate|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== medkit_heal ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|medkit_heal|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|local|entindex|entity index of medkit}}&lt;br /&gt;
{{hl2msg|local|ownerid|user id of medkit owner}}&lt;br /&gt;
{{hl2msg|local|userid|user id of player healed}}&lt;br /&gt;
{{hl2msg|local|amount|amount of health restored}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== emp_structure ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|emp_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|local|entindex|entity index of structure}}&lt;br /&gt;
{{hl2msg|local|userid|user id of player}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== setup_compass_rotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|setup_compass_rotation|string}}&lt;br /&gt;
{{hl2msg|rotation|long|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== tgate_use ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|tgate_use|string}}&lt;br /&gt;
{{hl2msg|userid|short|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== attacked_radarkit ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|attacked_radarkit|string}}&lt;br /&gt;
{{hl2msg|userid|short|}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=SourceMod_1.6.0_Release_Notes&amp;diff=9652</id>
		<title>SourceMod 1.6.0 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=SourceMod_1.6.0_Release_Notes&amp;diff=9652"/>
		<updated>2014-06-28T11:00:34Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This page is a work-in-progress as SourceMod 1.6.0 is not yet released.''&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
SourceMod 1.6.0 is a major update with numerous under the hood improvements as well as some user-facing additions.&lt;br /&gt;
&lt;br /&gt;
=Overview for Admins=&lt;br /&gt;
&lt;br /&gt;
*'''New Game Support''' - SourceMod, including base plugins, now supports &amp;lt;span style=&amp;quot;text-decoration:underline&amp;quot;&amp;gt;Dota 2&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;text-decoration:underline&amp;quot;&amp;gt;Source SDK 2013&amp;lt;/span&amp;gt; mods, &amp;lt;span style=&amp;quot;text-decoration:underline&amp;quot;&amp;gt;Insurgency&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;text-decoration:underline&amp;quot;&amp;gt;Contagion&amp;lt;/span&amp;gt;, and &amp;lt;span style=&amp;quot;text-decoration:underline&amp;quot;&amp;gt;Blade Symphony&amp;lt;/span&amp;gt;.&lt;br /&gt;
*Updated gamedata for many games and mods.&lt;br /&gt;
*Added support to create custom ban reasons for the basebans plugin (thanks Matthias &amp;quot;{{user|79939|Dr. Greg House}}&amp;quot; Kollek).&lt;br /&gt;
*Many stability fixes.&lt;br /&gt;
*Better performance.&lt;br /&gt;
&lt;br /&gt;
=Overview for Developers=&lt;br /&gt;
&lt;br /&gt;
*Added an API for off-thread SQL transactions.&lt;br /&gt;
*Added support for string literal concatenation (with new &amp;quot;...&amp;quot; operator) (thanks {{user|41418|Peace-Maker}}).&lt;br /&gt;
*Adjusted the OnClientSayCommand forwards to be more developer-friendly (thanks {{user|193987|SystematicMania}}).&lt;br /&gt;
&lt;br /&gt;
*Too much to name here. For overview of all sourcepawn and SM extension API changes and additions, please see [[SourceMod_1.6.0_API_Changes]]&lt;br /&gt;
&lt;br /&gt;
=Compatibility Issues=&lt;br /&gt;
&lt;br /&gt;
In most cases, SourceMod 1.6.0 is fully backward compatible with the 1.5.x releases. The following are the few places where this is not the case.&lt;br /&gt;
&lt;br /&gt;
'''Float comparisons'''&lt;br /&gt;
&lt;br /&gt;
Plugins compiled against SM 1.6.0 that use float comparisons will throw errors upon load on older SM versions. This is due to a reworking of how these are handled to provide support for NaN vaules. Plugins compiled on &amp;lt; 1.5.x and earlier will continue to load fine on 1.6.0.&lt;br /&gt;
&lt;br /&gt;
'''OnClientSayCommand and OnClientSayCommand_Post'''&lt;br /&gt;
&lt;br /&gt;
Double-quotes are now stripped from the chat message, either quotes on both sides, or single double-quote on either side.&lt;br /&gt;
&lt;br /&gt;
This removes the need for any manual stripping, but may affect some logic already in place. Since these forwards were still fairly new and still receiving fixes for issues in the 1.5.0 and 1.5.1 releases, we wanted to get this change in before use was more widespread.&lt;br /&gt;
&lt;br /&gt;
For more information, see [[SourceMod_1.6.0_API_Changes#Console]]&lt;br /&gt;
&lt;br /&gt;
=Translations=&lt;br /&gt;
SourceMod 1.6 comes with the following languages translated, thanks to [http://www.sourcemod.net/translator/?go=translate&amp;amp;op=status community translators]:&lt;br /&gt;
*Brazilian Portuguese&lt;br /&gt;
*Chinese (Simplified)&lt;br /&gt;
*Czech&lt;br /&gt;
*Danish&lt;br /&gt;
*Dutch&lt;br /&gt;
*English&lt;br /&gt;
*French&lt;br /&gt;
*German&lt;br /&gt;
*Italian&lt;br /&gt;
*Japanese&lt;br /&gt;
*Korean&lt;br /&gt;
*Polish&lt;br /&gt;
*Russian&lt;br /&gt;
*Slovak&lt;br /&gt;
*Spanish&lt;br /&gt;
*Swedish&lt;br /&gt;
*Turkish&lt;br /&gt;
*Ukrainian&lt;br /&gt;
&lt;br /&gt;
=Changelog=&lt;br /&gt;
&lt;br /&gt;
===User Changes===&lt;br /&gt;
*Added support for Dota 2 ({{bz|5656}}, {{bz|6068}}).&lt;br /&gt;
*Added support for Source SDK 2013 mods ({{bz|5917}}).&lt;br /&gt;
*Added support for Insurgency ({{bz|5951}}).&lt;br /&gt;
*Added support for Contagion ({{bz|6007}}).&lt;br /&gt;
*Added support for Blade Symphony ({{bz|5949}}).&lt;br /&gt;
*Updated support for some mods that moved to SDK 2013*No More Room In Hell, Fistful of Frags, Empires, Synergy.&lt;br /&gt;
*Updated gamedata and other support for TF2, DoD:S, HL2:DM, CS:S, CS:GO, Left 4 Dead, and Nuclear Dawn.&lt;br /&gt;
*Added support for customizing ban reasons in basebans.sp ({{bz|5762}}) (Matthias &amp;quot;{{user|79939|House}}&amp;quot; Kollek).&lt;br /&gt;
*Added support for searching all gameinfo search paths when seeking mapcycle file ({{bz|5839}}).&lt;br /&gt;
*Added sm_reload_translations command ({{bz|5750}}).&lt;br /&gt;
*Added support for single-file gamedata custom overrides ({{bz|5386}}) (Ondrej &amp;quot;{{user|35591|Ravu al Hemio}}&amp;quot; Hošek).&lt;br /&gt;
*Re-enabled SteamAuthstringValidation config option by default ({{bz|5791}}, {{pr|20}}).&lt;br /&gt;
*Fixed plugins not reaching ext dep lists, making dependent plugin not unload on ext unload ({{bz|5851}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Added printing of SendProp flags to netprop dumps ({{bz|6082}}).&lt;br /&gt;
*Removed support for obsolete plugin_settings.cfg ({{bz|5605}}).&lt;br /&gt;
*Fixed error log filename date sometimes being incorrect ({{bz|5761}}) (Matheus &amp;quot;{{user|59126|M28}}&amp;quot; Valadares).&lt;br /&gt;
*Dump handle information when a plugin is forcefully unloaded. ({{bz|5666}}).&lt;br /&gt;
*Fixed sm_cancelvote not resetting rtv state. ({{bz|5808}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Fixed Mapchooser dying on single map rotation servers ({{bz|5179}}).&lt;br /&gt;
*Fixed various problems with unloading ClientPrefs and SourceMod ({{bz|5874}}).&lt;br /&gt;
*Fixed &amp;quot;sm version&amp;quot; command reporting incorrect compile time in many cases ({{bz|6078}}) ({{user|193987|SystematicMania}}).&lt;br /&gt;
*Clear default database driver reference if backing extension is unloaded ({{bz|5934}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Moved funcommands material and sound definitions to gamedata for easier cross-game support ({{bz|6085}}).&lt;br /&gt;
*Implement a watchdog timer for scripts that take too long to execute ({{bz|5837}}).&lt;br /&gt;
*Use Linux game data for offsets and signatures/symbols on OS X if Mac-specific data is not available ({{bz|6056}}).&lt;br /&gt;
&lt;br /&gt;
===Developer Changes===&lt;br /&gt;
*Added an API for off-thread SQL transactions. ({{bz|3775}}, {{pr|26}}).&lt;br /&gt;
*Added string literal concatenation using ellipses &amp;quot;...&amp;quot; ({{bz|4261}}, {{pr|5}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Added support for nested datatables. ({{bz|5446}}).&lt;br /&gt;
*Added PbRemoveRepeatedFieldValue native ({{bz|6066}}).&lt;br /&gt;
*Added support for getting/setting protobuf enum values with PbGetInt, PbSetInt, and PbAddInt natives.&lt;br /&gt;
*Removed deprecated PbReadRepeated natives that existed briefly in 1.5.0-dev prerelease versions.&lt;br /&gt;
*Added RequestFrame native for one-off next-frame actions ({{bz|5965}}).&lt;br /&gt;
*Added CS_DMG_HEADSHOT define for CS:S and CS:GO ({{pr|7}}) ({{user|178115|Bara20}}).&lt;br /&gt;
*Added CS_SLOT_KNIFE define for CS:S and CS:GO ({{bz|6131}}).&lt;br /&gt;
*Updated TF_WEAPON enum ({{pr|37}}) ({{user|84304|FlaminSarge}}).&lt;br /&gt;
*Added TFHoliday_AprilFools to TFHoliday enum ({{bz|6092}}) (Ross &amp;quot;{{user|38996|Powerlord}}&amp;quot; Bemrose).&lt;br /&gt;
*Added new TF2_IsHolidayActive native to TF2 Ext ({{bz|6095}}) (Ross &amp;quot;{{user|38996|Powerlord}}&amp;quot; Bemrose).&lt;br /&gt;
*Switch TF2 extension to hook CTFGameRules::IsHolidayActive for holiday forward ({{bz|6137}}, {{pr|42}}).&lt;br /&gt;
*Added GetPlayerJingleFile native. ({{bz|5690}}) ({{user|84304|FlaminSarge}}).&lt;br /&gt;
*Added PrepSDKCall_SetAddress and Address support to PrepSDKCall_SetFromConf ({{bz|5261}}).&lt;br /&gt;
*Added ability to disable TopMenu Title Caching ({{bz|6034}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Added DisplayTopMenuCategory native ({{bz|6033}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Added support for Valve search paths to GetFileSize native ({{bz|5931}}).&lt;br /&gt;
*Fixed invalid entities sometimes passed to OnEntityCreated and OnEntityDestroyed ({{bz|6119}}).&lt;br /&gt;
*Fixed inconsistencies with OnClientDisconnected foward calls ({{bz|5988}}, {{pr|16}}).&lt;br /&gt;
*Changed OnClientSayCommand to now pass non-silent chat triggers onward ({{bz|5926}}) ({{user|193987|SystematicMania}}).&lt;br /&gt;
*Changed OnClientSayCommand forwards to strip quotes from chat ({{bz|5986}}) ({{user|193987|SystematicMania}}).&lt;br /&gt;
*Fixed FindStringIndex native not returning INVALID_STRING_INDEX when string not found ({{bz|6144}}, {{pr|40}}).&lt;br /&gt;
*Fixed GroundEntChanged hooks not being called ({{bz|6050}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Fixed INetChannelInfo natives to no longer require clients to be ingame ({{bz|5775}}) ({{user|193987|SystematicMania}}).&lt;br /&gt;
*Fixed replace param being respected inconsistently in SetTrieArray ({{bz|6113}}).&lt;br /&gt;
*Fixed crash creating a timer when there are no handles available. ({{bz|5317}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Fixed crash in ReconnectClient and InactivateClient natives when IServer ptr is null ({{bz|6122}}).&lt;br /&gt;
*Fixed StoreFromAddress and LoadFromAddress continuing with bad values, usually crashing after error ({{bz|6080}}).&lt;br /&gt;
*Fixed compiler bug with multidimensional array variable release ({{bz|6100}}).&lt;br /&gt;
*Changed float comparison operators to return false for NaN ({{bz|6107}}).&lt;br /&gt;
*Added support in spcomp for sp/inc files &amp;gt; 32767 lines ({{bz|5959}}).&lt;br /&gt;
*Fixed FindFlagChar returning '?' for Admin_Custom6.&lt;br /&gt;
*Fixed AllPluginsLoaded activities happening before SM is loaded.&lt;br /&gt;
*Deduplicated a number of files used by extensions by moving them to the public directory ({{bz|5341}}).&lt;br /&gt;
*Removed 'state' keyword from compiler ({{bz|4572}}) (Ryan &amp;quot;{{user|49537|VoiDeD}}&amp;quot; Stecker).&lt;br /&gt;
*Removed LogMessageEx definition from logging.inc because it never existed ({{bz|5897}}) ({{user|41418|Peace-Maker}}).&lt;br /&gt;
*Removed native override API ({{bz|5852}}).&lt;br /&gt;
*Call OnLibraryAdded for all available libraries ({{bz|5925}}, {{pr|4}}).&lt;br /&gt;
*Made IGameConfig::GetMemSig return value clearer ({{bz|6081}}).&lt;br /&gt;
*Switched StringToInt(Ex) from using strtol to strtoul internally ({{bz|5939}}).&lt;br /&gt;
*Added an spcomp option to print #included files ({{bz|5997}}).&lt;br /&gt;
*Recompiled Regex extension libpcre against v8.32, enabling utf8, unicode props, and jit ({{bz|5593}}).&lt;br /&gt;
*Optimized native calls if statically bound ({{bz|5842}}).&lt;br /&gt;
&lt;br /&gt;
===Internal Changes===&lt;br /&gt;
*Now using new AlliedModders Template Library (AMTL) in many places, https://github.com/alliedmodders/amtl&lt;br /&gt;
*Ported buildscripts to new AMBuild2 platform, https://github.com/alliedmodders/ambuild&lt;br /&gt;
*Moved much logic from core to logic binary to reduce file sizes and compile times ({{bz|5606}}, {{bz|5607}}, {{bz|5680}}, {{bz|5953}}, {{pr|12}}, {{pr|13}}).&lt;br /&gt;
*Refactored the JIT to use a newer, simpler macro assembler. ({{bz|5827}}).&lt;br /&gt;
*Added sourcepawn interpreter ({{bz|5902}}).&lt;br /&gt;
*Added support for compiling spcomp with emscripten.&lt;br /&gt;
*Rewrite IThreader implementation around new synchronization primitives ({{bz|5862}}).&lt;br /&gt;
*Rewrite DBManager to use the new synchronization primitives ({{bz|5870}}).&lt;br /&gt;
*Overhauled internals of ClientPrefs extension for improved stability ({{bz|5538}}).&lt;br /&gt;
*Changed ShareSys to store C++ native lists more optimally ({{bz|5852}}).&lt;br /&gt;
*Simplified NativeEntry state ({{bz|5852}}).&lt;br /&gt;
*Changed NativeEntry to use Refcounted to manage ({{bz|5852}}).&lt;br /&gt;
*Switched Translator and GameConfigs to hash tables ({{bz|5878}}).&lt;br /&gt;
*Switched numerous subsystems from KTrie to AMTL NameHashSet ({{bz|5884}}).&lt;br /&gt;
*Refactored Trie natives to use AMTL HashMap instead of KTrie ({{bz|5892}}).&lt;br /&gt;
*Removed usages of memtables from many subsystems ({{bz|5899}}).&lt;br /&gt;
*Changed EventHook name storage to use AMTL AString ({{bz|6188}}).&lt;br /&gt;
*Replaced SH List usages in game extensions with AMTL variants ({{pr|23}}).&lt;br /&gt;
*Replaced SourceHook list usages in clientprefs with AMTL ({{pr|25}}).&lt;br /&gt;
*Changed floating-point operations to use SSE when available ({{bz|5841}}).&lt;br /&gt;
*Moved tracker related opcodes entirely to C++.&lt;br /&gt;
*Statically align the stack at function boundaries ({{bz|5842}}).&lt;br /&gt;
*Removed InfoVars, reassigned DAT from EBP to ESI to preserve C++ stacktraces in JIT code ({{bz|5844}}).&lt;br /&gt;
*Fixed dereferencing potential null pointer in CPlugin::GetProperty ({{bz|5725}}).&lt;br /&gt;
*Fixed memory corruption when parsing natives. ({{bz|5840}}).&lt;br /&gt;
*Fixed some memory errors ({{bz|5904}}).&lt;br /&gt;
*Fixed unaligned memory access in spcomp.&lt;br /&gt;
*Move versioning to a static library to improve trivial build speed ({{bz|5997}}).&lt;br /&gt;
*Added many missing handle security checks ({{bz|5595}}).&lt;br /&gt;
*Made GetEntityClassname get and cache m_iClassname offset from worldspawn for ents not having it in datadesc ({{bz|5654}}).&lt;br /&gt;
*Cache m_iEFlags offset for datamaps dump instead of getting for each ent ({{bz|5657}}).&lt;br /&gt;
*Fixed mismatched delete [] on thunks in JIT CompData dtor ({{bz|5639}}).&lt;br /&gt;
*Fixed various memory issues. ({{bz|5766}}).&lt;br /&gt;
*Added reference counting and use it for CGameConfig and IDatabase ({{bz|5876}}).&lt;br /&gt;
*Added atomic reference counting and port DBI ({{bz|5876}}).&lt;br /&gt;
*Replaced usages of deprecated Sourcehook Add/Remove macros ({{bz|5631}}).&lt;br /&gt;
*Fixed SDKHooks hook ent validation missing first datatable name ({{bz|5881}}).&lt;br /&gt;
*Fixed case where bots leave server without disconnect notice (hibernation) ({{pr|20}}).&lt;br /&gt;
*Changed FindConVar to utilize convar cache for improved performance ({{pr|27}}) (VoiDeD).&lt;br /&gt;
*Gave define value (of 1) to PLATFORM defs to match the same-name defs in some SDKs ({{pr|10}}).&lt;br /&gt;
*Wrapped ClientPrintf into IGamePlayer ({{bz|6021}}).&lt;br /&gt;
*Consolidated FileExists usage in logic bin ({{bz|5931}}).&lt;br /&gt;
*Removed hardcoded paths to tier0/vstdlib in ICommandLine lookup.&lt;br /&gt;
*Use updated IServerTools iface on TF2 for getting tempent list and FindEntityByClassname ({{pr|33}}).&lt;br /&gt;
*Added early exit in entity output detour if entity has no classname to prevent crash.&lt;br /&gt;
*Updated SDKTools entity output functions to use core's GetEntityClassname instead of own ({{pr|39}}).&lt;br /&gt;
*Consolidated SDKTools entity factory lookups.&lt;br /&gt;
*Changed SDKTools PlayerRunCmd to a global vtable hook to improve performance ({{bz|6051}}).&lt;br /&gt;
*Changed SDKHooks to use global vtable hooks to improve performance ({{bz|6070}}).&lt;br /&gt;
*Added client validation checks to EmitSound SoundsHooks ({{bz|5873}}).&lt;br /&gt;
*Added missing meta results to some pre-hooks in SDKHooks.&lt;br /&gt;
*Replaced magic numbers for sm_show_activity with named constants ({{pr|14}}).&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Timers_(SourceMod_Scripting)&amp;diff=9484</id>
		<title>Timers (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Timers_(SourceMod_Scripting)&amp;diff=9484"/>
		<updated>2014-02-10T14:23:52Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Timers in [[SourceMod]] are timed events that occur once or repeatedly at a given interval.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
Timers allow you to set an interval, a function to use as the event callback, and an optional Handle to pass through the callback.  This is useful for saving data asynchronously.&lt;br /&gt;
&lt;br /&gt;
All timer functions are in &amp;lt;tt&amp;gt;plugins/include/timers.inc&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
=Basic Usage=&lt;br /&gt;
==One-Time Timers==&lt;br /&gt;
One-time timers are timers that only execute once.  An example of a one-time timer might look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(5.0, LoadStuff);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:LoadStuff(Handle:timer)&lt;br /&gt;
{&lt;br /&gt;
	PrintToServer(&amp;quot;Loading stuff!&amp;quot;);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code will print &amp;quot;Loading stuff!&amp;quot; to the server console five seconds after the map loads.  The return value has no meaning for one-time timers.&lt;br /&gt;
&lt;br /&gt;
==Repeatable Timers==&lt;br /&gt;
Repeatable timers execute infinitely many times, once every interval.  Based on the return value, they either continue or cancel.&lt;br /&gt;
&lt;br /&gt;
For example, say you want to display a message five times, once every three seconds:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
someFunction()&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(3.0, Timer_PrintMessageFiveTimes, _, TIMER_REPEAT);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:Timer_PrintMessageFiveTimes(Handle:timer)&lt;br /&gt;
{&lt;br /&gt;
	// Create a global variable visible only in the local scope (this function).&lt;br /&gt;
	static numPrinted = 0;&lt;br /&gt;
&lt;br /&gt;
	if (numPrinted &amp;gt;= 5) {&lt;br /&gt;
		numPrinted = 0;&lt;br /&gt;
		return Plugin_Stop;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	PrintToServer(&amp;quot;Warning! This is a message.&amp;quot;);&lt;br /&gt;
	numPrinted++;&lt;br /&gt;
&lt;br /&gt;
	return Plugin_Continue;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;Plugin_Stop&amp;lt;/tt&amp;gt; stops the timer, and &amp;lt;tt&amp;gt;Plugin_Continue&amp;lt;/tt&amp;gt; allows it to continue repeating.&lt;br /&gt;
&lt;br /&gt;
=Passing Data=&lt;br /&gt;
==Simple Values==&lt;br /&gt;
As mentioned earlier, timers let you pass values on to the callback function.  This value can be any type.  For example, let's say we want to print a message to a player fifteen seconds after they connect.  However, we want to cancel the timer if the player disconnects.  Implementing this is very easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Handle:WelcomeTimers[MAXPLAYERS+1];&lt;br /&gt;
&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	WelcomeTimers[client] = CreateTimer(15.0, WelcomePlayer, client);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnClientDisconnect(client)&lt;br /&gt;
{&lt;br /&gt;
	if (WelcomeTimers[client] != INVALID_HANDLE)&lt;br /&gt;
	{&lt;br /&gt;
		KillTimer(WelcomeTimers[client]);&lt;br /&gt;
		WelcomeTimers[client] = INVALID_HANDLE;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, any:client)&lt;br /&gt;
{&lt;br /&gt;
	PrintToConsole(client, &amp;quot;Welcome to the server!&amp;quot;);&lt;br /&gt;
	WelcomeTimers[client] = INVALID_HANDLE;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example without using handles is to use either UserID or ClientSerial (which is unique to each player):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(15.0, WelcomePlayer, GetClientSerial(client)); // You could also use GetClientUserId(client)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, any:serial)&lt;br /&gt;
{&lt;br /&gt;
	new client = GetClientFromSerial(serial); // Validate the client serial&lt;br /&gt;
	&lt;br /&gt;
	if (client == 0) // The serial is no longer valid, the player must have disconnected&lt;br /&gt;
	{&lt;br /&gt;
		return Plugin_Stop;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	PrintToConsole(client, &amp;quot;Welcome to the server!&amp;quot;);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you want to close or cancel a timer when a client disconnects, then use the first example with handles.&lt;br /&gt;
&lt;br /&gt;
==Handles==&lt;br /&gt;
If you want to pass a Handle as a value, you have the option of using &amp;lt;tt&amp;gt;TIMER_DATA_HNDL_CLOSE&amp;lt;/tt&amp;gt;, which will automatically call &amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; for you once the timer dies.  &lt;br /&gt;
&lt;br /&gt;
==Data Packs==&lt;br /&gt;
Data packs are packable structures that can be used to hold asynchronous data (data that must be saved and unpacked for later).  They are especially useful for timers, and thus there exists a helper function, called &amp;lt;tt&amp;gt;CreateDataTimer()&amp;lt;/tt&amp;gt;, which creates a timer using a data pack handle.  The handle is created and closed automatically for you.&lt;br /&gt;
&lt;br /&gt;
The above example could be rewritten as:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Handle:WelcomeTimers[MAXPLAYERS+1];&lt;br /&gt;
&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	new Handle:pack;&lt;br /&gt;
	WelcomeTimers[client] = CreateDataTimer(15.0, WelcomePlayer, pack);&lt;br /&gt;
	WritePackCell(pack, client);&lt;br /&gt;
	WritePackString(pack, &amp;quot;Welcome to the server!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnClientDisconnect(client)&lt;br /&gt;
{&lt;br /&gt;
	if (WelcomeTimers[client] != INVALID_HANDLE)&lt;br /&gt;
	{&lt;br /&gt;
		KillTimer(WelcomeTimers[client]);&lt;br /&gt;
		WelcomeTimers[client] = INVALID_HANDLE;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, Handle:pack)&lt;br /&gt;
{&lt;br /&gt;
	decl String:str[128];&lt;br /&gt;
	new client;&lt;br /&gt;
&lt;br /&gt;
	/* Set to the beginning and unpack it */&lt;br /&gt;
	ResetPack(pack);&lt;br /&gt;
	client = ReadPackCell(pack);&lt;br /&gt;
	ReadPackString(pack, str, sizeof(str));&lt;br /&gt;
&lt;br /&gt;
	PrintToConsole(client, &amp;quot;%s&amp;quot;, str);&lt;br /&gt;
	WelcomeTimers[client] = INVALID_HANDLE;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
==Accuracy==&lt;br /&gt;
The smallest possible interval is 0.1 seconds.  Timers have high precision (floating point) but low accuracy, as the current time is based on the in-game tick count, not the system clock.  This has two implications:&lt;br /&gt;
*If the server is paused (not ticking or hibernating), timers will not run.&lt;br /&gt;
*The server will not always tick at an exact interval.  &lt;br /&gt;
&lt;br /&gt;
For example, a 1.234 second interval timer starting from time &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt; might not tick until &amp;lt;tt&amp;gt;t+1.242&amp;lt;/tt&amp;gt; at a tickrate of 66 ticks per second.&lt;br /&gt;
&lt;br /&gt;
==Timer Death==&lt;br /&gt;
All timers are guaranteed to die either by:&lt;br /&gt;
*&amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; being called (or on plugin unload);&lt;br /&gt;
*&amp;lt;tt&amp;gt;KillTimer()&amp;lt;/tt&amp;gt; being called;&lt;br /&gt;
*&amp;lt;tt&amp;gt;Plugin_Stop&amp;lt;/tt&amp;gt; being returned from a repeatable timer;&lt;br /&gt;
*&amp;lt;tt&amp;gt;TriggerTimer()&amp;lt;/tt&amp;gt; being called on a one-time timer;&lt;br /&gt;
*Execution of a one-time timer finishes.&lt;br /&gt;
&lt;br /&gt;
When a timer dies, if &amp;lt;tt&amp;gt;TIMER_DATA_HNDL_CLOSE&amp;lt;/tt&amp;gt; is set, the Handle will always be closed with the permissions that &amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; uses by default.  Since timers cannot be cloned, there should be no ownership issues.&lt;br /&gt;
&lt;br /&gt;
==Changing Intervals==&lt;br /&gt;
The interval of a timer cannot be changed as of this writing.  The timer must be killed and a new one created.&lt;br /&gt;
&lt;br /&gt;
==AMX Mod X==&lt;br /&gt;
Unlike [[AMX Mod X]]'s &amp;lt;tt&amp;gt;set_task&amp;lt;/tt&amp;gt; function, you cannot pass arrays using &amp;lt;tt&amp;gt;CreateTimer&amp;lt;/tt&amp;gt;.  To accomplish this, you should use the data pack functionality explained above.&lt;br /&gt;
&lt;br /&gt;
Similarly, there are no flags for counted repeats (non-infinite loops) or timers based on the map start or end.  These must be done manually.&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=130 On Timer Design, Part 3] (SourceMod DevLog)&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=119 On Timer Design, Part 2] (SourceMod DevLog)&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=118 On Timer Design, Part 1] (SourceMod DevLog)&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
&lt;br /&gt;
{{LanguageSwitch}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Timers_(SourceMod_Scripting)&amp;diff=9483</id>
		<title>Timers (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Timers_(SourceMod_Scripting)&amp;diff=9483"/>
		<updated>2014-02-10T14:09:19Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Timers in [[SourceMod]] are timed events that occur once or repeatedly at a given interval.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
Timers allow you to set an interval, a function to use as the event callback, and an optional Handle to pass through the callback.  This is useful for saving data asynchronously.&lt;br /&gt;
&lt;br /&gt;
All timer functions are in &amp;lt;tt&amp;gt;plugins/include/timers.inc&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
=Basic Usage=&lt;br /&gt;
==One-Time Timers==&lt;br /&gt;
One-time timers are timers that only execute once.  An example of a one-time timer might look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(5.0, LoadStuff)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:LoadStuff(Handle:timer)&lt;br /&gt;
{&lt;br /&gt;
	PrintToServer(&amp;quot;Loading stuff!&amp;quot;)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code will print &amp;quot;Loading stuff!&amp;quot; to the server console five seconds after the map loads.  The return value has no meaning for one-time timers.&lt;br /&gt;
&lt;br /&gt;
==Repeatable Timers==&lt;br /&gt;
Repeatable timers execute infinitely many times, once every interval.  Based on the return value, they either continue or cancel.&lt;br /&gt;
&lt;br /&gt;
For example, say you want to display a message five times, once every three seconds:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
someFunction()&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(3.0, Timer_PrintMessageFiveTimes, _, TIMER_REPEAT);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:Timer_PrintMessageFiveTimes(Handle:timer)&lt;br /&gt;
{&lt;br /&gt;
	// Create a global variable visible only in the local scope (this function).&lt;br /&gt;
	static numPrinted = 0;&lt;br /&gt;
&lt;br /&gt;
	if (numPrinted &amp;gt;= 5) {&lt;br /&gt;
		numPrinted = 0;&lt;br /&gt;
		return Plugin_Stop;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	PrintToServer(&amp;quot;Warning! This is a message.&amp;quot;);&lt;br /&gt;
	numPrinted++;&lt;br /&gt;
&lt;br /&gt;
	return Plugin_Continue;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;Plugin_Stop&amp;lt;/tt&amp;gt; stops the timer, and &amp;lt;tt&amp;gt;Plugin_Continue&amp;lt;/tt&amp;gt; allows it to continue repeating.&lt;br /&gt;
&lt;br /&gt;
=Passing Data=&lt;br /&gt;
==Simple Values==&lt;br /&gt;
As mentioned earlier, timers let you pass values on to the callback function.  This value can be any type.  For example, let's say we want to print a message to a player fifteen seconds after they connect.  However, we want to cancel the timer if the player disconnects.  Implementing this is very easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Handle:WelcomeTimers[MAXPLAYERS+1]&lt;br /&gt;
&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	WelcomeTimers[client] = CreateTimer(15.0, WelcomePlayer, client)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnClientDisconnect(client)&lt;br /&gt;
{&lt;br /&gt;
	if (WelcomeTimers[client] != INVALID_HANDLE)&lt;br /&gt;
	{&lt;br /&gt;
		KillTimer(WelcomeTimers[client])&lt;br /&gt;
		WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, any:client)&lt;br /&gt;
{&lt;br /&gt;
	PrintToConsole(client, &amp;quot;Welcome to the server!&amp;quot;)&lt;br /&gt;
	WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example without using handles is to use either UserID or ClientSerial (which is unique to each player):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(15.0, WelcomePlayer, GetClientSerial(client)) // You could also use GetClientUserId(client)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, any:serial)&lt;br /&gt;
{&lt;br /&gt;
	new client = GetClientFromSerial(serial) // Validate the client serial&lt;br /&gt;
	&lt;br /&gt;
	if (client == 0) // The serial is no longer valid, the player must have disconnected&lt;br /&gt;
	{&lt;br /&gt;
		return Plugin_Continue&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	PrintToConsole(client, &amp;quot;Welcome to the server!&amp;quot;)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you want to close or cancel a timer when a client disconnects, then use the first example with handles.&lt;br /&gt;
&lt;br /&gt;
==Handles==&lt;br /&gt;
If you want to pass a Handle as a value, you have the option of using &amp;lt;tt&amp;gt;TIMER_DATA_HNDL_CLOSE&amp;lt;/tt&amp;gt;, which will automatically call &amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; for you once the timer dies.  &lt;br /&gt;
&lt;br /&gt;
==Data Packs==&lt;br /&gt;
Data packs are packable structures that can be used to hold asynchronous data (data that must be saved and unpacked for later).  They are especially useful for timers, and thus there exists a helper function, called &amp;lt;tt&amp;gt;CreateDataTimer()&amp;lt;/tt&amp;gt;, which creates a timer using a data pack handle.  The handle is created and closed automatically for you.&lt;br /&gt;
&lt;br /&gt;
The above example could be rewritten as:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Handle:WelcomeTimers[MAXPLAYERS+1]&lt;br /&gt;
&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	new Handle:pack&lt;br /&gt;
	WelcomeTimers[client] = CreateDataTimer(15.0, WelcomePlayer, pack)&lt;br /&gt;
	WritePackCell(pack, client)&lt;br /&gt;
	WritePackString(pack, &amp;quot;Welcome to the server!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnClientDisconnect(client)&lt;br /&gt;
{&lt;br /&gt;
	if (WelcomeTimers[client] != INVALID_HANDLE)&lt;br /&gt;
	{&lt;br /&gt;
		KillTimer(WelcomeTimers[client])&lt;br /&gt;
		WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, Handle:pack)&lt;br /&gt;
{&lt;br /&gt;
	decl String:str[128]&lt;br /&gt;
	new client&lt;br /&gt;
&lt;br /&gt;
	/* Set to the beginning and unpack it */&lt;br /&gt;
	ResetPack(pack)&lt;br /&gt;
	client = ReadPackCell(pack)&lt;br /&gt;
	ReadPackString(pack, str, sizeof(str))&lt;br /&gt;
&lt;br /&gt;
	PrintToConsole(client, &amp;quot;%s&amp;quot;, str)&lt;br /&gt;
	WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
==Accuracy==&lt;br /&gt;
The smallest possible interval is 0.1 seconds.  Timers have high precision (floating point) but low accuracy, as the current time is based on the in-game tick count, not the system clock.  This has two implications:&lt;br /&gt;
*If the server is paused (not ticking or hibernating), timers will not run.&lt;br /&gt;
*The server will not always tick at an exact interval.  &lt;br /&gt;
&lt;br /&gt;
For example, a 1.234 second interval timer starting from time &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt; might not tick until &amp;lt;tt&amp;gt;t+1.242&amp;lt;/tt&amp;gt; at a tickrate of 66 ticks per second.&lt;br /&gt;
&lt;br /&gt;
==Timer Death==&lt;br /&gt;
All timers are guaranteed to die either by:&lt;br /&gt;
*&amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; being called (or on plugin unload);&lt;br /&gt;
*&amp;lt;tt&amp;gt;KillTimer()&amp;lt;/tt&amp;gt; being called;&lt;br /&gt;
*&amp;lt;tt&amp;gt;Plugin_Stop&amp;lt;/tt&amp;gt; being returned from a repeatable timer;&lt;br /&gt;
*&amp;lt;tt&amp;gt;TriggerTimer()&amp;lt;/tt&amp;gt; being called on a one-time timer;&lt;br /&gt;
*Execution of a one-time timer finishes.&lt;br /&gt;
&lt;br /&gt;
When a timer dies, if &amp;lt;tt&amp;gt;TIMER_HNDL_CLOSE&amp;lt;/tt&amp;gt; is set, the Handle will always be closed with the permissions that &amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; uses by default.  Since timers cannot be cloned, there should be no ownership issues.&lt;br /&gt;
&lt;br /&gt;
==Changing Intervals==&lt;br /&gt;
The interval of a timer cannot be changed as of this writing.  The timer must be killed and a new one created.&lt;br /&gt;
&lt;br /&gt;
==AMX Mod X==&lt;br /&gt;
Unlike [[AMX Mod X]]'s &amp;lt;tt&amp;gt;set_task&amp;lt;/tt&amp;gt; function, you cannot pass arrays using &amp;lt;tt&amp;gt;CreateTimer&amp;lt;/tt&amp;gt;.  To accomplish this, you should use the data pack functionality explained above.&lt;br /&gt;
&lt;br /&gt;
Similarly, there are no flags for counted repeats (non-infinite loops) or timers based on the map start or end.  These must be done manually.&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=130 On Timer Design, Part 3] (SourceMod DevLog)&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=119 On Timer Design, Part 2] (SourceMod DevLog)&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=118 On Timer Design, Part 1] (SourceMod DevLog)&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
&lt;br /&gt;
{{LanguageSwitch}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Optional_Requirements_(SourceMod_Scripting)&amp;diff=9482</id>
		<title>Optional Requirements (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Optional_Requirements_(SourceMod_Scripting)&amp;diff=9482"/>
		<updated>2014-02-10T14:00:43Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Normally, if you use natives from an extension or another plugin, your plugin will not load unless those natives exist.  However, it is possible to make your dependencies &amp;quot;optional.&amp;quot;  This article details how.&lt;br /&gt;
&lt;br /&gt;
=Disabling Requirements=&lt;br /&gt;
==Extensions==&lt;br /&gt;
To disable an extension being marked as &amp;quot;required,&amp;quot; remove the &amp;lt;tt&amp;gt;REQUIRE_EXTENSIONS&amp;lt;/tt&amp;gt; define.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#undef REQUIRE_EXTENSIONS&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that any extensions included after the &amp;lt;tt&amp;gt;#undef&amp;lt;/tt&amp;gt; will also be marked as not required.  Thus, you may need to move the include down, or do something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#undef REQUIRE_EXTENSIONS&lt;br /&gt;
#include &amp;lt;sdktools&amp;gt;&lt;br /&gt;
#define REQUIRE_EXTENSIONS&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Plugins==&lt;br /&gt;
To disable an plugin being marked as &amp;quot;required,&amp;quot; remove the &amp;lt;tt&amp;gt;REQUIRE_PLUGIN&amp;lt;/tt&amp;gt; define.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#undef REQUIRE_PLUGIN&lt;br /&gt;
#include &amp;lt;ircrelay&amp;gt;&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that any plugins included after the &amp;lt;tt&amp;gt;#undef&amp;lt;/tt&amp;gt; will also be marked as not required.  Thus, you may need to move the include down, or do something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#undef REQUIRE_PLUGIN&lt;br /&gt;
#include &amp;lt;ircrelay&amp;gt;&lt;br /&gt;
#define REQUIRE_PLUGIN&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Optional Natives==&lt;br /&gt;
To mark a native as optional, use &amp;lt;tt&amp;gt;MarkNativeAsOptional&amp;lt;/tt&amp;gt;.  It should be called in &amp;lt;tt&amp;gt;AskPluginLoad2&amp;lt;/tt&amp;gt;.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)&lt;br /&gt;
{&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;SDKCall&amp;quot;);&lt;br /&gt;
	return APLRes_Success;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Checking Optional Dependencies=&lt;br /&gt;
If you use a plugin or extension as an optional dependency, you may need to check whether it exists.  For example, let's say we're relying on a plugin with the library name of &amp;quot;ircrelay.&amp;quot;  The way to always know whether ircrelay is loaded (and working) is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;new bool:ircrelay = false;&lt;br /&gt;
&lt;br /&gt;
public OnAllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	ircrelay = LibraryExists(&amp;quot;ircrelay&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnLibraryRemoved(const String:name[])&lt;br /&gt;
{&lt;br /&gt;
	if (StrEqual(name, &amp;quot;ircrelay&amp;quot;))&lt;br /&gt;
	{&lt;br /&gt;
		ircrelay = false;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnLibraryAdded(const String:name[])&lt;br /&gt;
{&lt;br /&gt;
	if (StrEqual(name, &amp;quot;ircrelay&amp;quot;))&lt;br /&gt;
	{&lt;br /&gt;
		ircrelay = true;&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Creating a Dependency=&lt;br /&gt;
Allowing other plugins to use your plugin as a library requires making an include file with two structures (the second of which is optional).  The first structure must look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public SharedPlugin:__pl_myfile = &lt;br /&gt;
{&lt;br /&gt;
	name = &amp;quot;myfile&amp;quot;,&lt;br /&gt;
	file = &amp;quot;myfile.smx&amp;quot;,&lt;br /&gt;
#if defined REQUIRE_PLUGIN&lt;br /&gt;
	required = 1,&lt;br /&gt;
#else&lt;br /&gt;
	required = 0,&lt;br /&gt;
#endif&lt;br /&gt;
};&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic format is:&lt;br /&gt;
*The variable name MUST start with &amp;lt;tt&amp;gt;__pl_&amp;lt;/tt&amp;gt; and must end with a unique string.&lt;br /&gt;
*The &amp;quot;name&amp;quot; portion is treated as the library name and must be unique.&lt;br /&gt;
*The filename must match the filename of the plugin implementing the library.&lt;br /&gt;
*The requirement portion should remain unchanged in order to maintain standards.&lt;br /&gt;
&lt;br /&gt;
Additionally, you should expose a function which marks all of your natives as optional.  You can do this by:&lt;br /&gt;
&amp;lt;pawn&amp;gt;#if !defined REQUIRE_PLUGIN&lt;br /&gt;
public __pl_myfile_SetNTVOptional()&lt;br /&gt;
{&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;native1&amp;quot;);&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;native2&amp;quot;);&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;native3&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
#endif&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will be secretly called before the plugin loads (if and only if the requirement is optional), thus allowing seamless optional usage by third party developers.  Note that the &amp;lt;tt&amp;gt;__pl_&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;_SetNTVOptional&amp;lt;/tt&amp;gt; portions &amp;lt;b&amp;gt;must&amp;lt;/b&amp;gt; be present, and that everything in between must match the ending of &amp;lt;tt&amp;gt;__pl_&amp;lt;/tt&amp;gt; for the &amp;lt;tt&amp;gt;SharedPlugin&amp;lt;/tt&amp;gt; structure.&lt;br /&gt;
&lt;br /&gt;
You also must register the library name with SourceMod -- again this should be the unique string. This should be done inside the &amp;lt;code&amp;gt;AskPluginLoad2&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)&lt;br /&gt;
{&lt;br /&gt;
	//... code here ...&lt;br /&gt;
	RegPluginLibrary(&amp;quot;myfile&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	return APLRes_Success;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Full Example =&lt;br /&gt;
;''Bounty: bounty.sp''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
#undef REQUIRE_PLUGIN&lt;br /&gt;
#include &amp;lt;ircrelay&amp;gt;&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
;''Bounty: bounty.config.sp''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new bool:plugin_IrcRelay = LibraryExists(&amp;quot;ircrelay&amp;quot;);&lt;br /&gt;
if ((BountyIRC) &amp;amp;&amp;amp; (plugin_IrcRelay))&lt;br /&gt;
{&lt;br /&gt;
	RegisterIrcCommand(&amp;quot;!bounty&amp;quot;, &amp;quot;x&amp;quot;, Irc_ViewBounty);&lt;br /&gt;
	IrcMessage(CHAN_MASTER, &amp;quot;IRC Bounty Running!&amp;quot;);&lt;br /&gt;
} else {&lt;br /&gt;
	if ((BountyIRC) &amp;amp;&amp;amp; (!plugin_IrcRelay))&lt;br /&gt;
	{&lt;br /&gt;
		BountyConsole_Debug(&amp;quot;%t&amp;quot;, &amp;quot;Bounty IRC Relay failed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
;''IRC Relay: ircrelay.sp''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)&lt;br /&gt;
{&lt;br /&gt;
	//... code here ...&lt;br /&gt;
	RegPluginLibrary(&amp;quot;ircrelay&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	return APLRes_Success;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
;''IRC Relay: ircrelay.inc''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
public SharedPlugin:__pl_ircrelay = &lt;br /&gt;
{&lt;br /&gt;
	name = &amp;quot;ircrelay&amp;quot;,&lt;br /&gt;
	file = &amp;quot;ircrelay.smx&amp;quot;,&lt;br /&gt;
#if defined REQUIRE_PLUGIN&lt;br /&gt;
	required = 1,&lt;br /&gt;
#else&lt;br /&gt;
	required = 0,&lt;br /&gt;
#endif&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#if !defined REQUIRE_PLUGIN&lt;br /&gt;
public __pl_ircrelay_SetNTVOptional()&lt;br /&gt;
{&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;IrcMessage&amp;quot;);&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;RegisterIrcCommand&amp;quot;);&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;IrcGetCmdArgc&amp;quot;);&lt;br /&gt;
	MarkNativeAsOptional(&amp;quot;IrcGetCmdArgv&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; value is what will be checked when you run &amp;lt;code&amp;gt;LibraryExists&amp;lt;/code&amp;gt;. This allows the bounty script to fully work, even if the IRC relay plugin is not installed and/or running correctly on your server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Admin_Menu_(SourceMod_Scripting)&amp;diff=9481</id>
		<title>Admin Menu (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Admin_Menu_(SourceMod_Scripting)&amp;diff=9481"/>
		<updated>2014-02-10T13:48:14Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The admin menu is a menu available to all in-game administrators.  It is a simple, one-level, category-based menu with heavy focus on consistency.  The menu is simply a &amp;lt;tt&amp;gt;TopMenu&amp;lt;/tt&amp;gt;, from the TopMenus extension, and is provided by &amp;lt;tt&amp;gt;adminmenu.sp&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
The menu itself has no items unless external plugins provide them.  Thus, it is possible (and recommended) for third party developers to extend the menu by attaching their own functionality to it.  This requires a bit of patience, but this article documents most of the steps necessary.&lt;br /&gt;
&lt;br /&gt;
=Menu Organization=&lt;br /&gt;
The menu is organized into ''categories'' and ''items''.  Categories are top-level selections on the menu.  Items are selectable entries inside categories.  There are two important rules:&lt;br /&gt;
*There is no nesting.  Categories cannot have sub-categories.&lt;br /&gt;
*Only categories can exist at the top level (i.e. items must have a parent category).&lt;br /&gt;
&lt;br /&gt;
All entries on the menu, be they categories or items, are called ''top menu objects'', and each must have a unique name.  For simplicity, the default admin menu entries use their respective command names as unique names, however this style is not required or enforced.&lt;br /&gt;
&lt;br /&gt;
Unique names are used to identify items for sorting.  For more information, see [[Admin Menu Configuration (SourceMod)|Admin Menu Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Interfacing to the Admin Menu=&lt;br /&gt;
The admin menu plugin can be loaded or unloaded at any time, and accounting for this in your code is important.  Generally, you must account for the following cases:&lt;br /&gt;
*The admin menu is unloaded while you are interfaced to it.&lt;br /&gt;
*The admin menu is loaded while your plugin is already loaded.&lt;br /&gt;
*The admin menu is loaded before your plugin is loaded.&lt;br /&gt;
&lt;br /&gt;
You do not need to remove menu items; they are removed automatically when your plugin is unloaded, and temporarily removed while your plugin is paused.&lt;br /&gt;
&lt;br /&gt;
Example code is below:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* Make the admin menu plugin optional */&lt;br /&gt;
#undef REQUIRE_PLUGIN&lt;br /&gt;
#include &amp;lt;adminmenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* Keep track of the top menu */&lt;br /&gt;
new Handle:hAdminMenu = INVALID_HANDLE&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	/* See if the menu plugin is already ready */&lt;br /&gt;
	new Handle:topmenu;&lt;br /&gt;
	if (LibraryExists(&amp;quot;adminmenu&amp;quot;) &amp;amp;&amp;amp; ((topmenu = GetAdminTopMenu()) != INVALID_HANDLE))&lt;br /&gt;
	{&lt;br /&gt;
		/* If so, manually fire the callback */&lt;br /&gt;
		OnAdminMenuReady(topmenu);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnLibraryRemoved(const String:name[])&lt;br /&gt;
{&lt;br /&gt;
	if (StrEqual(name, &amp;quot;adminmenu&amp;quot;))&lt;br /&gt;
	{&lt;br /&gt;
		hAdminMenu = INVALID_HANDLE;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnAdminMenuReady(Handle:topmenu)&lt;br /&gt;
{&lt;br /&gt;
	/* Try to add the category first, if we want to add one.&lt;br /&gt;
	   Leave this out, if you don't add a new category. */&lt;br /&gt;
	if(obj_dmcommands == INVALID_TOPMENUOBJECT)&lt;br /&gt;
	{&lt;br /&gt;
		OnAdminMenuCreated(topmenu);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/* Block us from being called twice */&lt;br /&gt;
	if (topmenu == hAdminMenu)&lt;br /&gt;
	{&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	hAdminMenu = topmenu;&lt;br /&gt;
	&lt;br /&gt;
	/* :TODO: Add everything to the menu! */&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Top Menu Objects=&lt;br /&gt;
Top Menu Objects are entries, either categories or items, on the admin menu (or any top menu).  Each has the following properties:&lt;br /&gt;
*&amp;lt;tt&amp;gt;ID&amp;lt;/tt&amp;gt; (OUTPUT): The ID of the object in memory.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; (INPUT): The unique name of the object.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt; (INPUT): Either a category or an item.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Handler&amp;lt;/tt&amp;gt; (INPUT): The callback function.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Parent&amp;lt;/tt&amp;gt; (INPUT): Empty for categories, or a category object ID for an item.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Override&amp;lt;/tt&amp;gt; (INPUT): The name of the override associated with the command.  For more information, see [[Overriding Command Access (SourceMod)|Overriding Command Access]].  Overrides don't need to be a command name.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Flags&amp;lt;/tt&amp;gt; (INPUT): Default admin flags that should be associated with the object if the override is not set.&lt;br /&gt;
&lt;br /&gt;
The callback determines how the object is drawn on the menu.  If no flags are specified, the item is usable by any admin.  If an admin does not have access to an object (including an entire category), it will not be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Adding Categories=&lt;br /&gt;
Adding categories is sometimes beneficial for larger plugins with many commands.  A category object receives two TopMenuAction callbacks:&lt;br /&gt;
*&amp;lt;tt&amp;gt;TopMenuAction_DisplayOption&amp;lt;/tt&amp;gt; - The category is being displayed.&lt;br /&gt;
*&amp;lt;tt&amp;gt;TopMenuAction_DisplayTitle&amp;lt;/tt&amp;gt; - The category is being displayed as a title.&lt;br /&gt;
&lt;br /&gt;
For example, let's create a category called &amp;quot;CS:S DM Commands&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new TopMenuObject:obj_dmcommands;&lt;br /&gt;
&lt;br /&gt;
public OnAdminMenuCreated(Handle:topmenu)&lt;br /&gt;
{&lt;br /&gt;
	/* Block us from being called twice */&lt;br /&gt;
	if (topmenu == hAdminMenu &amp;amp;&amp;amp; obj_dmcommands != INVALID_TOPMENUOBJECT)&lt;br /&gt;
	{&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	obj_dmcommands = AddToTopMenu(topmenu,&lt;br /&gt;
		&amp;quot;CS:S DM Commands&amp;quot;,&lt;br /&gt;
		TopMenuObject_Category,&lt;br /&gt;
		CategoryHandler,&lt;br /&gt;
		INVALID_TOPMENUOBJECT);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public CategoryHandler(Handle:topmenu, &lt;br /&gt;
			TopMenuAction:action,&lt;br /&gt;
			TopMenuObject:object_id,&lt;br /&gt;
			param,&lt;br /&gt;
			String:buffer[],&lt;br /&gt;
			maxlength)&lt;br /&gt;
{&lt;br /&gt;
	if (action == TopMenuAction_DisplayTitle)&lt;br /&gt;
	{&lt;br /&gt;
		Format(buffer, maxlength, &amp;quot;CS:S DM Commands:&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else if (action == TopMenuAction_DisplayOption)&lt;br /&gt;
	{&lt;br /&gt;
		Format(buffer, maxlength, &amp;quot;CS:S DM Commands&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a callback can handle more than one category.  If that is the desired functionality, you can use the &amp;lt;tt&amp;gt;TopMenuObject&amp;lt;/tt&amp;gt; value to see which object is being drawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Adding Items=&lt;br /&gt;
Items are different from categories in that their selection can be detected.  They must have a parent category.  The code below shows an example of finding an existing category and adding an item to it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
AttachAdminMenu()&lt;br /&gt;
{&lt;br /&gt;
	/* If the category is third party, it will have its own unique name. */&lt;br /&gt;
	new TopMenuObject:player_commands = FindTopMenuCategory(hAdminMenu, ADMINMENU_PLAYERCOMMANDS);&lt;br /&gt;
&lt;br /&gt;
	if (player_commands == INVALID_TOPMENUOBJECT)&lt;br /&gt;
	{&lt;br /&gt;
		/* Error! */&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	AddToTopMenu(hAdminMenu, &lt;br /&gt;
		&amp;quot;sm_poke&amp;quot;,&lt;br /&gt;
		TopMenuObject_Item,&lt;br /&gt;
		AdminMenu_Poke,&lt;br /&gt;
		player_commands,&lt;br /&gt;
		&amp;quot;sm_poke&amp;quot;,&lt;br /&gt;
		ADMFLAG_SLAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public AdminMenu_Poke(Handle:topmenu, &lt;br /&gt;
			TopMenuAction:action,&lt;br /&gt;
			TopMenuObject:object_id,&lt;br /&gt;
			param,&lt;br /&gt;
			String:buffer[],&lt;br /&gt;
			maxlength)&lt;br /&gt;
{&lt;br /&gt;
	if (action == TopMenuAction_DisplayOption)&lt;br /&gt;
	{&lt;br /&gt;
		Format(buffer, maxlength, &amp;quot;Poke&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else if (action == TopMenuAction_SelectOption)&lt;br /&gt;
	{&lt;br /&gt;
		/* Do something! client who selected item is in param */&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a callback can handle more than one item.  If that is the desired functionality, you can use the &amp;lt;tt&amp;gt;TopMenuObject&amp;lt;/tt&amp;gt; value to see which object is being drawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Returning to the Menu=&lt;br /&gt;
Sometimes it is desirable to re-display the admin menu to the client.  This can be achievied via &amp;lt;tt&amp;gt;RedisplayAdminMenu&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;adminmenu.inc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Admin_Menu_(SourceMod_Scripting)&amp;diff=9480</id>
		<title>Admin Menu (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Admin_Menu_(SourceMod_Scripting)&amp;diff=9480"/>
		<updated>2014-02-10T13:47:34Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Fixup example code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The admin menu is a menu available to all in-game administrators.  It is a simple, one-level, category-based menu with heavy focus on consistency.  The menu is simply a &amp;lt;tt&amp;gt;TopMenu&amp;lt;/tt&amp;gt;, from the TopMenus extension, and is provided by &amp;lt;tt&amp;gt;adminmenu.sp&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
The menu itself has no items unless external plugins provide them.  Thus, it is possible (and recommended) for third party developers to extend the menu by attaching their own functionality to it.  This requires a bit of patience, but this article documents most of the steps necessary.&lt;br /&gt;
&lt;br /&gt;
=Menu Organization=&lt;br /&gt;
The menu is organized into ''categories'' and ''items''.  Categories are top-level selections on the menu.  Items are selectable entries inside categories.  There are two important rules:&lt;br /&gt;
*There is no nesting.  Categories cannot have sub-categories.&lt;br /&gt;
*Only categories can exist at the top level (i.e. items must have a parent category).&lt;br /&gt;
&lt;br /&gt;
All entries on the menu, be they categories or items, are called ''top menu objects'', and each must have a unique name.  For simplicity, the default admin menu entries use their respective command names as unique names, however this style is not required or enforced.&lt;br /&gt;
&lt;br /&gt;
Unique names are used to identify items for sorting.  For more information, see [[Admin Menu Configuration (SourceMod)|Admin Menu Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Interfacing to the Admin Menu=&lt;br /&gt;
The admin menu plugin can be loaded or unloaded at any time, and accounting for this in your code is important.  Generally, you must account for the following cases:&lt;br /&gt;
*The admin menu is unloaded while you are interfaced to it.&lt;br /&gt;
*The admin menu is loaded while your plugin is already loaded.&lt;br /&gt;
*The admin menu is loaded before your plugin is loaded.&lt;br /&gt;
&lt;br /&gt;
You do not need to remove menu items; they are removed automatically when your plugin is unloaded, and temporarily removed while your plugin is paused.&lt;br /&gt;
&lt;br /&gt;
Example code is below:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
#include &amp;lt;sourcemod&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* Make the admin menu plugin optional */&lt;br /&gt;
#undef REQUIRE_PLUGIN&lt;br /&gt;
#include &amp;lt;adminmenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* Keep track of the top menu */&lt;br /&gt;
new Handle:hAdminMenu = INVALID_HANDLE&lt;br /&gt;
&lt;br /&gt;
public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	/* See if the menu plugin is already ready */&lt;br /&gt;
	new Handle:topmenu;&lt;br /&gt;
	if (LibraryExists(&amp;quot;adminmenu&amp;quot;) &amp;amp;&amp;amp; ((topmenu = GetAdminTopMenu()) != INVALID_HANDLE))&lt;br /&gt;
	{&lt;br /&gt;
		/* If so, manually fire the callback */&lt;br /&gt;
		OnAdminMenuReady(topmenu);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnLibraryRemoved(const String:name[])&lt;br /&gt;
{&lt;br /&gt;
	if (StrEqual(name, &amp;quot;adminmenu&amp;quot;))&lt;br /&gt;
	{&lt;br /&gt;
		hAdminMenu = INVALID_HANDLE;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnAdminMenuReady(Handle:topmenu)&lt;br /&gt;
{&lt;br /&gt;
	/* Try to add the category first, if we want to add one.&lt;br /&gt;
	   Leave this out, if you don't add a new category. */&lt;br /&gt;
	if(obj_dmcommands == INVALID_TOPMENUOBJECT)&lt;br /&gt;
	{&lt;br /&gt;
		OnAdminMenuCreated(topmenu);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/* Block us from being called twice */&lt;br /&gt;
	if (topmenu == hAdminMenu)&lt;br /&gt;
	{&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	hAdminMenu = topmenu;&lt;br /&gt;
	&lt;br /&gt;
	/* :TODO: Add everything to the menu! */&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Top Menu Objects=&lt;br /&gt;
Top Menu Objects are entries, either categories or items, on the admin menu (or any top menu).  Each has the following properties:&lt;br /&gt;
*&amp;lt;tt&amp;gt;ID&amp;lt;/tt&amp;gt; (OUTPUT): The ID of the object in memory.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; (INPUT): The unique name of the object.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt; (INPUT): Either a category or an item.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Handler&amp;lt;/tt&amp;gt; (INPUT): The callback function.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Parent&amp;lt;/tt&amp;gt; (INPUT): Empty for categories, or a category object ID for an item.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Override&amp;lt;/tt&amp;gt; (INPUT): The name of the override associated with the command.  For more information, see [[Overriding Command Access (SourceMod)|Overriding Command Access]].  Overrides don't need to be a command name.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Flags&amp;lt;/tt&amp;gt; (INPUT): Default admin flags that should be associated with the object if the override is not set.&lt;br /&gt;
&lt;br /&gt;
The callback determines how the object is drawn on the menu.  If no flags are specified, the item is usable by any admin.  If an admin does not have access to an object (including an entire category), it will not be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Adding Categories=&lt;br /&gt;
Adding categories is sometimes beneficial for larger plugins with many commands.  A category object receives two TopMenuAction callbacks:&lt;br /&gt;
*&amp;lt;tt&amp;gt;TopMenuAction_DisplayOption&amp;lt;/tt&amp;gt; - The category is being displayed.&lt;br /&gt;
*&amp;lt;tt&amp;gt;TopMenuAction_DisplayTitle&amp;lt;/tt&amp;gt; - The category is being displayed as a title.&lt;br /&gt;
&lt;br /&gt;
For example, let's create a category called &amp;quot;CS:S DM Commands&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new TopMenuObject:obj_dmcommands;&lt;br /&gt;
&lt;br /&gt;
public OnAdminMenuCreated(Handle:topmenu)&lt;br /&gt;
{&lt;br /&gt;
	/* Block us from being called twice */&lt;br /&gt;
	if (topmenu == hAdminMenu &amp;amp;&amp;amp; obj_dmcommands != INVALID_TOPMENUOBJECT)&lt;br /&gt;
	{&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	obj_dmcommands = AddToTopMenu(hAdminMenu,&lt;br /&gt;
		&amp;quot;CS:S DM Commands&amp;quot;,&lt;br /&gt;
		TopMenuObject_Category,&lt;br /&gt;
		CategoryHandler,&lt;br /&gt;
		INVALID_TOPMENUOBJECT);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public CategoryHandler(Handle:topmenu, &lt;br /&gt;
			TopMenuAction:action,&lt;br /&gt;
			TopMenuObject:object_id,&lt;br /&gt;
			param,&lt;br /&gt;
			String:buffer[],&lt;br /&gt;
			maxlength)&lt;br /&gt;
{&lt;br /&gt;
	if (action == TopMenuAction_DisplayTitle)&lt;br /&gt;
	{&lt;br /&gt;
		Format(buffer, maxlength, &amp;quot;CS:S DM Commands:&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else if (action == TopMenuAction_DisplayOption)&lt;br /&gt;
	{&lt;br /&gt;
		Format(buffer, maxlength, &amp;quot;CS:S DM Commands&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a callback can handle more than one category.  If that is the desired functionality, you can use the &amp;lt;tt&amp;gt;TopMenuObject&amp;lt;/tt&amp;gt; value to see which object is being drawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Adding Items=&lt;br /&gt;
Items are different from categories in that their selection can be detected.  They must have a parent category.  The code below shows an example of finding an existing category and adding an item to it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
AttachAdminMenu()&lt;br /&gt;
{&lt;br /&gt;
	/* If the category is third party, it will have its own unique name. */&lt;br /&gt;
	new TopMenuObject:player_commands = FindTopMenuCategory(hAdminMenu, ADMINMENU_PLAYERCOMMANDS);&lt;br /&gt;
&lt;br /&gt;
	if (player_commands == INVALID_TOPMENUOBJECT)&lt;br /&gt;
	{&lt;br /&gt;
		/* Error! */&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	AddToTopMenu(hAdminMenu, &lt;br /&gt;
		&amp;quot;sm_poke&amp;quot;,&lt;br /&gt;
		TopMenuObject_Item,&lt;br /&gt;
		AdminMenu_Poke,&lt;br /&gt;
		player_commands,&lt;br /&gt;
		&amp;quot;sm_poke&amp;quot;,&lt;br /&gt;
		ADMFLAG_SLAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public AdminMenu_Poke(Handle:topmenu, &lt;br /&gt;
			TopMenuAction:action,&lt;br /&gt;
			TopMenuObject:object_id,&lt;br /&gt;
			param,&lt;br /&gt;
			String:buffer[],&lt;br /&gt;
			maxlength)&lt;br /&gt;
{&lt;br /&gt;
	if (action == TopMenuAction_DisplayOption)&lt;br /&gt;
	{&lt;br /&gt;
		Format(buffer, maxlength, &amp;quot;Poke&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else if (action == TopMenuAction_SelectOption)&lt;br /&gt;
	{&lt;br /&gt;
		/* Do something! client who selected item is in param */&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a callback can handle more than one item.  If that is the desired functionality, you can use the &amp;lt;tt&amp;gt;TopMenuObject&amp;lt;/tt&amp;gt; value to see which object is being drawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Returning to the Menu=&lt;br /&gt;
Sometimes it is desirable to re-display the admin menu to the client.  This can be achievied via &amp;lt;tt&amp;gt;RedisplayAdminMenu&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;adminmenu.inc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Vice_keys&amp;diff=8737</id>
		<title>Vice keys</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Vice_keys&amp;diff=8737"/>
		<updated>2012-10-13T21:47:23Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VICE keys are used to encrypt the game's weapon config files in an effort to make them more difficult to tamper with.  It's not really a great protection, as usually the key is just hardcoded into the server binaries.  Some games, such as Golden Eye Source, try to make it more difficult to retrieve these, but even then it's trivial.&lt;br /&gt;
&lt;br /&gt;
These keys can be used to decrypt the CTX files that many games provide.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;300&amp;quot;| Game&lt;br /&gt;
!width=&amp;quot;100&amp;quot;| Key&lt;br /&gt;
|-&lt;br /&gt;
| Counter-Strike: Source / Global Offensive&lt;br /&gt;
| d7NSuLq2&lt;br /&gt;
|- &lt;br /&gt;
| CSPromod&lt;br /&gt;
| H1aRQ0n1&lt;br /&gt;
|-&lt;br /&gt;
| Day of Defeat: Source&lt;br /&gt;
| Wl0u5B3F&lt;br /&gt;
|- &lt;br /&gt;
| Dystopia (1.2?)&lt;br /&gt;
| pH3apO8w&lt;br /&gt;
|-&lt;br /&gt;
| Dystopia 1.3 RC2&lt;br /&gt;
| G8stUh3F&lt;br /&gt;
|-&lt;br /&gt;
| Golden Eye Source&lt;br /&gt;
| Gr3naDes&lt;br /&gt;
|- &lt;br /&gt;
| Half-Life 2: Deathmatch&lt;br /&gt;
| x9Ke0BY7&lt;br /&gt;
|- &lt;br /&gt;
| Insurgency&lt;br /&gt;
| DrA5e3EB&lt;br /&gt;
|-&lt;br /&gt;
| Left 4 Dead 2 (VScript .nuc)&lt;br /&gt;
| SDhfi878&lt;br /&gt;
|- &lt;br /&gt;
| Nuclear Dawn&lt;br /&gt;
| TA+*veh9&lt;br /&gt;
|-&lt;br /&gt;
| TF2 (items.ctx)&lt;br /&gt;
| A5fSXbf7&lt;br /&gt;
|- &lt;br /&gt;
| TF2 (everything else)&lt;br /&gt;
| E2NcUkG2&lt;br /&gt;
|- &lt;br /&gt;
| ZPS&lt;br /&gt;
| 5R0ni0pZ&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Vice_keys&amp;diff=8736</id>
		<title>Vice keys</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Vice_keys&amp;diff=8736"/>
		<updated>2012-10-13T21:46:35Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VICE keys are used to encrypt the game's weapon config files in an effort to make them more difficult to tamper with.  It's not really a great protection, as usually the key is just hardcoded into the server binaries.  Some games, such as Golden Eye Source, try to make it more difficult to retrieve these, but even then it's trivial.&lt;br /&gt;
&lt;br /&gt;
These keys can be used to decrypt the CTX files that many games provide.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;300&amp;quot;| Game&lt;br /&gt;
!width=&amp;quot;100&amp;quot;| Key&lt;br /&gt;
|-&lt;br /&gt;
| Counter-Strike: Source / Global Offensive&lt;br /&gt;
| d7NSuLq2&lt;br /&gt;
|- &lt;br /&gt;
| CSPromod&lt;br /&gt;
| H1aRQ0n1&lt;br /&gt;
|-&lt;br /&gt;
| Day of Defeat: Source&lt;br /&gt;
| Wl0u5B3F&lt;br /&gt;
|- &lt;br /&gt;
| Dystopia (1.2?)&lt;br /&gt;
| pH3apO8w&lt;br /&gt;
|-&lt;br /&gt;
| Dystopia 1.3 RC2&lt;br /&gt;
| G8stUh3F&lt;br /&gt;
|-&lt;br /&gt;
| Golden Eye Source&lt;br /&gt;
| Gr3naDes&lt;br /&gt;
|- &lt;br /&gt;
| Half-Life 2: Deathmatch&lt;br /&gt;
| x9Ke0BY7&lt;br /&gt;
|- &lt;br /&gt;
| Insurgency&lt;br /&gt;
| DrA5e3EB&lt;br /&gt;
|-&lt;br /&gt;
| Left 4 Dead 2 (VScript .nuc)&lt;br /&gt;
| SDhfi878&lt;br /&gt;
|-&lt;br /&gt;
| TF2 (items.ctx)&lt;br /&gt;
| A5fSXbf7&lt;br /&gt;
|- &lt;br /&gt;
| TF2 (everything else)&lt;br /&gt;
| E2NcUkG2&lt;br /&gt;
|- &lt;br /&gt;
| ZPS&lt;br /&gt;
| 5R0ni0pZ&lt;br /&gt;
|- &lt;br /&gt;
| Nuclear Dawn&lt;br /&gt;
| TA+*veh9&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Adding_Groups_(SourceMod)&amp;diff=8700</id>
		<title>Adding Groups (SourceMod)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Adding_Groups_(SourceMod)&amp;diff=8700"/>
		<updated>2012-09-20T22:42:46Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to add and configure groups through &amp;lt;tt&amp;gt;configs/admin_groups.cfg&amp;lt;/tt&amp;gt;.  This file is parsed and loaded via &amp;lt;tt&amp;gt;admin-flatfile.smx&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
Groups are a convenient method of applying similar properties and permissions to multiple administrators.  For example, let's say you wish for 15 administrators to all have the same permissions and immunity.  In this case, you'd set up a group for these admins, after which changing the permissions for all member admins can be done via one location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=File Format=&lt;br /&gt;
Groups are specified as blocks within a master &amp;quot;Group&amp;quot; block.  Each group must have a unique name.  If the name is not unique, the permissions will simply be extended/overwritten from the permissions of the existing group.  That is to say, if a group exists in both the config file and an external source (say, SQL), then the permissions will end up being combined/overwritten in the order of parsing. You can create and / or modify &amp;lt;tt&amp;gt;admin_groups.cfg&amp;lt;/tt&amp;gt; files with [http://forums.alliedmods.net/showthread.php?t=81160 KVManager].&lt;br /&gt;
&lt;br /&gt;
The group blocks appear in this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Groups&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;Group Name&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;[option1]&amp;quot;	&amp;quot;[value1]&amp;quot;&lt;br /&gt;
		&amp;quot;[option2]&amp;quot;	&amp;quot;[value2]&amp;quot;&lt;br /&gt;
		/* ... */&lt;br /&gt;
		&amp;quot;Overrides&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;[override1]&amp;quot;	&amp;quot;[allow|deny]&amp;quot;&lt;br /&gt;
			&amp;quot;[override2]&amp;quot;	&amp;quot;[allow|deny]&amp;quot;&lt;br /&gt;
			/* ... */&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All options are optional (that is, they do not need to be explicitly defined).  Similarly, the &amp;quot;Overrides&amp;quot; section is completely optional and may be omitted.  The full options list contains:&lt;br /&gt;
*&amp;lt;tt&amp;gt;flags&amp;lt;/tt&amp;gt;: Flag string that users of the group will inherit.&lt;br /&gt;
*&amp;lt;tt&amp;gt;immunity&amp;lt;/tt&amp;gt;: If a numerical value, specifies the immunity value users will inherit if higher than their current immunity value.  If preceded by an '@' symbol, then it specifies a group that the user will always be immune from.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Overrides&amp;quot; section allows specific commands or groups of commands to be completely allowed or denied to members of the group.  This is a very powerful section.  For example, you can opt to not give members the &amp;quot;map&amp;quot; flag, but allow them access to &amp;lt;tt&amp;gt;sm_map&amp;lt;/tt&amp;gt;.  Conversely, you could opt to give members the &amp;quot;map&amp;quot; flag, but deny them access to &amp;lt;tt&amp;gt;sm_map&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Command groups are explained further in the [[Overriding Command Access (SourceMod)]] article.&lt;br /&gt;
&lt;br /&gt;
Combined example of a group with overrides:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Groups&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;Basic Admin&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;flags&amp;quot;			&amp;quot;abc&amp;quot;	//reservation, generic admin, kick&lt;br /&gt;
		&amp;quot;immunity&amp;quot;		&amp;quot;1&amp;quot;	//low immunity value&lt;br /&gt;
&lt;br /&gt;
		&amp;quot;Overrides&amp;quot;&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;sm_map&amp;quot;	&amp;quot;allow&amp;quot;	//Let them use sm_map even without the flag&lt;br /&gt;
			&amp;quot;@CSDM&amp;quot;		&amp;quot;deny&amp;quot;	//deny any commands from the CSDM group&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Inheritance=&lt;br /&gt;
Groups cannot be nested; that is to say, one group cannot inherit permissions from another group.  However, an administrator can inherit any number of groups.  The permissions will be &amp;lt;tt&amp;gt;additive&amp;lt;/tt&amp;gt;, meaning that they will be assumed if and only if they result in more permissions being granted.&lt;br /&gt;
&lt;br /&gt;
For example, if a user has flags &amp;lt;tt&amp;gt;bcd&amp;lt;/tt&amp;gt; and a group assigns flags &amp;lt;tt&amp;gt;ae&amp;lt;/tt&amp;gt;, inheritance would result in that user having the flags &amp;lt;tt&amp;gt;abcde&amp;lt;/tt&amp;gt;.  Similarly, a group's immunity value will only be inherited if it is larger than the user's current immunity value.&lt;br /&gt;
&lt;br /&gt;
The only case this changes is with group-specific overrides.  If a command is specifically allowed to group A and denied in group B, and a user inherits both groups A and B, whether or not the user can use the command will depend on the order of inheritance.  If A is inherited first, the command will be allowed.  If B is inherited first, the command will be denied.&lt;br /&gt;
&lt;br /&gt;
Lastly, it is worth noting that once a user inherits permissions from a group, changes to the group will not affect the active permissions.  This is an optimization.  In order for changes to groups to affect that user, their administrative permissions must be entirely reset (either by a disconnect, or via &amp;lt;tt&amp;gt;sm_reloadadmins&amp;lt;/tt&amp;gt;, which effectively reloads all permissions anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Overriding Command Access (SourceMod)]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Documentation]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Adding_Groups_(SourceMod)&amp;diff=8686</id>
		<title>Adding Groups (SourceMod)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Adding_Groups_(SourceMod)&amp;diff=8686"/>
		<updated>2012-09-06T20:04:51Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to add and configure groups through &amp;lt;tt&amp;gt;configs/admin_groups.cfg&amp;lt;/tt&amp;gt;.  This file is parsed and loaded via &amp;lt;tt&amp;gt;admin-flatfile.smx&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
Groups are a convenient method of applying similar properties and permissions to multiple administrators.  For example, let's say you wish for 15 administrators to all have the same permissions and immunity.  In this case, you'd set up a group for these admins, after which changing the permissions for all member admins can be done via one location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=File Format=&lt;br /&gt;
Groups are specified as blocks within a master &amp;quot;Group&amp;quot; block.  Each group must have a unique name.  If the name is not unique, the permissions will simply be extended/overwritten from the permissions of the existing group.  That is to say, if a group exists in both the config file and an external source (say, SQL), then the permissions will end up being combined/overwritten in the order of parsing. You can create and / or modify &amp;lt;tt&amp;gt;admin_groups.cfg&amp;lt;/tt&amp;gt; files with [http://forums.alliedmods.net/showthread.php?t=81160 KVManager].&lt;br /&gt;
&lt;br /&gt;
The group blocks appear in this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Groups&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;Group Name&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;[option1]&amp;quot;	&amp;quot;[value1]&amp;quot;&lt;br /&gt;
		&amp;quot;[option2]&amp;quot;	&amp;quot;[value2]&amp;quot;&lt;br /&gt;
		/* ... */&lt;br /&gt;
		Overrides&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;[override1]&amp;quot;	&amp;quot;[allow|deny]&amp;quot;&lt;br /&gt;
			&amp;quot;[override2]&amp;quot;	&amp;quot;[allow|deny]&amp;quot;&lt;br /&gt;
			/* ... */&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All options are optional (that is, they do not need to be explicitly defined).  Similarly, the &amp;quot;Overrides&amp;quot; section is completely optional and may be omitted.  The full options list contains:&lt;br /&gt;
*&amp;lt;tt&amp;gt;flags&amp;lt;/tt&amp;gt;: Flag string that users of the group will inherit.&lt;br /&gt;
*&amp;lt;tt&amp;gt;immunity&amp;lt;/tt&amp;gt;: If a numerical value, specifies the immunity value users will inherit if higher than their current immunity value.  If preceded by an '@' symbol, then it specifies a group that the user will always be immune from.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Overrides&amp;quot; section allows specific commands or groups of commands to be completely allowed or denied to members of the group.  This is a very powerful section.  For example, you can opt to not give members the &amp;quot;map&amp;quot; flag, but allow them access to &amp;lt;tt&amp;gt;sm_map&amp;lt;/tt&amp;gt;.  Conversely, you could opt to give members the &amp;quot;map&amp;quot; flag, but deny them access to &amp;lt;tt&amp;gt;sm_map&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Command groups are explained further in the [[Overriding Command Access (SourceMod)]] article.&lt;br /&gt;
&lt;br /&gt;
Combined example of a group with overrides:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Groups&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;Basic Admin&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;flags&amp;quot;			&amp;quot;abc&amp;quot;	//reservation, generic admin, kick&lt;br /&gt;
		&amp;quot;immunity&amp;quot;		&amp;quot;1&amp;quot;	//low immunity value&lt;br /&gt;
&lt;br /&gt;
		Overrides&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;sm_map&amp;quot;	&amp;quot;allow&amp;quot;	//Let them use sm_map even without the flag&lt;br /&gt;
			&amp;quot;@CSDM&amp;quot;		&amp;quot;deny&amp;quot;	//deny any commands from the CSDM group&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Inheritance=&lt;br /&gt;
Groups cannot be nested; that is to say, one group cannot inherit permissions from another group.  However, an administrator can inherit any number of groups.  The permissions will be &amp;lt;tt&amp;gt;additive&amp;lt;/tt&amp;gt;, meaning that they will be assumed if and only if they result in more permissions being granted.&lt;br /&gt;
&lt;br /&gt;
For example, if a user has flags &amp;lt;tt&amp;gt;bcd&amp;lt;/tt&amp;gt; and a group assigns flags &amp;lt;tt&amp;gt;ae&amp;lt;/tt&amp;gt;, inheritance would result in that user having the flags &amp;lt;tt&amp;gt;abcde&amp;lt;/tt&amp;gt;.  Similarly, a group's immunity value will only be inherited if it is larger than the user's current immunity value.&lt;br /&gt;
&lt;br /&gt;
The only case this changes is with group-specific overrides.  If a command is specifically allowed to group A and denied in group B, and a user inherits both groups A and B, whether or not the user can use the command will depend on the order of inheritance.  If A is inherited first, the command will be allowed.  If B is inherited first, the command will be denied.&lt;br /&gt;
&lt;br /&gt;
Lastly, it is worth noting that once a user inherits permissions from a group, changes to the group will not affect the active permissions.  This is an optimization.  In order for changes to groups to affect that user, their administrative permissions must be entirely reset (either by a disconnect, or via &amp;lt;tt&amp;gt;sm_reloadadmins&amp;lt;/tt&amp;gt;, which effectively reloads all permissions anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
*[[Overriding Command Access (SourceMod)]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Documentation]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Timers_(SourceMod_Scripting)&amp;diff=8607</id>
		<title>Timers (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Timers_(SourceMod_Scripting)&amp;diff=8607"/>
		<updated>2012-07-18T16:38:54Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Reset the static var, if you want to rerun the timer!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Timers in [[SourceMod]] are timed events that occur once or repeatedly at a given interval.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
Timers allow you to set an interval, a function to use as the event callback, and an optional Handle to pass through the callback.  This is useful for saving data asynchronously.&lt;br /&gt;
&lt;br /&gt;
All timer functions are in &amp;lt;tt&amp;gt;plugins/include/timers.inc&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
=Basic Usage=&lt;br /&gt;
==One-Time Timers==&lt;br /&gt;
One-time timers are timers that only execute once.  An example of a one-time timer might look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(5.0, LoadStuff)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:LoadStuff(Handle:timer)&lt;br /&gt;
{&lt;br /&gt;
	PrintToServer(&amp;quot;Loading stuff!&amp;quot;)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code will print &amp;quot;Loading stuff!&amp;quot; to the server console five seconds after the map loads.  The return value has no meaning for one-time timers.&lt;br /&gt;
&lt;br /&gt;
==Repeatable Timers==&lt;br /&gt;
Repeatable timers execute infinitely many times, once every interval.  Based on the return value, they either continue or cancel.&lt;br /&gt;
&lt;br /&gt;
For example, say you want to display a message five times, once every three seconds:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
someFunction()&lt;br /&gt;
{&lt;br /&gt;
	CreateTimer(3.0, Timer_PrintMessageFiveTimes, _, TIMER_REPEAT);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:Timer_PrintMessageFiveTimes(Handle:timer)&lt;br /&gt;
{&lt;br /&gt;
	// Create a global variable visible only in the local scope (this function).&lt;br /&gt;
	static numPrinted = 0;&lt;br /&gt;
&lt;br /&gt;
	if (numPrinted &amp;gt;= 5) {&lt;br /&gt;
		numPrinted = 0;&lt;br /&gt;
		return Plugin_Stop;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	PrintToServer(&amp;quot;Warning! This is a message.&amp;quot;);&lt;br /&gt;
	numPrinted++;&lt;br /&gt;
&lt;br /&gt;
	return Plugin_Continue;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;Plugin_Stop&amp;lt;/tt&amp;gt; stops the timer, and &amp;lt;tt&amp;gt;Plugin_Continue&amp;lt;/tt&amp;gt; allows it to continue repeating.&lt;br /&gt;
&lt;br /&gt;
=Passing Data=&lt;br /&gt;
==Simple Values==&lt;br /&gt;
As mentioned earlier, timers let you pass values on to the callback function.  This value can be any type.  For example, let's say we want to print a message to a player fifteen seconds after they connect.  However, we want to cancel the timer if the player disconnects.  Implementing this is very easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Handle:WelcomeTimers[MAXPLAYERS+1]&lt;br /&gt;
&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	WelcomeTimers[client] = CreateTimer(15.0, WelcomePlayer, client)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnClientDisconnect(client)&lt;br /&gt;
{&lt;br /&gt;
	if (WelcomeTimers[client] != INVALID_HANDLE)&lt;br /&gt;
	{&lt;br /&gt;
		KillTimer(WelcomeTimers[client])&lt;br /&gt;
		WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, any:client)&lt;br /&gt;
{&lt;br /&gt;
	PrintToConsole(client, &amp;quot;Welcome to the server!&amp;quot;)&lt;br /&gt;
	WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Handles==&lt;br /&gt;
If you want to pass a Handle as a value, you have the option of using &amp;lt;tt&amp;gt;TIMER_HNDL_CLOSE&amp;lt;/tt&amp;gt;, which will automatically call &amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; for you once the timer dies.  &lt;br /&gt;
&lt;br /&gt;
==Data Packs==&lt;br /&gt;
Data packs are packable structures that can be used to hold asynchronous data (data that must be saved and unpacked for later).  They are especially useful for timers, and thus there exists a helper function, called &amp;lt;tt&amp;gt;CreateDataTimer()&amp;lt;/tt&amp;gt;, which creates a timer using a data pack handle.  The handle is created and closed automatically for you.&lt;br /&gt;
&lt;br /&gt;
The above example could be rewritten as:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Handle:WelcomeTimers[MAXPLAYERS+1]&lt;br /&gt;
&lt;br /&gt;
public OnClientPutInServer(client)&lt;br /&gt;
{&lt;br /&gt;
	new Handle:pack&lt;br /&gt;
	WelcomeTimers[client] = CreateDataTimer(15.0, WelcomePlayer, pack)&lt;br /&gt;
	WritePackCell(pack, client)&lt;br /&gt;
	WritePackString(pack, &amp;quot;Welcome to the server!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public OnClientDisconnect(client)&lt;br /&gt;
{&lt;br /&gt;
	if (WelcomeTimers[client] != INVALID_HANDLE)&lt;br /&gt;
	{&lt;br /&gt;
		KillTimer(WelcomeTimers[client])&lt;br /&gt;
		WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:WelcomePlayer(Handle:timer, Handle:pack)&lt;br /&gt;
{&lt;br /&gt;
	decl String:str[128]&lt;br /&gt;
	new client&lt;br /&gt;
&lt;br /&gt;
	/* Set to the beginning and unpack it */&lt;br /&gt;
	ResetPack(pack)&lt;br /&gt;
	client = ReadPackCell(pack)&lt;br /&gt;
	ReadPackString(pack, str, sizeof(str))&lt;br /&gt;
&lt;br /&gt;
	PrintToConsole(client, &amp;quot;%s&amp;quot;, str)&lt;br /&gt;
	WelcomeTimers[client] = INVALID_HANDLE&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
==Accuracy==&lt;br /&gt;
The smallest possible interval is 0.1 seconds.  Timers have high precision (floating point) but low accuracy, as the current time is based on the in-game tick count, not the system clock.  This has two implications:&lt;br /&gt;
*If the server is paused (not ticking), timers will not run.&lt;br /&gt;
*The server will not always tick at an exact interval.  &lt;br /&gt;
&lt;br /&gt;
For example, a 1.234 second interval timer starting from time &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt; might not tick until &amp;lt;tt&amp;gt;t+1.242&amp;lt;/tt&amp;gt; at a tickrate of 66 ticks per second.&lt;br /&gt;
&lt;br /&gt;
==Timer Death==&lt;br /&gt;
All timers are guaranteed to die either by:&lt;br /&gt;
*&amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; being called (or on plugin unload);&lt;br /&gt;
*&amp;lt;tt&amp;gt;KillTimer()&amp;lt;/tt&amp;gt; being called;&lt;br /&gt;
*&amp;lt;tt&amp;gt;Plugin_Stop&amp;lt;/tt&amp;gt; being returned from a repeatable timer;&lt;br /&gt;
*&amp;lt;tt&amp;gt;TriggerTimer()&amp;lt;/tt&amp;gt; being called on a one-time timer;&lt;br /&gt;
*Execution of a one-time timer finishes.&lt;br /&gt;
&lt;br /&gt;
When a timer dies, if &amp;lt;tt&amp;gt;TIMER_HNDL_CLOSE&amp;lt;/tt&amp;gt; is set, the Handle will always be closed with the permissions that &amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt; uses by default.  Since timers cannot be cloned, there should be no ownership issues.&lt;br /&gt;
&lt;br /&gt;
==Changing Intervals==&lt;br /&gt;
The interval of a timer cannot be changed as of this writing.  The timer must be killed and a new one created.&lt;br /&gt;
&lt;br /&gt;
==AMX Mod X==&lt;br /&gt;
Unlike [[AMX Mod X]]'s &amp;lt;tt&amp;gt;set_task&amp;lt;/tt&amp;gt; function, you cannot pass arrays using &amp;lt;tt&amp;gt;CreateTimer&amp;lt;/tt&amp;gt;.  To accomplish this, you should use the data pack functionality explained above.&lt;br /&gt;
&lt;br /&gt;
Similarly, there are no flags for counted repeats (non-infinite loops) or timers based on the map start or end.  These must be done manually.&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=130 On Timer Design, Part 3] (SourceMod DevLog)&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=119 On Timer Design, Part 2] (SourceMod DevLog)&lt;br /&gt;
*[http://www.sourcemod.net/devlog/?p=118 On Timer Design, Part 1] (SourceMod DevLog)&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
&lt;br /&gt;
{{LanguageSwitch}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=8391</id>
		<title>Nuclear Dawn Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=8391"/>
		<updated>2012-02-03T11:11:40Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Refer back to [[Game Events (Source)]] for more events.''&lt;br /&gt;
&lt;br /&gt;
=== player_death ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_death|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who died}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name killed used}}&lt;br /&gt;
{{hl2msg|short|weaponid|weapon id}}&lt;br /&gt;
{{hl2msg|long|damagebits|bits}}&lt;br /&gt;
{{hl2msg|long|customkill|custom bits}}&lt;br /&gt;
{{hl2msg|short|priority|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_hurt ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_hurt|string}}&lt;br /&gt;
{{hl2msg|1|local|Not networked}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who was hurt}}&lt;br /&gt;
{{hl2msg|short|attacker|user id who attacked}}&lt;br /&gt;
{{hl2msg|short|health|remaining health points}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name attacker used, if not the world}}&lt;br /&gt;
{{hl2msg|short|dmg_health|damage done to health}}&lt;br /&gt;
{{hl2msg|byte|hitgroup|hitgroup that was damaged}}&lt;br /&gt;
{{hl2msg|long|type|damage type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_changeclass ===&lt;br /&gt;
{{qnotice|Called when a player changes class}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_changeclass|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|class|}}&lt;br /&gt;
{{hl2msg|short|subclass|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spec_target_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spec_target_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== achievement_earned ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|achievement_earned|string}}&lt;br /&gt;
{{hl2msg|short|player|}}&lt;br /&gt;
{{hl2msg|short|achievement|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_spawned_at_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_spawned_at_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_death ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_death|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|team|the team the structure belonged to}}&lt;br /&gt;
{{hl2msg|short|entindex|The entidx of the structure}}&lt;br /&gt;
{{hl2msg|short|attacker|userid of attacking player}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name the attacker used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_damage_sparse ===&lt;br /&gt;
{{qnotice|is only fired for every 100hp taken. no spamz here}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_damage_sparse|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of structure being damaged}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that owns the structure - Todo: optimize this out!}}&lt;br /&gt;
{{hl2msg|bool|bunker|was it the bunker?}}&lt;br /&gt;
{{hl2msg|local|userid|user id that damaged the structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_sold ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_sold|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|ownerteam|the team the structure belonged to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_auto_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp using auto repair}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_auto_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_man_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp by supports}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_man_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{hl2msg|local|userid|user id that repaired the sturcture}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_built ===&lt;br /&gt;
{{qnotice|structure fully built. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_built|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_power_outage ===&lt;br /&gt;
{{qnotice|structure out of power. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_power_outage|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_start_capture ===&lt;br /&gt;
{{qnotice|Used to show the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_start_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point getting capped}}&lt;br /&gt;
{{hl2msg|short|type|type of resource point}}&lt;br /&gt;
{{hl2msg|short|capteam|team that is capping}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that currently owns the point (check for unassigned)}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_end_capture ===&lt;br /&gt;
{{qnotice|Used to hide the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_end_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that got captured}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_break_capture ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_break_capture|string}}&lt;br /&gt;
{{hl2msg|short|entindex|}}&lt;br /&gt;
{{hl2msg|float|time_remaining|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_extract ===&lt;br /&gt;
{{qnotice|Resource point has extracted some resources}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_extract|string}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that extracted the resources}}&lt;br /&gt;
{{hl2msg|short|amount|resource point that extracted the resources}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_captured ===&lt;br /&gt;
{{qnotice|When a resource point gets fully captured by a team}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_captured|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of the captrd point}}&lt;br /&gt;
{{hl2msg|short|type|the resource point type that got captured}}&lt;br /&gt;
{{hl2msg|short|team|team that captured the point}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_requested ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_requested|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_removed ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_removed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_updated ===&lt;br /&gt;
{{qnotice|When the power nexus gets updated}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_pregame ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_pregame|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== blueprint_update ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|blueprint_update|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|blueprint|The blueprint that is updated}}&lt;br /&gt;
{{hl2msg|short|state|1 = earned, 0 = not earned..}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== exit_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|exit_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_freezepanel|string}}&lt;br /&gt;
{{hl2msg|short|killer|entindex of the killer entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_freezepanel|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== freezecam_started ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|freezecam_started|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spawn_map_changed ===&lt;br /&gt;
{{qnotice|Called when a tgate is built, removed, or power state changes}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spawn_map_changed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== overviewmap_key_released ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|overviewmap_key_released|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== slot_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|slot_key_pressed|string}}&lt;br /&gt;
{{hl2msg|short|slot|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ironsight_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ironsight_key_pressed|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ability_key_pressed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ability_key_pressed|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_reload ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_reload|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|bool|manual|player manually started the reload}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_fire_at_40 ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_fire_at_40|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|weapon|used weapon name}}&lt;br /&gt;
{{hl2msg|short|weaponid|used weapon ID}}&lt;br /&gt;
{{hl2msg|short|count|number of bullets}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== entity_visible ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|entity_visible|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who sees the entity}}&lt;br /&gt;
{{hl2msg|long|subject|Entindex of the entity they see}}&lt;br /&gt;
{{hl2msg|string|classname|Classname of the entity they see}}&lt;br /&gt;
{{hl2msg|string|entityname|name of the entity they see}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who left the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they left}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who entered the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they entered}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who entered commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_enter_commander_mode_failed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_enter_commander_mode_failed|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who tried to enter commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who left commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_restocked_from_supply_struct ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_restocked_from_supply_struct|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who was restocked}}&lt;br /&gt;
{{hl2msg|short|entidx|Entity they got supply from}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_opened_armoury_menu ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_opened_armoury_menu|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player opened kit menu from armoury}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_2d ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_2d|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_z ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_z|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera up/down}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_minimap_move ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_minimap_move|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_exited_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_exited_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player that left the gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_left_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_left_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that left valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_entered_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_entered_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that entered valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== round_win ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|round_win|string}}&lt;br /&gt;
{{hl2msg|short|team|The winning team}}&lt;br /&gt;
{{hl2msg|short|type|Type of win}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== transport_gate_created ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|transport_gate_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team that created the gate}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the new gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== last_tgate_destroyed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|last_tgate_destroyed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team who's last tgate got pwnd}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_stats_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_stats_updated|string}}&lt;br /&gt;
{{hl2msg|bool|forceupload|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== failed_to_build ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|failed_to_build|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|the commander that tried to build something with no power}}&lt;br /&gt;
{{hl2msg|short|reason|(eBuildErrorReason) 0: Ok, 1: No Power, 2: No Line of sight, 3: obstruction, 4: invalid build area}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_hint_closed ===&lt;br /&gt;
{{qnotice|The local commander closed a hint (used to re-evaluate tiered hints)}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_hint_closed|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_selected_structure ===&lt;br /&gt;
{{qnotice|The local commander selected a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_selected_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the selected structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_start ===&lt;br /&gt;
{{qnotice|Causes the assembler to flash}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_stop ===&lt;br /&gt;
{{qnotice|Causes the assembler to stop flashing}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_build_mode ===&lt;br /&gt;
{{qnotice|Local commander is in structure placement mode}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_build_mode|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_start ===&lt;br /&gt;
{{qnotice|Start flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_stop ===&lt;br /&gt;
{{qnotice|Stop flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_structure_build ===&lt;br /&gt;
{{qnotice|Start a structure building}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_structure_build|string}}&lt;br /&gt;
{{hl2msg|short|team|The team that is building the structure}}&lt;br /&gt;
{{hl2msg|short|type|The structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== promoted_to_commander ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|promoted_to_commander|string}}&lt;br /&gt;
{{hl2msg|short|userid|The user that got promoted to commander}}&lt;br /&gt;
{{hl2msg|short|teamid|The team of the promoted commander}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10m ===&lt;br /&gt;
{{qnotice|10 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5m ===&lt;br /&gt;
{{qnotice|5 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_1m ===&lt;br /&gt;
{{qnotice|1 minute left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_1m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_30s ===&lt;br /&gt;
{{qnotice|30 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_30s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10s ===&lt;br /&gt;
{{qnotice|10 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5s ===&lt;br /&gt;
{{qnotice|5 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_hospital_duty_progress ===&lt;br /&gt;
{{qnotice|progress towards hospital duty achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_hospital_duty_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_high_maintenance_progress ===&lt;br /&gt;
{{qnotice|progress towards high maintenance achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_high_maintenance_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== forward_spawn_created ===&lt;br /&gt;
{{qnotice|Fired once a forward spawn has been created. A forward spawn is defined by any created spawn point that causes the spawn cluster centroid to be split}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|forward_spawn_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== research_comlete ===&lt;br /&gt;
{{qnotice|Fired when a research has finished researching}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|research_comlete|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{hl2msg|short|researchid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_annotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_annotation|string}}&lt;br /&gt;
{{hl2msg|float|worldPosX|}}&lt;br /&gt;
{{hl2msg|float|worldPosY|}}&lt;br /&gt;
{{hl2msg|float|worldPosZ|}}&lt;br /&gt;
{{hl2msg|float|worldNormalX|}}&lt;br /&gt;
{{hl2msg|float|worldNormalY|}}&lt;br /&gt;
{{hl2msg|float|worldNormalZ|}}&lt;br /&gt;
{{hl2msg|long|id|}}&lt;br /&gt;
{{hl2msg|string|text|name (unlocalized)}}&lt;br /&gt;
{{hl2msg|float|lifetime|}}&lt;br /&gt;
{{hl2msg|long|visibilityBitfield|bitfield of the players that can see this}}&lt;br /&gt;
{{hl2msg|long|follow_entindex|if this is set, follow this entity}}&lt;br /&gt;
{{hl2msg|bool|show_distance|}}&lt;br /&gt;
{{hl2msg|string|play_sound|}}&lt;br /&gt;
{{hl2msg|bool|show_effect|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_annotation ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_annotation|string}}&lt;br /&gt;
{{hl2msg|long|id|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== end_training_session ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|end_training_session|string}}&lt;br /&gt;
{{hl2msg|string|course|}}&lt;br /&gt;
{{hl2msg|bool|successful|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== nav_generate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|nav_generate|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== medkit_heal ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|medkit_heal|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|local|entindex|entity index of medkit}}&lt;br /&gt;
{{hl2msg|local|ownerid|user id of medkit owner}}&lt;br /&gt;
{{hl2msg|local|userid|user id of player healed}}&lt;br /&gt;
{{hl2msg|local|amount|amount of health restored}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== emp_structure ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|emp_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|local|entindex|entity index of structure}}&lt;br /&gt;
{{hl2msg|local|userid|user id of player}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Counter-Strike:_Source_Events&amp;diff=8385</id>
		<title>Counter-Strike: Source Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Counter-Strike:_Source_Events&amp;diff=8385"/>
		<updated>2012-01-07T10:50:46Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Refer back to [[Game Events (Source)]] for more events.''&lt;br /&gt;
&lt;br /&gt;
All cstrike mod events can be found in cstrike\resource\modevents.res&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== player_death ===&lt;br /&gt;
{{qnotice|When a client dies}}&lt;br /&gt;
{{begin-hl2msg|player_death|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who died}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name killer used }}&lt;br /&gt;
{{hl2msg|bool|headshot|singals a headshot}}&lt;br /&gt;
{{hl2msg|short|dominated|did killer dominate victim with this kill}}&lt;br /&gt;
{{hl2msg|short|revenge|did killer get revenge on victim with this kill}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_hurt ===&lt;br /&gt;
{{qnotice|When a client is damaged}}&lt;br /&gt;
{{begin-hl2msg|player_hurt|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who was hurt}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who attacked}}&lt;br /&gt;
{{hl2msg|byte|health|remaining health points}}&lt;br /&gt;
{{hl2msg|byte|armor|remaining armor points}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name attacker used, if not the world}}&lt;br /&gt;
{{hl2msg|byte|dmg_health|damage done to health}}&lt;br /&gt;
{{hl2msg|byte|dmg_armor|damage done to armor}}&lt;br /&gt;
{{hl2msg|byte|hitgroup|hitgroup that was damaged}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_beginplant ===&lt;br /&gt;
{{qnotice|When the bomb is starting to get planted}}&lt;br /&gt;
{{begin-hl2msg|bomb_beginplant|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who is planting the bomb}}&lt;br /&gt;
{{hl2msg|short|site|bombsite index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_abortplant ===&lt;br /&gt;
{{qnotice|When the bomb planter stops planting the bomb}}&lt;br /&gt;
{{begin-hl2msg|bomb_abortplant|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who is planting the bomb}}&lt;br /&gt;
{{hl2msg|short|site|bombsite index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_planted ===&lt;br /&gt;
{{qnotice|When the bomb has been planted}}&lt;br /&gt;
{{begin-hl2msg|bomb_planted|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who planted the bomb}}&lt;br /&gt;
{{hl2msg|short|site|bombsite index}}&lt;br /&gt;
{{hl2msg|short|posx|position x}}&lt;br /&gt;
{{hl2msg|short|posy|position y}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_defused ===&lt;br /&gt;
{{qnotice|When the bomb has been defused}}&lt;br /&gt;
{{begin-hl2msg|bomb_defused|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who defused the bomb}}&lt;br /&gt;
{{hl2msg|short|site|bombsite index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_exploded ===&lt;br /&gt;
{{qnotice|When the bomb explodes}}&lt;br /&gt;
{{begin-hl2msg|bomb_exploded|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who planted the bomb}}&lt;br /&gt;
{{hl2msg|short|site|bombsite index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_dropped ===&lt;br /&gt;
{{qnotice|When the bomb is dropped by a client}}&lt;br /&gt;
{{begin-hl2msg|bomb_dropped|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who dropped the bomb}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_pickup ===&lt;br /&gt;
{{qnotice|When the bomb is picked up by a client}}&lt;br /&gt;
{{begin-hl2msg|bomb_pickup|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who picked up the bomb}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_begindefuse ===&lt;br /&gt;
{{qnotice|When the bomb is started to be defused}}&lt;br /&gt;
{{begin-hl2msg|bomb_begindefuse|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who is defusing}}&lt;br /&gt;
{{hl2msg|bool|haskit|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_abortdefuse ===&lt;br /&gt;
{{qnotice|When the bomb defusal is stopped}}&lt;br /&gt;
{{begin-hl2msg|bomb_abortdefuse|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who was defusing}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_follows ===&lt;br /&gt;
{{qnotice|When the hostage begins following a client}}&lt;br /&gt;
{{begin-hl2msg|hostage_follows|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who touched the hostage}}&lt;br /&gt;
{{hl2msg|short|hostage|hostage entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_hurt ===&lt;br /&gt;
{{qnotice|When a hostage is damaged}}&lt;br /&gt;
{{begin-hl2msg|hostage_hurt|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who hurt the hostage}}&lt;br /&gt;
{{hl2msg|short|hostage|hostage entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_killed ===&lt;br /&gt;
{{qnotice|When a hostage is killed}}&lt;br /&gt;
{{begin-hl2msg|hostage_killed|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who killed the hostage}}&lt;br /&gt;
{{hl2msg|short|hostage|hostage entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_rescued ===&lt;br /&gt;
{{qnotice|When a hostage is rescued}}&lt;br /&gt;
{{begin-hl2msg|hostage_rescued|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who rescued the hostage}}&lt;br /&gt;
{{hl2msg|short|hostage|hostage entity index}}&lt;br /&gt;
{{hl2msg|short|site|rescue site index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_stops_following ===&lt;br /&gt;
{{qnotice|When a hostage stops following a client}}&lt;br /&gt;
{{begin-hl2msg|hostage_stops_following|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who rescued the hostage}}&lt;br /&gt;
{{hl2msg|short|hostage|hostage entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_rescued_all ===&lt;br /&gt;
{{qnotice|When all the hostages are rescued}}&lt;br /&gt;
{{begin-hl2msg|hostage_rescued_all|string}}&lt;br /&gt;
{{hl2msg|''none''|''none''|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_call_for_help ===&lt;br /&gt;
{{qnotice|When the hostage calls for help}}&lt;br /&gt;
{{begin-hl2msg|hostage_call_for_help|string}}&lt;br /&gt;
{{hl2msg|short|hostage|hostage entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== vip_escaped ===&lt;br /&gt;
{{qnotice|When the VIP escapes}}&lt;br /&gt;
{{begin-hl2msg|vip_escaped|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who was the VIP}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== vip_killed ===&lt;br /&gt;
{{qnotice|When the VIP is killed}}&lt;br /&gt;
{{begin-hl2msg|vip_killed|string}}&lt;br /&gt;
{{hl2msg|short|userid|player who was the VIP}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed the VIP}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_radio ===&lt;br /&gt;
{{qnotice|When the player uses radio commands}}&lt;br /&gt;
{{begin-hl2msg|player_radio|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|slot|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_beep ===&lt;br /&gt;
{{qnotice|Every time the bomb beep sound happens}}&lt;br /&gt;
{{begin-hl2msg|bomb_beep|string}}&lt;br /&gt;
{{hl2msg|long|entindex|c4 entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_fire ===&lt;br /&gt;
{{qnotice|Every time a client fires their weapon}}&lt;br /&gt;
{{begin-hl2msg|weapon_fire|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_fire_on_empty ===&lt;br /&gt;
{{qnotice|Every time a client fires their weapon and it's empty}}&lt;br /&gt;
{{begin-hl2msg|weapon_fire_on_empty|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_reload ===&lt;br /&gt;
{{qnotice|Every time a client reloads their weapon}}&lt;br /&gt;
{{begin-hl2msg|weapon_reload|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_zoom ===&lt;br /&gt;
{{qnotice|Every time a client zooms a scoped weapon}}&lt;br /&gt;
{{begin-hl2msg|weapon_zoom|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== item_pickup ===&lt;br /&gt;
{{qnotice|Every time an item is picked up (generally weapons)}}&lt;br /&gt;
{{begin-hl2msg|item_pickup|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|item|either a weapon such as 'tmp' or 'hegrenade', or an item such as 'nvgs'}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== grenade_bounce ===&lt;br /&gt;
{{qnotice|Every time a grenade bounces}}&lt;br /&gt;
{{begin-hl2msg|grenade_bounce|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hegrenade_detonate ===&lt;br /&gt;
{{qnotice|Every time a hegrenade explodes}}&lt;br /&gt;
{{begin-hl2msg|hegrenade_detonate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|float|x|}}&lt;br /&gt;
{{hl2msg|float|y|}}&lt;br /&gt;
{{hl2msg|float|z|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== flashbang_detonate ===&lt;br /&gt;
{{qnotice|Every time a flashbang detonates}}&lt;br /&gt;
{{begin-hl2msg|flashbang_detonate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|float|x|}}&lt;br /&gt;
{{hl2msg|float|y|}}&lt;br /&gt;
{{hl2msg|float|z|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== smokegrenade_detonate ===&lt;br /&gt;
{{qnotice|Every time a smokegrenade detonates}}&lt;br /&gt;
{{begin-hl2msg|smokegrenade_detonate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|float|x|}}&lt;br /&gt;
{{hl2msg|float|y|}}&lt;br /&gt;
{{hl2msg|float|z|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bullet_impact ===&lt;br /&gt;
{{qnotice|Every time a bullet hits something}}&lt;br /&gt;
{{begin-hl2msg|bullet_impact}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|float|x|}}&lt;br /&gt;
{{hl2msg|float|y|}}&lt;br /&gt;
{{hl2msg|float|z|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_footstep ===&lt;br /&gt;
{{qnotice|Every time a player takes a step}}&lt;br /&gt;
{{begin-hl2msg|player_footstep|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_jump ===&lt;br /&gt;
{{qnotice|Every time a player jumps}}&lt;br /&gt;
{{begin-hl2msg|player_jump|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_blind ===&lt;br /&gt;
{{qnotice|Every time a player is blinded by a flashbang}}&lt;br /&gt;
{{begin-hl2msg|player_blind|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_falldamage ===&lt;br /&gt;
{{qnotice|Every time a player takes damage due to a fall}}&lt;br /&gt;
{{begin-hl2msg|player_falldamage|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|float|damage|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== door_moving ===&lt;br /&gt;
{{qnotice|Every time a door is put in motion (opened)}}&lt;br /&gt;
{{begin-hl2msg|door_moving|string}}&lt;br /&gt;
{{hl2msg|long|entindex|}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== round_freeze_end ===&lt;br /&gt;
{{qnotice|When the round's mp_freezetime is up}}&lt;br /&gt;
{{begin-hl2msg|round_freeze_end|string}}&lt;br /&gt;
{{hl2msg|''none''|''none''|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== nav_blocked ===&lt;br /&gt;
{{qnotice|''Guess: Called when an area is blocked by the nav of a map''}}&lt;br /&gt;
{{begin-hl2msg|nav_blocked|string}}&lt;br /&gt;
{{hl2msg|long|area|}}&lt;br /&gt;
{{hl2msg|bool|blocked|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== nav_generate ===&lt;br /&gt;
{{qnotice|Called when a nav file does not exist for a map and bots are added}}&lt;br /&gt;
{{begin-hl2msg|nav_generate|string}}&lt;br /&gt;
{{hl2msg|''none''|''none''|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_stats_updated ===&lt;br /&gt;
{{qnotice|''Guess: Called when the player stats (achievments) are sent to valve''}}&lt;br /&gt;
{{begin-hl2msg|player_stats_updated|string}}&lt;br /&gt;
{{hl2msg|bool|forceupload|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== spec_target_updated ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|spec_target_updated|string}}&lt;br /&gt;
{{hl2msg|''none''|''none''|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== cs_win_panel_round ===&lt;br /&gt;
{{qnotice|Called at the end of a round}}&lt;br /&gt;
{{begin-hl2msg|cs_win_panel_round|string}}&lt;br /&gt;
{{hl2msg|bool|show_timer_defend|}}&lt;br /&gt;
{{hl2msg|bool|show_timer_attack|}}&lt;br /&gt;
{{hl2msg|short|timer_time|}}&lt;br /&gt;
{{hl2msg|byte|final_event|defined in cs_gamerules.h}}&lt;br /&gt;
{{hl2msg|string|funfact_token|}}&lt;br /&gt;
{{hl2msg|short|funfact_player|}}&lt;br /&gt;
{{hl2msg|long|funfact_data1|}}&lt;br /&gt;
{{hl2msg|long|funfact_data2|}}&lt;br /&gt;
{{hl2msg|long|funfact_data3|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== cs_win_panel_match ===&lt;br /&gt;
{{qnotice|Called at the end of the map}}&lt;br /&gt;
{{begin-hl2msg|cs_win_panel_match|string}}&lt;br /&gt;
{{hl2msg|short|t_score|}}&lt;br /&gt;
{{hl2msg|short|ct_score|}}&lt;br /&gt;
{{hl2msg|float|t_kd|}}&lt;br /&gt;
{{hl2msg|float|ct_kd|}}&lt;br /&gt;
{{hl2msg|short|t_objectives_done|}}&lt;br /&gt;
{{hl2msg|short|ct_objectives_done|}}&lt;br /&gt;
{{hl2msg|long|t_money_earned|}}&lt;br /&gt;
{{hl2msg|long|ct_money_earned|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== show_freezepanel ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|show_freezepanel|string}}&lt;br /&gt;
{{hl2msg|short|killer|entindex of the killer entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hide_freezepanel ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|hide_freezepanel|string}}&lt;br /&gt;
{{hl2msg|''none''|''none''|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== freezecam_started ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|freezecam_started|string}}&lt;br /&gt;
{{hl2msg|''none''|''none''|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_avenged_teammate ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|player_avenged_teammate|string}}&lt;br /&gt;
{{hl2msg|short|avenger_id|}}&lt;br /&gt;
{{hl2msg|short|avenged_player_id|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== achievement_earned ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|achievement_earned|string}}&lt;br /&gt;
{{hl2msg|byte|player|entindex of the player}}&lt;br /&gt;
{{hl2msg|short|achievement|achievement ID}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== achievement_earned_local ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|achievement_earned_local|string}}&lt;br /&gt;
{{hl2msg|short|achievement|achievement ID}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== match_end_conditions ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|match_end_conditions|string}}&lt;br /&gt;
{{hl2msg|long|frags|}}&lt;br /&gt;
{{hl2msg|long|max_rounds|}}&lt;br /&gt;
{{hl2msg|long|win_rounds|}}&lt;br /&gt;
{{hl2msg|long|time|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== round_mvp ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|round_mvp|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|reason|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_decal ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|player_decal|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== teamplay_round_start ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|teamplay_round_start|string}}&lt;br /&gt;
{{hl2msg|bool|full_reset|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== christmas_gift_grab ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|christmas_gift_grab|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Vice_keys&amp;diff=8222</id>
		<title>Vice keys</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Vice_keys&amp;diff=8222"/>
		<updated>2011-09-02T18:07:23Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VICE keys are used to encrypt the game's weapon config files in an effort to make them more difficult to tamper with.  It's not really a great protection, as usually the key is just hardcoded into the server binaries.  Some games, such as Golden Eye Source, try to make it more difficult to retrieve these, but even then it's trivial.&lt;br /&gt;
&lt;br /&gt;
These keys can be used to decrypt the CTX files that many games provide.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;300&amp;quot;| Game&lt;br /&gt;
!width=&amp;quot;100&amp;quot;| Key&lt;br /&gt;
|-&lt;br /&gt;
| Counter-Strike: Source&lt;br /&gt;
| d7NSuLq2&lt;br /&gt;
|- &lt;br /&gt;
| CSPromod&lt;br /&gt;
| H1aRQ0n1&lt;br /&gt;
|-&lt;br /&gt;
| Day of Defeat: Source&lt;br /&gt;
| Wl0u5B3F&lt;br /&gt;
|- &lt;br /&gt;
| Dystopia (1.2?)&lt;br /&gt;
| pH3apO8w&lt;br /&gt;
|-&lt;br /&gt;
| Dystopia 1.3 RC2&lt;br /&gt;
| G8stUh3F&lt;br /&gt;
|-&lt;br /&gt;
| Golden Eye Source&lt;br /&gt;
| Gr3naDes&lt;br /&gt;
|- &lt;br /&gt;
| Half-Life 2: Deathmatch&lt;br /&gt;
| x9Ke0BY7&lt;br /&gt;
|- &lt;br /&gt;
| Insurgency&lt;br /&gt;
| DrA5e3EB&lt;br /&gt;
|-&lt;br /&gt;
| Left 4 Dead 2 (VScript .nuc)&lt;br /&gt;
| SDhfi878&lt;br /&gt;
|-&lt;br /&gt;
| TF2 (items.ctx)&lt;br /&gt;
| A5fSXbf7&lt;br /&gt;
|- &lt;br /&gt;
| TF2 (everything else)&lt;br /&gt;
| E2NcUkG2&lt;br /&gt;
|- &lt;br /&gt;
| ZPS&lt;br /&gt;
| 5R0ni0pZ&lt;br /&gt;
|- &lt;br /&gt;
| Nuclear Dawn&lt;br /&gt;
| TA+*veh9&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=8211</id>
		<title>Nuclear Dawn Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=8211"/>
		<updated>2011-08-26T02:21:40Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Refer back to [[Game Events (Source)]] for more events.''&lt;br /&gt;
&lt;br /&gt;
=== player_death ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_death|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who died}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name killed used}}&lt;br /&gt;
{{hl2msg|short|weaponid|weapon id}}&lt;br /&gt;
{{hl2msg|long|damagebits|bits}}&lt;br /&gt;
{{hl2msg|long|customkill|custom bits}}&lt;br /&gt;
{{hl2msg|short|priority|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_changeclass ===&lt;br /&gt;
{{qnotice|Called when a player changes class}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_changeclass|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|class|}}&lt;br /&gt;
{{hl2msg|short|subclass|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spec_target_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spec_target_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== achievement_earned ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|achievement_earned|string}}&lt;br /&gt;
{{hl2msg|short|player|}}&lt;br /&gt;
{{hl2msg|short|achievement|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_spawned_at_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_spawned_at_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_death ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_death|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|team|the team the structure belonged to}}&lt;br /&gt;
{{hl2msg|short|attacker|userid of attacking player}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name the attacker used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_damage_sparse ===&lt;br /&gt;
{{qnotice|is only fired for every 100hp taken. no spamz here}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_damage_sparse|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of structure being damaged}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that owns the structure - Todo: optimize this out!}}&lt;br /&gt;
{{hl2msg|bool|bunker|was it the bunker?}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_sold ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_sold|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|ownerteam|the team the structure belonged to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_auto_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp using auto repair}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_auto_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_man_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp by supports}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_man_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_built ===&lt;br /&gt;
{{qnotice|structure fully built. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_built|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_power_outage ===&lt;br /&gt;
{{qnotice|structure out of power. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_power_outage|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_start_capture ===&lt;br /&gt;
{{qnotice|Used to show the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_start_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point getting capped}}&lt;br /&gt;
{{hl2msg|short|type|type of resource point}}&lt;br /&gt;
{{hl2msg|short|capteam|team that is capping}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that currently owns the point (check for unassigned)}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_end_capture ===&lt;br /&gt;
{{qnotice|Used to hide the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_end_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that got captured}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_break_capture ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_break_capture|string}}&lt;br /&gt;
{{hl2msg|short|entindex|}}&lt;br /&gt;
{{hl2msg|float|time_remaining|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_extract ===&lt;br /&gt;
{{qnotice|Resource point has extracted some resources}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_extract|string}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that extracted the resources}}&lt;br /&gt;
{{hl2msg|short|amount|resource point that extracted the resources}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_captured ===&lt;br /&gt;
{{qnotice|When a resource point gets fully captured by a team}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_captured|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of the captrd point}}&lt;br /&gt;
{{hl2msg|short|type|the resource point type that got captured}}&lt;br /&gt;
{{hl2msg|short|team|team that captured the point}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_requested ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_requested|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_removed ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_removed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_updated ===&lt;br /&gt;
{{qnotice|When the power nexus gets updated}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_pregame ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_pregame|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== blueprint_update ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|blueprint_update|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|blueprint|The blueprint that is updated}}&lt;br /&gt;
{{hl2msg|short|state|1 = earned, 0 = not earned..}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== exit_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|exit_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_freezepanel|string}}&lt;br /&gt;
{{hl2msg|short|killer|entindex of the killer entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_freezepanel|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== freezecam_started ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|freezecam_started|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spawn_map_changed ===&lt;br /&gt;
{{qnotice|Called when a tgate is built, removed, or power state changes}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spawn_map_changed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_reload ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_reload|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|bool|manual|player manually started the reload}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_fire_at_40 ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_fire_at_40|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|weapon|used weapon name}}&lt;br /&gt;
{{hl2msg|short|weaponid|used weapon ID}}&lt;br /&gt;
{{hl2msg|short|count|number of bullets}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== entity_visible ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|entity_visible|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who sees the entity}}&lt;br /&gt;
{{hl2msg|long|subject|Entindex of the entity they see}}&lt;br /&gt;
{{hl2msg|string|classname|Classname of the entity they see}}&lt;br /&gt;
{{hl2msg|string|entityname|name of the entity they see}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who left the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they left}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who entered the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they entered}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who entered commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_enter_commander_mode_failed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_enter_commander_mode_failed|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who tried to enter commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who left commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_restocked_from_supply_struct ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_restocked_from_supply_struct|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who was restocked}}&lt;br /&gt;
{{hl2msg|short|entidx|Entity they got supply from}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_opened_armoury_menu ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_opened_armoury_menu|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player opened kit menu from armoury}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_2d ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_2d|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_z ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_z|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera up/down}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_minimap_move ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_minimap_move|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player that spawned}}&lt;br /&gt;
{{hl2msg|short|entidx|Gate they spawned at}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_exited_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_exited_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player that left the gate}}&lt;br /&gt;
{{hl2msg|short|entidx|Gate they left}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_left_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_left_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that left valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_entered_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_entered_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that entered valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== round_win ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|round_win|string}}&lt;br /&gt;
{{hl2msg|short|team|The winning team}}&lt;br /&gt;
{{hl2msg|short|type|Type of win}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== transport_gate_created ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|transport_gate_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team that created the gate}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the new gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== last_tgate_destroyed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|last_tgate_destroyed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team who's last tgate got pwnd}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_stats_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_stats_updated|string}}&lt;br /&gt;
{{hl2msg|bool|forceupload|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== failed_to_build ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|failed_to_build|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|the commander that tried to build something with no power}}&lt;br /&gt;
{{hl2msg|short|reason|(eBuildErrorReason) 0: Ok, 1: No Power, 2: No Line of sight, 3: obstruction, 4: invalid build area}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_hint_closed ===&lt;br /&gt;
{{qnotice|The local commander closed a hint (used to re-evaluate tiered hints)}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_hint_closed|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_selected_structure ===&lt;br /&gt;
{{qnotice|The local commander selected a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_selected_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the selected structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_start ===&lt;br /&gt;
{{qnotice|Causes the assembler to flash}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_stop ===&lt;br /&gt;
{{qnotice|Causes the assembler to stop flashing}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_build_mode ===&lt;br /&gt;
{{qnotice|Local commander is in structure placement mode}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_build_mode|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_start ===&lt;br /&gt;
{{qnotice|Start flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_stop ===&lt;br /&gt;
{{qnotice|Stop flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_structure_build ===&lt;br /&gt;
{{qnotice|Start a structure building}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_structure_build|string}}&lt;br /&gt;
{{hl2msg|short|team|The team that is building the structure}}&lt;br /&gt;
{{hl2msg|short|type|The structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== promoted_to_commander ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|promoted_to_commander|string}}&lt;br /&gt;
{{hl2msg|short|userid|The user that got promoted to commander}}&lt;br /&gt;
{{hl2msg|short|teamid|The team of the promoted commander}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10m ===&lt;br /&gt;
{{qnotice|10 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5m ===&lt;br /&gt;
{{qnotice|5 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_1m ===&lt;br /&gt;
{{qnotice|1 minute left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_1m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_30s ===&lt;br /&gt;
{{qnotice|30 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_30s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10s ===&lt;br /&gt;
{{qnotice|10 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5s ===&lt;br /&gt;
{{qnotice|5 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_hospital_duty_progress ===&lt;br /&gt;
{{qnotice|progress towards hospital duty achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_hospital_duty_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_high_maintenance_progress ===&lt;br /&gt;
{{qnotice|progress towards high maintenance achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_high_maintenance_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=8210</id>
		<title>Nuclear Dawn Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Nuclear_Dawn_Events&amp;diff=8210"/>
		<updated>2011-08-26T02:12:49Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: Created page with '=== player_death === {{qnotice|}}&amp;lt;br&amp;gt; {{begin-hl2msg|player_death|string}} {{hl2msg|short|userid|user ID who died}} {{hl2msg|short|attacker|user ID who killed}} {{hl2msg|string|w...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== player_death ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_death|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who died}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name killed used}}&lt;br /&gt;
{{hl2msg|short|weaponid|weapon id}}&lt;br /&gt;
{{hl2msg|long|damagebits|bits}}&lt;br /&gt;
{{hl2msg|long|customkill|custom bits}}&lt;br /&gt;
{{hl2msg|short|priority|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_changeclass ===&lt;br /&gt;
{{qnotice|Called when a player changes class}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_changeclass|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|class|}}&lt;br /&gt;
{{hl2msg|short|subclass|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spec_target_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spec_target_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== achievement_earned ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|achievement_earned|string}}&lt;br /&gt;
{{hl2msg|short|player|}}&lt;br /&gt;
{{hl2msg|short|achievement|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_spawned_at_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_spawned_at_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_death ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_death|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|team|the team the structure belonged to}}&lt;br /&gt;
{{hl2msg|short|attacker|userid of attacking player}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name the attacker used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_damage_sparse ===&lt;br /&gt;
{{qnotice|is only fired for every 100hp taken. no spamz here}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_damage_sparse|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of structure being damaged}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that owns the structure - Todo: optimize this out!}}&lt;br /&gt;
{{hl2msg|bool|bunker|was it the bunker?}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_sold ===&lt;br /&gt;
{{qnotice|fired when we sell a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_sold|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure sold}}&lt;br /&gt;
{{hl2msg|short|ownerteam|the team the structure belonged to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_auto_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp using auto repair}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_auto_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_fully_man_repaired ===&lt;br /&gt;
{{qnotice|fired when a damaged structure gets healed to 100% hp by supports}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_fully_man_repaired|string}}&lt;br /&gt;
{{hl2msg|short|type|type of structure repaired}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of repaired structure}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that the structure belongs to}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_built ===&lt;br /&gt;
{{qnotice|structure fully built. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_built|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== structure_power_outage ===&lt;br /&gt;
{{qnotice|structure out of power. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|structure_power_outage|string}}&lt;br /&gt;
{{hl2msg|short|entindex|structure entity index}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_start_capture ===&lt;br /&gt;
{{qnotice|Used to show the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_start_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point getting capped}}&lt;br /&gt;
{{hl2msg|short|type|type of resource point}}&lt;br /&gt;
{{hl2msg|short|capteam|team that is capping}}&lt;br /&gt;
{{hl2msg|short|ownerteam|team that currently owns the point (check for unassigned)}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_end_capture ===&lt;br /&gt;
{{qnotice|Used to hide the capture hud panel}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_end_capture|string}}&lt;br /&gt;
{{hl2msg|short|userid|user id that is starting the capture}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that got captured}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_break_capture ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_break_capture|string}}&lt;br /&gt;
{{hl2msg|short|entindex|}}&lt;br /&gt;
{{hl2msg|float|time_remaining|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_extract ===&lt;br /&gt;
{{qnotice|Resource point has extracted some resources}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_extract|string}}&lt;br /&gt;
{{hl2msg|short|entindex|resource point that extracted the resources}}&lt;br /&gt;
{{hl2msg|short|amount|resource point that extracted the resources}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== resource_captured ===&lt;br /&gt;
{{qnotice|When a resource point gets fully captured by a team}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|resource_captured|string}}&lt;br /&gt;
{{hl2msg|short|entindex|entity index of the captrd point}}&lt;br /&gt;
{{hl2msg|short|type|the resource point type that got captured}}&lt;br /&gt;
{{hl2msg|short|team|team that captured the point}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_requested ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_requested|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_removed ===&lt;br /&gt;
{{qnotice|An entity is requesting a power connection}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_removed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|entid|The entity index that is requesting a power connection}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== power_updated ===&lt;br /&gt;
{{qnotice|When the power nexus gets updated}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|power_updated|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_pregame ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_pregame|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== blueprint_update ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|blueprint_update|string}}&lt;br /&gt;
{{hl2msg|short|teamid|The team who's power system got updated}}&lt;br /&gt;
{{hl2msg|short|blueprint|The blueprint that is updated}}&lt;br /&gt;
{{hl2msg|short|state|1 = earned, 0 = not earned..}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== enter_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|enter_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== exit_vehicle ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|exit_vehicle|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|short|seat|}}&lt;br /&gt;
{{hl2msg|short|entidx|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== show_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|show_freezepanel|string}}&lt;br /&gt;
{{hl2msg|short|killer|entindex of the killer entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== hide_freezepanel ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|hide_freezepanel|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== freezecam_started ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|freezecam_started|string}}&lt;br /&gt;
{{hl2msg|None|None|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== spawn_map_changed ===&lt;br /&gt;
{{qnotice|Called when a tgate is built, removed, or power state changes}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|spawn_map_changed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_reload ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_reload|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|bool|manual|player manually started the reload}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== weapon_fire_at_40 ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|weapon_fire_at_40|string}}&lt;br /&gt;
{{hl2msg|short|userid|}}&lt;br /&gt;
{{hl2msg|string|weapon|used weapon name}}&lt;br /&gt;
{{hl2msg|short|weaponid|used weapon ID}}&lt;br /&gt;
{{hl2msg|short|count|number of bullets}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== entity_visible ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|entity_visible|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who sees the entity}}&lt;br /&gt;
{{hl2msg|long|subject|Entindex of the entity they see}}&lt;br /&gt;
{{hl2msg|string|classname|Classname of the entity they see}}&lt;br /&gt;
{{hl2msg|string|entityname|name of the entity they see}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who left the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they left}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_bunker_building ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_bunker_building|string}}&lt;br /&gt;
{{hl2msg|short|userid|The player who entered the bunker}}&lt;br /&gt;
{{hl2msg|short|entidx|The bunker they entered}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who entered commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_enter_commander_mode_failed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_enter_commander_mode_failed|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who tried to enter commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_left_commander_mode ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_left_commander_mode|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who left commander mode}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_restocked_from_supply_struct ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_restocked_from_supply_struct|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player who was restocked}}&lt;br /&gt;
{{hl2msg|short|entidx|Entity they got supply from}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_opened_armoury_menu ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_opened_armoury_menu|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player opened kit menu from armoury}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_2d ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_2d|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_move_z ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_move_z|string}}&lt;br /&gt;
{{hl2msg|1|local|Local only}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera up/down}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_minimap_move ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_minimap_move|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|Player that moved the commander camera}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_entered_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_entered_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player that spawned}}&lt;br /&gt;
{{hl2msg|short|entidx|Gate they spawned at}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_exited_tgate ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_exited_tgate|string}}&lt;br /&gt;
{{hl2msg|short|userid|Player that left the gate}}&lt;br /&gt;
{{hl2msg|short|entidx|Gate they left}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_left_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_left_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that left valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_entered_valid_area ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_entered_valid_area|string}}&lt;br /&gt;
{{hl2msg|short|userid|The commander that entered valid &amp;quot;airspace&amp;quot;}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== round_win ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|round_win|string}}&lt;br /&gt;
{{hl2msg|short|team|The winning team}}&lt;br /&gt;
{{hl2msg|short|type|Type of win}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== transport_gate_created ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|transport_gate_created|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team that created the gate}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the new gate}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== last_tgate_destroyed ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|last_tgate_destroyed|string}}&lt;br /&gt;
{{hl2msg|short|teamid|Team who's last tgate got pwnd}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== player_stats_updated ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|player_stats_updated|string}}&lt;br /&gt;
{{hl2msg|bool|forceupload|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== failed_to_build ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|failed_to_build|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|userid|the commander that tried to build something with no power}}&lt;br /&gt;
{{hl2msg|short|reason|(eBuildErrorReason) 0: Ok, 1: No Power, 2: No Line of sight, 3: obstruction, 4: invalid build area}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_hint_closed ===&lt;br /&gt;
{{qnotice|The local commander closed a hint (used to re-evaluate tiered hints)}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_hint_closed|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_selected_structure ===&lt;br /&gt;
{{qnotice|The local commander selected a structure}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_selected_structure|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{hl2msg|short|entindex|Entity id of the selected structure}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_start ===&lt;br /&gt;
{{qnotice|Causes the assembler to flash}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_assembler_stop ===&lt;br /&gt;
{{qnotice|Causes the assembler to stop flashing}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_assembler_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_build_mode ===&lt;br /&gt;
{{qnotice|Local commander is in structure placement mode}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_build_mode|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{hl2msg|short|type|structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_start ===&lt;br /&gt;
{{qnotice|Start flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_start|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_flash_supply_icon_stop ===&lt;br /&gt;
{{qnotice|Stop flashing the supply station build icon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_flash_supply_icon_stop|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== commander_start_structure_build ===&lt;br /&gt;
{{qnotice|Start a structure building}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|commander_start_structure_build|string}}&lt;br /&gt;
{{hl2msg|short|team|The team that is building the structure}}&lt;br /&gt;
{{hl2msg|short|type|The structure type}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== promoted_to_commander ===&lt;br /&gt;
{{qnotice|}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|promoted_to_commander|string}}&lt;br /&gt;
{{hl2msg|short|userid|The user that got promoted to commander}}&lt;br /&gt;
{{hl2msg|short|teamid|The team of the promoted commander}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10m ===&lt;br /&gt;
{{qnotice|10 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5m ===&lt;br /&gt;
{{qnotice|5 minutes left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_1m ===&lt;br /&gt;
{{qnotice|1 minute left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_1m|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_30s ===&lt;br /&gt;
{{qnotice|30 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_30s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_10s ===&lt;br /&gt;
{{qnotice|10 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_10s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== timeleft_5s ===&lt;br /&gt;
{{qnotice|5 seconds left of the round}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|timeleft_5s|string}}&lt;br /&gt;
{{hl2msg|1|local|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_hospital_duty_progress ===&lt;br /&gt;
{{qnotice|progress towards hospital duty achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_hospital_duty_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
=== ach_high_maintenance_progress ===&lt;br /&gt;
{{qnotice|progress towards high maintenance achievement. fired client-side. commander only. same team.}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{begin-hl2msg|ach_high_maintenance_progress|string}}&lt;br /&gt;
{{hl2msg|short|progress|}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Game_Events_(Source)&amp;diff=8209</id>
		<title>Game Events (Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Game_Events_(Source)&amp;diff=8209"/>
		<updated>2011-08-26T02:12:44Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are all the games that the Source engine covers (that we could find).&lt;br /&gt;
* [[Generic Source Events]]&lt;br /&gt;
* [[Generic Source Server Events]]&lt;br /&gt;
* [[Counter-Strike: Source Events]]&lt;br /&gt;
* [[Day of Defeat: Source Events]]&lt;br /&gt;
* [[Half-Life 2: Deathmatch Events]]&lt;br /&gt;
* [[Half-Life 2: Capture the Flag Events]]&lt;br /&gt;
* [[Dystopia Events]]&lt;br /&gt;
* [[Pirates, Vikings, Knights II Events]]&lt;br /&gt;
* [[SourceForts Events]]&lt;br /&gt;
* [[Hidden: Source Events]]&lt;br /&gt;
* [[Perfect Dark: Source Events]]&lt;br /&gt;
* [[Iron Grip: Source  Events]]&lt;br /&gt;
* [[Insurgency: Source  Events]]&lt;br /&gt;
* [[Zombie Panic! Source Events]]&lt;br /&gt;
* [[Garry's Mod Events]]&lt;br /&gt;
* [[Team Fortress 2 Events]]&lt;br /&gt;
* [[Left 4 Dead Events]]&lt;br /&gt;
* [[Left 4 Dead 2 Events]]&lt;br /&gt;
* [[Neotokyo Events]]&lt;br /&gt;
* [[Alien Swarm Events]]&lt;br /&gt;
* [[Nuclear Dawn Events]]&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
[[User:Shane|Shane]] - Writing some of the events pages and organization and general wikiknowhow&amp;lt;br /&amp;gt;&lt;br /&gt;
[[User:FlyingMongoose|FlyingMongoose]] - Writing a lot of the events pages&amp;lt;br /&amp;gt;&lt;br /&gt;
[[User:sslice|sslice]] - For creating a wikitizer application for these events&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Metamod:Source Development]]&lt;br /&gt;
[[Category:SourceMod Development]]&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod&amp;diff=8128</id>
		<title>Building SourceMod</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod&amp;diff=8128"/>
		<updated>2011-07-12T00:24:43Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: /* Getting the Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compiling SourceMod is not difficult, but requires a number of prerequisites.  This article details the requirements and steps to being able to build working SourceMod binaries.  These directions may change any time and may be updated as SourceMod's build process improves.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You cannot use MingW to build working SourceMod Windows binaries.  It is not ABI compatible with Visual C++ which is what Valve uses for the Source engine.  You can only use GCC to build Linux binaries.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
*Microsoft Visual C++ 2008 (Express or higher) is supported and used for official builds.&lt;br /&gt;
*Microsoft Visual C++ 2005 (Express or higher) is unsupported.&lt;br /&gt;
*Microsoft Visual C++ 2003 7.1 or higher may not build out-of-box, but can build compatible binaries.&lt;br /&gt;
*Microsoft Visual C++ 2003 7.0 or lower '''cannot''' be used.&lt;br /&gt;
&lt;br /&gt;
If you are installing Visual C++ 2005 Express, it may not come with Microsoft's Platform SDK installed.  If this is the case, you must manually install the Platform SDK.  You can find directions on how to do this and test your setup [http://www.microsoft.com/express/2005/platformsdk/default.aspx here].  Visual C++ 2008 &amp;quot;streamlines&amp;quot; the Platform SDK installation according to Microsoft.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
For Linux, SourceMod requires the GNU C/C++ Compiler (from GCC):&lt;br /&gt;
*Version 4.1 is used for official binaries and is guaranteed to build.&lt;br /&gt;
*Versions 3.4 through 4.2 are guaranteed to be binary (ABI) compatible, although SourceMod may not necessarily build out-of-box against them.&lt;br /&gt;
*Any GCC version below 3.4 '''cannot''' be used.&lt;br /&gt;
&lt;br /&gt;
==CPU==&lt;br /&gt;
SourceMod is strictly a 32-bit x86 (IA32) product.  You should not try to force a compiler to build 64-bit binaries of SourceMod.&lt;br /&gt;
&lt;br /&gt;
Your CPU and its compiler must support SSE in order to build SourceMod.  To build without needing or having a dependency against SSE, please see the [[Compiling SourceMod#Removing SSE|Removing SSE]] section near the bottom.&lt;br /&gt;
&lt;br /&gt;
Approximate compiling times for SourceMod's Core are roughly:&lt;br /&gt;
*Windows, Core 2 Quad E6600: 30 seconds (using /MP)&lt;br /&gt;
*Windows, Core 2 Duo E6600: 75 seconds&lt;br /&gt;
*Windows, Centrino 1.8GHz: 5 minutes&lt;br /&gt;
*Linux, Core 2 Duo E6600: &amp;lt;= 1 minute&lt;br /&gt;
*Linux, P3 Dual 500MHz: &amp;gt;= 7 minutes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
This section describes how to set up your computer for compiling.&lt;br /&gt;
&lt;br /&gt;
==Getting the Files==&lt;br /&gt;
This section describes which files you must obtain and how to obtain them.  Do not worry about where to place them yet -- that will be discussed on a per-platform basis.  You can download the files anywhere you'd like.&lt;br /&gt;
&lt;br /&gt;
The recommended method of getting the required files is via [http://mercurial.selenic.com/ Mercurial].  We have our own [[Mercurial_Tutorial]] if you prefer that method.  Although you do not need both HL2SDK versions (unless you wish to build binaries against both), you do need both Metamod:Source versions.  Extensions don't necessarily require Metamod:Source (or even the Source Engine) but its template library is used extensively in SourceMod.&lt;br /&gt;
&lt;br /&gt;
*SourceMod. For full download options, see the [http://www.sourcemod.net/downloads.php SourceMod Downloads] page.  Obviously, you must download the source code and not a binary package.&lt;br /&gt;
*HL2SDK Original.  As of this writing (Sep 2008) this engine is used for most Source games, except for TF2, GMod10, and DoD:S. Repository: [http://hg.alliedmods.net/hl2sdks/hl2sdk hl2sdk]&lt;br /&gt;
*HL2SDK OrangeBox.  As of this writing (Sep 2008) this engine is used TF2, GMod10, and DoD:S. Repository: [http://hg.alliedmods.net/hl2sdks/hl2sdk-ob hl2sdk-ob]&lt;br /&gt;
*HL2SDK Left4Dead. This engine is used for L4D. Repository: [http://hg.alliedmods.net/hl2sdks/hl2sdk-l4d hl2sdk-l4d]&lt;br /&gt;
*Metamod:Source Source Code. Visit [http://www.metamodsource.net/?go=downloads Metamod:Source downloads]. Right now SourceMod builds against Metamod:Source 1.7.&lt;br /&gt;
&lt;br /&gt;
'''Note''' that when we refer to &amp;quot;Metamod:Source&amp;quot; in this article, we are referring to its source code tree, not a binary package.&lt;br /&gt;
&lt;br /&gt;
If you intend to compile the MySQL extension, you must also download MySQL 5.0.  You can use any version.  For simplicity, here are the versions we use:&lt;br /&gt;
*Linux: We use the 5.0.45 binary from the &amp;quot;[http://dev.mysql.com/downloads/mysql/5.0.html#linux Linux (non RPM packages)]&amp;quot; for &amp;quot;Linux (x86).&amp;quot;  You can also use [http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.45-linux-i686-glibc23.tar.gz/from/pick this direct link] (may not be valid in the future).&lt;br /&gt;
*Windows: Due to a MySQL build change we use 5.0.24a which is an older download.  The file name was &amp;quot;mysql-5.0.24a-win32.zip,&amp;quot; if you can't find it you can use this [http://www.bailopan.net/mysql-5.0.24a-win32.zip direct link] (may not be valid in the future).&lt;br /&gt;
&lt;br /&gt;
You can remove all folders from the distribution except for the &amp;quot;lib&amp;quot; and &amp;quot;include&amp;quot; folders which comprise the MySQL SDK.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
As of this writing, SourceMod's Makefiles are hardcoded to use a binary called &amp;quot;gcc-4.1&amp;quot;  You can override this, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;make CPP=gcc&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise, you can also just create a symlink:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you must use &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt; and not &amp;lt;tt&amp;gt;g++&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
SourceMod's Makefiles have strict directory organizational rules.  You must have a top-level folder.  For this document, we'll assume it is called &amp;lt;tt&amp;gt;sourcemod&amp;lt;/tt&amp;gt;, though it can be named anything.  The layout of &amp;lt;tt&amp;gt;sourcemod&amp;lt;/tt&amp;gt; must be:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sourcemod&amp;lt;/tt&amp;gt;/&lt;br /&gt;
**&amp;lt;tt&amp;gt;hl2sdk&amp;lt;/tt&amp;gt; - symlink or folder containing the HL2SDK&lt;br /&gt;
**&amp;lt;tt&amp;gt;hl2sdk-ob&amp;lt;/tt&amp;gt; - symlink or folder containing the HL2SDK for Orange Box/TF&lt;br /&gt;
**&amp;lt;tt&amp;gt;mmsource-1.7&amp;lt;/tt&amp;gt; - symlink or folder containing any Metamod:Source version 1.7 or higher.&lt;br /&gt;
**&amp;lt;tt&amp;gt;sourcemod-central&amp;lt;/tt&amp;gt; - folder containing SourceMod's source code tree.  This can be named anything, as long as it's a valid SourceMod tree (like [http://hg.alliedmods.net/sourcemod-central sourcemod-central]).  You can also use [http://hg.alliedmods.net/sourcemod-1.1 sourcemod-1.1].&lt;br /&gt;
**&amp;lt;tt&amp;gt;mysql-5.0&amp;lt;/tt&amp;gt; - symlink or folder containing a MySQL 5.0 distribution&lt;br /&gt;
&lt;br /&gt;
If you are using a 64-bit version of Linux, you may need to install extra packages to be able to compile SourceMod.  On Debian-based distros, these are typically:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#prerequisites&lt;br /&gt;
#apt-get install g++-4.1 gcc-4.1 make subversion&lt;br /&gt;
#apt-get install libz libz-dev&lt;br /&gt;
#only needed if you want to use the build tool&lt;br /&gt;
#apt-get install mono mono-devel&lt;br /&gt;
#32-bit support&lt;br /&gt;
apt-get install ia32-libs&lt;br /&gt;
apt-get install lib32z1 lib32z1-dev&lt;br /&gt;
apt-get install libc6-dev-i386 libc6-i386&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
On Windows we don't require a particular directory layout.  Instead, environment variables are used.  The directions below apply to Windows XP, and are assumed to be similar for other versions of Windows.&lt;br /&gt;
*Open the Control Panel (for example, via Start -&amp;gt; Settings).&lt;br /&gt;
*Open the System control.  If you don't see it, you may need to switch to &amp;quot;Classic view&amp;quot; (either via the left-hand pane or by going to Tools -&amp;gt; Folder Options).&lt;br /&gt;
*Click the Advanced tab.&lt;br /&gt;
*Click the Environment Variables button.&lt;br /&gt;
&lt;br /&gt;
You can add your environment variables to either your User settings or your System settings.  Create a new variable for each item in the list below.  The item names are in &amp;lt;tt&amp;gt;fixed-width font&amp;lt;/tt&amp;gt; and their value descriptions follow.&lt;br /&gt;
*&amp;lt;tt&amp;gt;MMSOURCE17&amp;lt;/tt&amp;gt; - Path to Metamod:Source 1.7+&lt;br /&gt;
*&amp;lt;tt&amp;gt;MMSOURCE18&amp;lt;/tt&amp;gt; - Path to Metamod:Source 1.8+&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK&amp;lt;/tt&amp;gt; - Path to HL2SDK Ep1/Original&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKOB&amp;lt;/tt&amp;gt; - Path to HL2SDK Ep2/OrangeBox for mods&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKOBVALVE&amp;lt;/tt&amp;gt; - Path to HL2SDK Ep2/OrangeBox for Valve games (TF2 and DoD:S)&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKL4D&amp;lt;/tt&amp;gt; - Path to HL2SDK L4D1&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKL4D2&amp;lt;/tt&amp;gt; - Path to HL2SDK L4D2&lt;br /&gt;
&lt;br /&gt;
=Building=&lt;br /&gt;
SourceMod has two types of binaries: those with an engine/MM:S dependence, and those without (&amp;quot;normal&amp;quot; binaries).  Normal binaries have two modes:&lt;br /&gt;
*&amp;lt;tt&amp;gt;Release&amp;lt;/tt&amp;gt; - Optimized binary for release.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Debug&amp;lt;/tt&amp;gt; - Unoptimized binary with debugging checks.&lt;br /&gt;
&lt;br /&gt;
Engine/MM:S dependent binaries have three build modes, each paired with either Release or Debug, meaning there are six build options total.  They are:&lt;br /&gt;
*&amp;lt;tt&amp;gt;Original&amp;lt;/tt&amp;gt; - Building against MM:S 1.4 API with HL2SDK&lt;br /&gt;
*&amp;lt;tt&amp;gt;Episode2&amp;lt;/tt&amp;gt; - Building against MM:S 1.6 API with HL2SDK-OB or higher&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
For both Normal and Engine/MM:S dependent binaries, the object files and the final binary are placed in a folder called &amp;lt;tt&amp;gt;Release&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Debug&amp;lt;/tt&amp;gt; (in the same level as the Makefile) depending on which building mechanism you chose.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Our Makefiles are not set up to detect changes in header files.  If you change a header file, you must clean your build.&lt;br /&gt;
&lt;br /&gt;
===Normal Binaries===&lt;br /&gt;
For normal binaries, you can build simply with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;make&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can clean stale object files with:&lt;br /&gt;
&amp;lt;pre&amp;gt;make clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or build debug builds with:&lt;br /&gt;
&amp;lt;pre&amp;gt;make DEBUG=true&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dependent Binaries===&lt;br /&gt;
Binaries that have an Engine or MM:S dependency require one extra parameter, &amp;lt;tt&amp;gt;ENGINE&amp;lt;/tt&amp;gt;.  It must be either &amp;lt;tt&amp;gt;orangebox&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;original&amp;lt;/tt&amp;gt;.  For example, to build a TF-compatible binary in debug mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;make ENGINE=orangebox DEBUG=true&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dependent binaries are dropped into one of the following folders:&lt;br /&gt;
*Debug.original&lt;br /&gt;
*Debug.orangebox&lt;br /&gt;
*Release.original&lt;br /&gt;
*Release.orangebox&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
Windows project files end with &amp;lt;tt&amp;gt;.vcproj&amp;lt;/tt&amp;gt; and are found in an &amp;lt;tt&amp;gt;msvc8&amp;lt;/tt&amp;gt; folder that resides inside each binary's main source folder.  For example, Core is located in &amp;lt;tt&amp;gt;core/msvc8/sourcemod_mm.vcproj&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Once the file is opened, you can select which build to use by going to Build -&amp;gt; Configuration Manager.  Normal binaries have simply &amp;quot;Debug&amp;quot; and &amp;quot;Release.&amp;quot;  Dependent binaries have the following builds:&lt;br /&gt;
*Debug - Old Metamod&lt;br /&gt;
*Debug - Episode 2 &lt;br /&gt;
*Release - Old Metamod&lt;br /&gt;
*Release - Episode 2 &lt;br /&gt;
&lt;br /&gt;
'''Note''' that dependent binaries will have plain &amp;quot;Debug&amp;quot; and &amp;quot;Release&amp;quot; builds.  These should not be used as they are not configured.&lt;br /&gt;
&lt;br /&gt;
Once you have selected a configuration, you can compile by going to Build -&amp;gt; Build Solution.  The binaries and object files will be written to a folder inside &amp;lt;tt&amp;gt;msvc8&amp;lt;/tt&amp;gt; named after the full configuration name.  For example, using &amp;quot;Debug - Old Metamod&amp;quot; with the &amp;quot;sdktools&amp;quot; extension will result in the binary: &amp;lt;tt&amp;gt;extensions/sdktools/msvc8/Debug - Old Metamod/sdktools.ext.dll&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Visual Studio detects changes to header files intelligently.  It is usually not necessary to rebuild a solution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Binary Organization=&lt;br /&gt;
Although SourceMod has a somewhat unified building mechanism, each of the binaries has a different purpose.  They can be separated into the following classes:&lt;br /&gt;
&lt;br /&gt;
*Core-Related: Binaries which are required or loaded intrinsically by Core.&lt;br /&gt;
*Extensions: Binaries which are loaded via the extension mechanism.&lt;br /&gt;
*External: Binaries which are standalone or unrelated to SourceMod's live operation (for example, the compiler).&lt;br /&gt;
&lt;br /&gt;
This article is only concerned with the first two types.  &lt;br /&gt;
&lt;br /&gt;
==Core-Related Binaries==&lt;br /&gt;
Binaries related to Core are spread throughout the source code tree.  They are always placed in &amp;lt;tt&amp;gt;sourcemod/bin&amp;lt;/tt&amp;gt; for packaging.  The projects files related to Core are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;loader&amp;lt;/tt&amp;gt; - This is a very small wrapper binary responsible for detecting the MM:S version and game engine, and deciding which SourceMod version to load.  The output binary is &amp;lt;tt&amp;gt;sourcemod_mm_i486.so&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;sourcemod_mm.dll&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;tt&amp;gt;core&amp;lt;/tt&amp;gt; - This is Core itself, and is a dependent binary.  It has three outputs:&lt;br /&gt;
**Original: &amp;lt;tt&amp;gt;sourcemod.1.ep1.so&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;sourcemod.1.ep1.dll&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Episode 1: &amp;lt;tt&amp;gt;sourcemod.1.ep1.so&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;sourcemod.2.ep1.dll&amp;lt;/tt&amp;gt; (unsupported, not packaged)&lt;br /&gt;
**Episode 2: &amp;lt;tt&amp;gt;sourcemod.1.ep1.so&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;sourcemod.2.ep2.dll&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;sourcepawn/jit/x86&amp;lt;/tt&amp;gt; - This is the SourcePawn JIT for generating IA32/x86 instructions from &amp;lt;tt&amp;gt;.smx&amp;lt;/tt&amp;gt; files.  Currently the source code for this is not made available.  It is built as &amp;lt;tt&amp;gt;sourcepawn.jit.x86.so&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;sourcepawn.jit.x86.dll&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It is technically not necessary to use the loader.  It is provided as a convenience so users do not have to perform extra steps while installing SourceMod.  However, it is highly recommend that you do use it in order to maintain similarity with the default SourceMod package.&lt;br /&gt;
&lt;br /&gt;
==Extensions==&lt;br /&gt;
Extensions are found in the &amp;lt;tt&amp;gt;extensions&amp;lt;/tt&amp;gt; folder of the source tree.  SDKTools, Cstrike, and the upcoming TF extension are engine/MM:S dependent (and the rest are generally not).&lt;br /&gt;
&lt;br /&gt;
Extensions always are named &amp;lt;tt&amp;gt;name.ext.so&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;name.ext.dll&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; is a unique identifier.  This is true even of dependent binaries.  &lt;br /&gt;
&lt;br /&gt;
When loading extensions, SourceMod looks in two separate folders.  First, it checks the ''dependent extension folder'', which is &amp;lt;tt&amp;gt;extensions/auto.x.y&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; is the MM:S version (1 for 1.4, 2 for 1.6) and &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; is the Engine version (1 for Original/Ep1, 2 for Ep2/OrangeBox).  If no matching extension is found there, it looks in &amp;lt;tt&amp;gt;extensions&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, the SDKTools binary on Counter-Strike would be loaded from &amp;lt;tt&amp;gt;extensions/auto.1.ep1&amp;lt;/tt&amp;gt;, but the GeoIP binary (which is not dependent) would be loaded from &amp;lt;tt&amp;gt;extensions&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Removing SSE=&lt;br /&gt;
SourceMod binaries are built against SSE by default.  SSE is an important set of optimizations, that, according to Valve's hardware survey, are supported on 99.6% percent of respondents' computers.  If you are in this 0.4% which does not have SSE support, you should consider buying a newer processor.  Only early Pentium 3-grade processors did not have SSE support (for example, the very early Durons), and it is likely your Source server will not perform adequately to support more than few players.&lt;br /&gt;
&lt;br /&gt;
Nonetheless, SourceMod's binaries can all be recompiled to remove its SSE dependence.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
Edit the Makefile of the binary you are trying to compile.  Remove all instances of these flags.  They can simply be erased, there is no need to replace them with anything.&lt;br /&gt;
*&amp;lt;tt&amp;gt;-msse&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;-mfpmath=sse&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure to clean the build after changing the Makefile.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
Load the project file into Visual Studio.  Go to Project -&amp;gt; Properties.  Expand &amp;quot;Configuration Properties,&amp;quot; and then &amp;quot;C/C++&amp;quot; under it.  Select &amp;quot;Code Generation.&amp;quot;  Change the setting &amp;quot;Enable Enhanced Instruction Set&amp;quot; to &amp;quot;Not Set.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You must change this setting '''for each build configuration''' that you wish to use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Documentation]]&lt;br /&gt;
[[Category:SourceMod Development]]&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Counter-Strike:_Source_Events&amp;diff=8126</id>
		<title>Counter-Strike: Source Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Counter-Strike:_Source_Events&amp;diff=8126"/>
		<updated>2011-07-05T01:15:50Z</updated>

		<summary type="html">&lt;p&gt;Peace-Maker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Refer back to [[Game Events (Source)]] for more events.''&lt;br /&gt;
&lt;br /&gt;
All cstrike mod events can be found in cstrike\resource\modevents.res&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== player_death ===&lt;br /&gt;
{{qnotice|When a client dies}}&lt;br /&gt;
{{begin-hl2msg|player_death|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who died}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who killed}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name killer used }}&lt;br /&gt;
{{hl2msg|bool|headshot|singals a headshot}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_hurt ===&lt;br /&gt;
{{qnotice|When a client is damaged}}&lt;br /&gt;
{{begin-hl2msg|player_hurt|string}}&lt;br /&gt;
{{hl2msg|short|userid|user ID who was hurt}}&lt;br /&gt;
{{hl2msg|short|attacker|user ID who attacked}}&lt;br /&gt;
{{hl2msg|byte|health|remaining health points}}&lt;br /&gt;
{{hl2msg|byte|armor|remaining armor points}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name attacker used, if not the world}}&lt;br /&gt;
{{hl2msg|byte|dmg_health|damage done to health}}&lt;br /&gt;
{{hl2msg|byte|dmg_armor|damage done to armor}}&lt;br /&gt;
{{hl2msg|byte|hitgroup|hitgroup that was damaged}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_beginplant ===&lt;br /&gt;
{{qnotice|When the bomb is starting to get planted}}&lt;br /&gt;
{{begin-hl2msg|bomb_beginplant|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|site}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_abortplant ===&lt;br /&gt;
{{qnotice|When the bomb planter stops planting the bomb}}&lt;br /&gt;
{{begin-hl2msg|bomb_abortplant|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|site}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_planted ===&lt;br /&gt;
{{qnotice|When the bomb has been planted}}&lt;br /&gt;
{{begin-hl2msg|bomb_planted|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|site}}&lt;br /&gt;
{{hl2msg|short|posx}}&lt;br /&gt;
{{hl2msg|short|posy}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_defused ===&lt;br /&gt;
{{qnotice|When the bomb has been defused}}&lt;br /&gt;
{{begin-hl2msg|bomb_defused|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|site}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_exploded ===&lt;br /&gt;
{{qnotice|When the bomb explodes}}&lt;br /&gt;
{{begin-hl2msg|bomb_exploded|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|site}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_dropped ===&lt;br /&gt;
{{qnotice|When the bomb is dropped by a client}}&lt;br /&gt;
{{begin-hl2msg|bomb_dropped|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_pickup ===&lt;br /&gt;
{{qnotice|When the bomb is picked up by a client}}&lt;br /&gt;
{{begin-hl2msg|bomb_pickup|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_begindefuse ===&lt;br /&gt;
{{qnotice|When the bomb is started to be defused}}&lt;br /&gt;
{{begin-hl2msg|bomb_begindefuse|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|bool|haskit}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_abortdefuse ===&lt;br /&gt;
{{qnotice|When the bomb defusal is stopped}}&lt;br /&gt;
{{begin-hl2msg|bomb_abortdefuse|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_follows ===&lt;br /&gt;
{{qnotice|When the hostage begins following a client}}&lt;br /&gt;
{{begin-hl2msg|hostage_follows|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|hostage}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_hurt ===&lt;br /&gt;
{{qnotice|When a hostage is damaged}}&lt;br /&gt;
{{begin-hl2msg|hostage_hurt|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|hostage}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_killed ===&lt;br /&gt;
{{qnotice|When a hostage is killed}}&lt;br /&gt;
{{begin-hl2msg|hostage_killed|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|hostage}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_rescued ===&lt;br /&gt;
{{qnotice|When a hostage is rescued}}&lt;br /&gt;
{{begin-hl2msg|hostage_rescued|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|hostage}}&lt;br /&gt;
{{hl2msg|short|site}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_stops_following ===&lt;br /&gt;
{{qnotice|When a hostage stops following a client}}&lt;br /&gt;
{{begin-hl2msg|hostage_stops_following|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|hostage}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_rescued_all ===&lt;br /&gt;
{{qnotice|When all the hostages are rescued}}&lt;br /&gt;
{{begin-hl2msg|hostage_rescued_all|string}}&lt;br /&gt;
{{hl2msg|''none''|''none''}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hostage_call_for_help ===&lt;br /&gt;
{{qnotice|When the hostage calls for help}}&lt;br /&gt;
{{begin-hl2msg|hostage_call_for_help|string}}&lt;br /&gt;
{{hl2msg|short|hostage}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== vip_escaped ===&lt;br /&gt;
{{qnotice|When the VIP escapes}}&lt;br /&gt;
{{begin-hl2msg|vip_escaped|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== vip_killed ===&lt;br /&gt;
{{qnotice|When the VIP is killed}}&lt;br /&gt;
{{begin-hl2msg|vip_killed|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|attacker}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_radio ===&lt;br /&gt;
{{qnotice|When the player uses radio commands}}&lt;br /&gt;
{{begin-hl2msg|player_radio|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|slot}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bomb_beep ===&lt;br /&gt;
{{qnotice|Every time the bomb beep sound happens}}&lt;br /&gt;
{{begin-hl2msg|bomb_beep|string}}&lt;br /&gt;
{{hl2msg|long|entindex|c4 entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_fire ===&lt;br /&gt;
{{qnotice|Every time a client fires their weapon}}&lt;br /&gt;
{{begin-hl2msg|weapon_fire|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_fire_on_empty ===&lt;br /&gt;
{{qnotice|Every time a client fires their weapon and it's empty}}&lt;br /&gt;
{{begin-hl2msg|weapon_fire_on_empty|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|string|weapon|weapon name used}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_reload ===&lt;br /&gt;
{{qnotice|Every time a client reloads their weapon}}&lt;br /&gt;
{{begin-hl2msg|weapon_reload|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== weapon_zoom ===&lt;br /&gt;
{{qnotice|Every time a client zooms a scoped weapon}}&lt;br /&gt;
{{begin-hl2msg|weapon_zoom|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== item_pickup ===&lt;br /&gt;
{{qnotice|Every time an item is picked up (generally weapons)}}&lt;br /&gt;
{{begin-hl2msg|item_pickup|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|string|item|either a weapon such as 'tmp' or 'hegrenade', or an item such as 'nvgs'}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== grenade_bounce ===&lt;br /&gt;
{{qnotice|Every time a grenade bounces}}&lt;br /&gt;
{{begin-hl2msg|grenade_bounce|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hegrenade_detonate ===&lt;br /&gt;
{{qnotice|Every time a hegrenade explodes}}&lt;br /&gt;
{{begin-hl2msg|hegrenade_detonate|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|float|x}}&lt;br /&gt;
{{hl2msg|float|y}}&lt;br /&gt;
{{hl2msg|float|z}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== flashbang_detonate ===&lt;br /&gt;
{{qnotice|Every time a flashbang detonates}}&lt;br /&gt;
{{begin-hl2msg|flashbang_detonate|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|float|x}}&lt;br /&gt;
{{hl2msg|float|y}}&lt;br /&gt;
{{hl2msg|float|z}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== smokegrenade_detonate ===&lt;br /&gt;
{{qnotice|Every time a smokegrenade detonates}}&lt;br /&gt;
{{begin-hl2msg|smokegrenade_detonate|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|float|x}}&lt;br /&gt;
{{hl2msg|float|y}}&lt;br /&gt;
{{hl2msg|float|z}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== bullet_impact ===&lt;br /&gt;
{{qnotice|Every time a bullet hits something}}&lt;br /&gt;
{{begin-hl2msg|bullet_impact}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|float|x}}&lt;br /&gt;
{{hl2msg|float|y}}&lt;br /&gt;
{{hl2msg|float|z}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_footstep ===&lt;br /&gt;
{{qnotice|Every time a player takes a step}}&lt;br /&gt;
{{begin-hl2msg|player_footstep|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_jump ===&lt;br /&gt;
{{qnotice|Every time a player jumps}}&lt;br /&gt;
{{begin-hl2msg|player_jump|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_blind ===&lt;br /&gt;
{{qnotice|Every time a player is blinded by a flashbang}}&lt;br /&gt;
{{begin-hl2msg|player_blind|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_falldamage ===&lt;br /&gt;
{{qnotice|Every time a player takes damage due to a fall}}&lt;br /&gt;
{{begin-hl2msg|player_falldamage|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|float|damage}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== door_moving ===&lt;br /&gt;
{{qnotice|Every time a door is put in motion (opened)}}&lt;br /&gt;
{{begin-hl2msg|door_moving|string}}&lt;br /&gt;
{{hl2msg|long|entindex}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== round_freeze_end ===&lt;br /&gt;
{{qnotice|When the round's mp_freezetime is up}}&lt;br /&gt;
{{begin-hl2msg|round_freeze_end|string}}&lt;br /&gt;
{{hl2msg|none|none}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== nav_blocked ===&lt;br /&gt;
{{qnotice|''Guess: Called when an area is blocked by the nav of a map''}}&lt;br /&gt;
{{begin-hl2msg|nav_blocked|string}}&lt;br /&gt;
{{hl2msg|long|area}}&lt;br /&gt;
{{hl2msg|bool|blocked}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== nav_generate ===&lt;br /&gt;
{{qnotice|Called when a nav file does not exist for a map and bots are added}}&lt;br /&gt;
{{begin-hl2msg|nav_generate|string}}&lt;br /&gt;
{{hl2msg|none|none}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_stats_updated ===&lt;br /&gt;
{{qnotice|''Guess: Called when the player stats (achievments) are sent to valve''}}&lt;br /&gt;
{{begin-hl2msg|player_stats_updated|string}}&lt;br /&gt;
{{hl2msg|bool|forceupload}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== spec_target_updated ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|spec_target_updated|string}}&lt;br /&gt;
{{hl2msg|none|none}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== cs_win_panel_round ===&lt;br /&gt;
{{qnotice|Called at the end of a round}}&lt;br /&gt;
{{begin-hl2msg|cs_win_panel_round|string}}&lt;br /&gt;
{{hl2msg|bool|show_timer_defend}}&lt;br /&gt;
{{hl2msg|bool|show_timer_attack}}&lt;br /&gt;
{{hl2msg|short|timer_time}}&lt;br /&gt;
{{hl2msg|byte|final_event|defined in cs_gamerules.h}}&lt;br /&gt;
{{hl2msg|string|funfact_token}}&lt;br /&gt;
{{hl2msg|short|funfact_player}}&lt;br /&gt;
{{hl2msg|long|funfact_data1}}&lt;br /&gt;
{{hl2msg|long|funfact_data2}}&lt;br /&gt;
{{hl2msg|long|funfact_data3}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== cs_win_panel_match ===&lt;br /&gt;
{{qnotice|Called at the end of the map}}&lt;br /&gt;
{{begin-hl2msg|cs_win_panel_match|string}}&lt;br /&gt;
{{hl2msg|short|t_score}}&lt;br /&gt;
{{hl2msg|short|ct_score}}&lt;br /&gt;
{{hl2msg|float|t_kd}}&lt;br /&gt;
{{hl2msg|float|ct_kd}}&lt;br /&gt;
{{hl2msg|short|t_objectives_done}}&lt;br /&gt;
{{hl2msg|short|ct_objectives_done}}&lt;br /&gt;
{{hl2msg|long|t_money_earned}}&lt;br /&gt;
{{hl2msg|long|ct_money_earned}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== show_freezepanel ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|show_freezepanel|string}}&lt;br /&gt;
{{hl2msg|short|killer|entindex of the killer entity}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== hide_freezepanel ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|hide_freezepanel|string}}&lt;br /&gt;
{{hl2msg|none|none}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== freezecam_started ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|freezecam_started|string}}&lt;br /&gt;
{{hl2msg|none|none}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_avenged_teammate ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|player_avenged_teammate|string}}&lt;br /&gt;
{{hl2msg|short|avenger_id}}&lt;br /&gt;
{{hl2msg|short|avenged_player_id}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== achievement_earned ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|achievement_earned|string}}&lt;br /&gt;
{{hl2msg|byte|player|entindex of the player}}&lt;br /&gt;
{{hl2msg|short|achievement|achievement ID}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== achievement_earned_local ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|achievement_earned_local|string}}&lt;br /&gt;
{{hl2msg|short|achievement|achievement ID}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== match_end_conditions ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|match_end_conditions|string}}&lt;br /&gt;
{{hl2msg|long|frags}}&lt;br /&gt;
{{hl2msg|long|max_rounds}}&lt;br /&gt;
{{hl2msg|long|win_rounds}}&lt;br /&gt;
{{hl2msg|long|time}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== round_mvp ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|round_mvp|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{hl2msg|short|reason}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== player_decal ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|player_decal|string}}&lt;br /&gt;
{{hl2msg|short|userid}}&lt;br /&gt;
{{end-hl2msg}}&lt;br /&gt;
&lt;br /&gt;
=== teamplay_round_start ===&lt;br /&gt;
{{qnotice|-}}&lt;br /&gt;
{{begin-hl2msg|teamplay_round_start|string}}&lt;br /&gt;
{{hl2msg|bool|full_reset}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>Peace-Maker</name></author>
		
	</entry>
</feed>