<?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=Flintb</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=Flintb"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/Flintb"/>
	<updated>2026-05-25T18:07:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Events_(SourceMod_Scripting)&amp;diff=7784</id>
		<title>Events (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Events_(SourceMod_Scripting)&amp;diff=7784"/>
		<updated>2010-07-26T08:07:51Z</updated>

		<summary type="html">&lt;p&gt;Flintb: Fixed error.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''To view all the events, click [[Game Events (Source)|here]].''&lt;br /&gt;
&lt;br /&gt;
Events are short, named messages sent by the server.  Although they are used for internal message passing, they are also networked to clients.&lt;br /&gt;
&lt;br /&gt;
All event natives are found in &amp;lt;tt&amp;gt;scripting/include/events.inc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
Events are documented in &amp;lt;tt&amp;gt;.res&amp;lt;/tt&amp;gt; files under a mod's &amp;lt;tt&amp;gt;resource&amp;lt;/tt&amp;gt; folder.  The &amp;quot;default&amp;quot; events are located in &amp;lt;tt&amp;gt;hl2/resource/gameevents.res&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;hl2/resource/serverevents.res&amp;lt;/tt&amp;gt;.  Mods can extend these events with their own.  &lt;br /&gt;
&lt;br /&gt;
For example, let's look at &amp;lt;tt&amp;gt;player_death&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;hl2/resource/gameevents.res&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;player_death&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;userid&amp;quot;	&amp;quot;short&amp;quot;   	// user ID who died				&lt;br /&gt;
	&amp;quot;attacker&amp;quot;	&amp;quot;short&amp;quot;	 	// user ID who killed&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Counter-Strike:Source extends this definition in &amp;lt;tt&amp;gt;cstrike/resource/modevents.res&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;player_death&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;userid&amp;quot;	&amp;quot;short&amp;quot;   	// user ID who died				&lt;br /&gt;
	&amp;quot;attacker&amp;quot;	&amp;quot;short&amp;quot;	 	// user ID who killed&lt;br /&gt;
	&amp;quot;weapon&amp;quot;	&amp;quot;string&amp;quot; 	// weapon name killer used &lt;br /&gt;
	&amp;quot;headshot&amp;quot;	&amp;quot;bool&amp;quot;		// signals a headshot&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the event is structured in the following format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;name&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;key1&amp;quot;	&amp;quot;valueType1&amp;quot;&lt;br /&gt;
	&amp;quot;key2&amp;quot;	&amp;quot;valueType2&amp;quot;&lt;br /&gt;
	...&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sending Events=&lt;br /&gt;
Events are very easy to send.  For example, let's say we want to send a death message using the &amp;lt;tt&amp;gt;player_death&amp;lt;/tt&amp;gt; event from above.  For Counter-Strike:Source, this would look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;SendDeathMessage(attacker, victim, const String:weapon[], bool:headshot)&lt;br /&gt;
{&lt;br /&gt;
	new Handle:event = CreateEvent(&amp;quot;player_death&amp;quot;)&lt;br /&gt;
	if (event == INVALID_HANDLE)&lt;br /&gt;
	{&lt;br /&gt;
		return&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	SetEventInt(event, &amp;quot;userid&amp;quot;, GetClientUserId(victim))&lt;br /&gt;
	SetEventInt(event, &amp;quot;attacker&amp;quot;, GetClientUserId(attacker))&lt;br /&gt;
	SetEventString(event, &amp;quot;weapon&amp;quot;, weapon)&lt;br /&gt;
	SetEventBool(event, &amp;quot;headshot&amp;quot;, headshot)&lt;br /&gt;
	FireEvent(event)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
*You don't need to call &amp;lt;tt&amp;gt;CloseHandle()&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FireEvent()&amp;lt;/tt&amp;gt; does this for us.&lt;br /&gt;
*Even though &amp;quot;userid&amp;quot; and &amp;quot;attacker&amp;quot; are shorts, we set them as ints.  The term &amp;quot;short&amp;quot; is only used to tell the engine how many bytes of the integer are needed to be networked.&lt;br /&gt;
*It is possible for event creation to fail; this can happen if the event does not exist, or nothing is hooking the event.  Thus, you should always make sure &amp;lt;tt&amp;gt;CreateEvent&amp;lt;/tt&amp;gt; calls return a valid Handle.&lt;br /&gt;
*Most events use client userids instead of client indexes.&lt;br /&gt;
*By default, &amp;lt;tt&amp;gt;FireEvent()&amp;lt;/tt&amp;gt; broadcasts messages to clients.  This can be prevented by passing &amp;lt;tt&amp;gt;dontBroadcast&amp;lt;/tt&amp;gt; as true.&lt;br /&gt;
&lt;br /&gt;
=Hooking Events=&lt;br /&gt;
When hooking an event, there are three modes to choose from:&lt;br /&gt;
*&amp;lt;tt&amp;gt;Pre&amp;lt;/tt&amp;gt; - Hook the event before it is fired.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Post&amp;lt;/tt&amp;gt; - Hook the event after it is fired.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Post_NoCopy&amp;lt;/tt&amp;gt; - Hook the event, but do not save any of its information (special optimization).&lt;br /&gt;
&lt;br /&gt;
Hooking an event is usually done for one of the following goals.  To get an idea of which mode to use, see the list below each goal:&lt;br /&gt;
*Blocking the event (preventing it from being fired)&lt;br /&gt;
**'''Always &amp;lt;tt&amp;gt;Pre&amp;lt;/tt&amp;gt;'''&lt;br /&gt;
*Rewriting the event (changing its parameters)&lt;br /&gt;
**'''Always &amp;lt;tt&amp;gt;Pre&amp;lt;/tt&amp;gt;'''&lt;br /&gt;
*Acting upon the event (doing something once the event is completed)&lt;br /&gt;
**'''&amp;lt;tt&amp;gt;Pre&amp;lt;/tt&amp;gt;''' if your action must come before the mod's action.&lt;br /&gt;
**'''&amp;lt;tt&amp;gt;Post&amp;lt;/tt&amp;gt;''' if your action must come after the mod's action.&lt;br /&gt;
**'''&amp;lt;tt&amp;gt;PostNoCopy&amp;lt;/tt&amp;gt;''' if your action is &amp;lt;tt&amp;gt;Post&amp;lt;/tt&amp;gt; and only requires the event name.&lt;br /&gt;
&lt;br /&gt;
As always, you do not need to unhook events when your plugin unloads.  They are automatically removed.&lt;br /&gt;
&lt;br /&gt;
==Blocking Events==&lt;br /&gt;
Blocking events is the easiest thing to do.  Let's say we want to block death events that are headshots:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	HookEvent(&amp;quot;player_death&amp;quot;, Event_PlayerDeath, EventHookMode_Pre)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)&lt;br /&gt;
{&lt;br /&gt;
	if (GetEventBool(event, &amp;quot;headshot&amp;quot;))&lt;br /&gt;
	{&lt;br /&gt;
		return Plugin_Handled&lt;br /&gt;
	}&lt;br /&gt;
	return Plugin_Continue&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Rewriting Events==&lt;br /&gt;
Rewriting events is just as easy -- events can be modified in pre hooks.  For example, say we want to remove headshots from all events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	HookEvent(&amp;quot;player_death&amp;quot;, Event_PlayerDeath, EventHookMode_Pre)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)&lt;br /&gt;
{&lt;br /&gt;
	SetEventBool(event, &amp;quot;headshot&amp;quot;, false)&lt;br /&gt;
	return Plugin_Changed&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be sure to return '''Plugin_Changed''' instead of '''Plugin_Continue''' when modifying the event or its properties.&lt;br /&gt;
&lt;br /&gt;
==Post Hooks==&lt;br /&gt;
Post hooks are default, and will usually be the most common usage.  For example, say we want to print a message to every client that dies:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	HookEvent(&amp;quot;player_death&amp;quot;, Event_PlayerDeath)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)&lt;br /&gt;
{&lt;br /&gt;
	decl String:weapon[64]&lt;br /&gt;
	new victimId = GetEventInt(event, &amp;quot;userid&amp;quot;)&lt;br /&gt;
	new attackerId = GetEventInt(event, &amp;quot;attacker&amp;quot;)&lt;br /&gt;
	new bool:headshot = GetEventBool(event, &amp;quot;headshot&amp;quot;)&lt;br /&gt;
	GetEventString(event, &amp;quot;weapon&amp;quot;, weapon, sizeof(weapon))&lt;br /&gt;
&lt;br /&gt;
	decl String:name[64]&lt;br /&gt;
	new victim = GetClientOfUserId(victimId)&lt;br /&gt;
	new attacker = GetClientOfUserId(attackerId)&lt;br /&gt;
	GetClientName(attacker, name, sizeof(name))&lt;br /&gt;
&lt;br /&gt;
	PrintToConsole(victim,&lt;br /&gt;
		&amp;quot;You were killed by \&amp;quot;%s\&amp;quot; (weapon \&amp;quot;%s\&amp;quot;) (headshot \&amp;quot;%d\&amp;quot;)&amp;quot;,&lt;br /&gt;
		name,&lt;br /&gt;
		weapon,&lt;br /&gt;
		headshot)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print a message to a player's console telling them who killed them, with what weapon, and whether it was a headshot or not.&lt;br /&gt;
&lt;br /&gt;
Note that the return value for post hooks is ignored, so the &amp;lt;tt&amp;gt;Action&amp;lt;/tt&amp;gt; tag is not needed.&lt;br /&gt;
&lt;br /&gt;
==PostNoCopy Hooks==&lt;br /&gt;
Lastly, there are some hooks where the only piece of information needed is the name of the event.  &amp;lt;tt&amp;gt;PostNoCopy&amp;lt;/tt&amp;gt; is a special optimization for this case.  When transitioning from &amp;lt;tt&amp;gt;Pre&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;Post&amp;lt;/tt&amp;gt;, SourceMod must duplicate the event and all of its key/value pairs.  &amp;lt;tt&amp;gt;PostNoCopy&amp;lt;/tt&amp;gt; prevents that sequence from happening.&lt;br /&gt;
&lt;br /&gt;
For example, let's say we want to find when a certain sequence of events is called.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
	HookEvent(&amp;quot;game_newmap&amp;quot;, GameEvents, EventHookMode_PostNoCopy)&lt;br /&gt;
	HookEvent(&amp;quot;game_start&amp;quot;, GameEvents, EventHookMode_PostNoCopy)&lt;br /&gt;
	HookEvent(&amp;quot;game_end&amp;quot;, GameEvents, EventHookMode_PostNoCopy)&lt;br /&gt;
	HookEvent(&amp;quot;game_message&amp;quot;, GameEvents, EventHookMode_PostNoCopy)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public GameEvents(Handle:event, const String:name[], bool:dontBroadcast)&lt;br /&gt;
{&lt;br /&gt;
	PrintToServer(&amp;quot;Event has been fired (event \&amp;quot;%s\&amp;quot;) (nobcast \&amp;quot;%d\&amp;quot;)&amp;quot;, name, dontBroadcast)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that like normal &amp;lt;tt&amp;gt;Post&amp;lt;/tt&amp;gt; hooks, there is no return value needed.  However, the &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; parameter for &amp;lt;tt&amp;gt;PostNoCopy&amp;lt;/tt&amp;gt; will '''always''' be equal to &amp;lt;tt&amp;gt;INVALID_HANDLE&amp;lt;/tt&amp;gt;.  Thus, the &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; parameter must be used instead of &amp;lt;tt&amp;gt;GetEventName&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
&lt;br /&gt;
{{LanguageSwitch}}&lt;/div&gt;</summary>
		<author><name>Flintb</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Talk:Events_(SourceMod_Scripting)&amp;diff=7773</id>
		<title>Talk:Events (SourceMod Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Talk:Events_(SourceMod_Scripting)&amp;diff=7773"/>
		<updated>2010-07-12T09:21:36Z</updated>

		<summary type="html">&lt;p&gt;Flintb: Created page with 'The sending event example doesn't really make sense to me. Can someone give an other example (possible using TF2 if you can). I'm trying to force a bot to shoot. ~Flint B.'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The sending event example doesn't really make sense to me. Can someone give an other example (possible using TF2 if you can). I'm trying to force a bot to shoot. ~Flint B.&lt;/div&gt;</summary>
		<author><name>Flintb</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Team_Fortress_2_Weapons&amp;diff=7772</id>
		<title>Team Fortress 2 Weapons</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Team_Fortress_2_Weapons&amp;diff=7772"/>
		<updated>2010-07-12T07:22:18Z</updated>

		<summary type="html">&lt;p&gt;Flintb: Added a note about multiple weapons have the same name. Also put class names in bold for easier reading.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a current list of the weapon entity names for Team Fortress 2.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are sorted by Class -- Primary, Secondary, and Melee.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also keep in mind that two or more weapons may have the same name. For example, the Heavy's primary weapons are called &amp;quot;Minigun&amp;quot; and &amp;quot;Natasha&amp;quot; but both are named &amp;quot;tf_weapon_minigun&amp;quot; according to GetClientWeapon().&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''DemoMan'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pipebomblauncher&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_grenadelauncher&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bottle&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_sword&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Engineer'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_primary&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pistol&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_wrench&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_robot_arm&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_builder&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_objectselection&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pda_engineer_build&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pda_engineer_destroy&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Heavy'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_minigun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_hwg&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_fists&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Medic'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_syringegun_medic&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_medigun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bonesaw&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pyro'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_flamethrower&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_flaregun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_pyro&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_fireaxe&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Scout'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_scattergun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pistol_scout&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bat&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bat_wood&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_lunchbox_drink&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Sniper'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_sniperrifle&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_smg&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_club&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Soldier'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_rocketlauncher&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_rocketlauncher_directhit&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_soldier&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_buff_item&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shovel&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Spy'''&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_revolver&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_knife&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pda_spy&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_invis&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Flintb</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Team_Fortress_2_Weapons&amp;diff=7771</id>
		<title>Team Fortress 2 Weapons</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Team_Fortress_2_Weapons&amp;diff=7771"/>
		<updated>2010-07-12T07:15:30Z</updated>

		<summary type="html">&lt;p&gt;Flintb: Updated with a few new weapons (I didn't completely update though) and arranged classes by alphabetical order (they were in random order ).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a current list of the weapon entity names for Team Fortress 2.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are sorted by Class -- Primary, Secondary, and Melee.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
DemoMan&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pipebomblauncher&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_grenadelauncher&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bottle&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_sword&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Engineer&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_primary&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pistol&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_wrench&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_robot_arm&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_builder&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_objectselection&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pda_engineer_build&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pda_engineer_destroy&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Heavy&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_minigun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_hwg&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_fists&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Medic&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_syringegun_medic&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_medigun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bonesaw&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Pyro&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_flamethrower&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_flaregun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_pyro&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_fireaxe&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Scout&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_scattergun&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pistol_scout&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bat&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_bat_wood&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_lunchbox_drink&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Sniper&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_sniperrifle&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_smg&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_club&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Soldier&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_rocketlauncher&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_rocketlauncher_directhit&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shotgun_soldier&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_buff_item&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_shovel&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Spy&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_revolver&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_knife&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_pda_spy&amp;lt;br&amp;gt;&lt;br /&gt;
tf_weapon_invis&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Flintb</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Tags_(Scripting)&amp;diff=7770</id>
		<title>Tags (Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Tags_(Scripting)&amp;diff=7770"/>
		<updated>2010-07-11T10:55:22Z</updated>

		<summary type="html">&lt;p&gt;Flintb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
Tags are a concept in the original Small/Pawn language that work around the inherent lack of data types present.  For example, Java/C would declare variables like so:&lt;br /&gt;
&amp;lt;java&amp;gt;double dNumber = 5.0;&lt;br /&gt;
int iNumber = 5;&lt;br /&gt;
char cLetter = 'a';&lt;br /&gt;
&amp;lt;/java&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Java, the sizes of these types respectively are eight bytes, four bytes, and two bytes.  However, Pawn is only capable of one data type size.  In SourcePawn, that's 32bit (four bytes).  Therefore, tags serve two purposes:&lt;br /&gt;
*Allow overloads and restrictions of basic math operators&lt;br /&gt;
*Introduce weak typing and coalescence&lt;br /&gt;
&lt;br /&gt;
An example of this is:&lt;br /&gt;
&amp;lt;pawn&amp;gt;new Float:fNum = 5.0;&lt;br /&gt;
new iNum = 5;&lt;br /&gt;
new char = 'A';&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, all of the variables are the same ''type'', the &amp;lt;tt&amp;gt;cell&amp;lt;/tt&amp;gt;, which is four bytes.  But the &amp;lt;tt&amp;gt;fNum&amp;lt;/tt&amp;gt; variable is ''tagged'' as a &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;, and so it uses a set of overloaded operators for floating point math.  The &amp;lt;tt&amp;gt;iNum&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;char&amp;lt;/tt&amp;gt; variables are both integers.  Even though &amp;lt;tt&amp;gt;char&amp;lt;/tt&amp;gt; is only holding one byte of data (an ASCII character), it is still a 32bit data type.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Tags are identified by prefixing the tag name and a colon to a variable name.  Note that you still need the &amp;lt;tt&amp;gt;new&amp;lt;/tt&amp;gt; declaration, as tags aren't a declaration in and of themselves.  Example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;//this is valid&lt;br /&gt;
new ValidTag:crab = something;&lt;br /&gt;
//this is not&lt;br /&gt;
InvalidTag:tag = something;&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tags can be used for enumerations.  For example, the following defines a list of constant symbols which are each tagged as the enumeration name.&lt;br /&gt;
&amp;lt;pawn&amp;gt;enum Clam&lt;br /&gt;
{&lt;br /&gt;
   Oyster = 0,  /* Oyster has the Clam tag */&lt;br /&gt;
   Quahog = 1,  /* Quahog has the Clam tag */&lt;br /&gt;
};&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Mismatches and Coalescence==&lt;br /&gt;
If you attempt to mix tags in an expression, you will get the infamous (213) &amp;quot;Tag mismatch&amp;quot; warning from the compiler.  Although it is only a warning, it ''can'' be a serious error, and it is important that your plugins do not carry this warning (or, if they do, it is carefully understood to be safe).&lt;br /&gt;
&lt;br /&gt;
An example of a tag mismatch, using the above enumeration, might be:&lt;br /&gt;
&amp;lt;pawn&amp;gt;stock GetClamNumber()&lt;br /&gt;
{&lt;br /&gt;
   return Oyster;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stock Clam:GetOyster()&lt;br /&gt;
{&lt;br /&gt;
   return 0;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both of these functions will generate tag mismatch warnings by the compiler.  This is because 0 is not inherently an Oyster, and Oyster is a &amp;lt;tt&amp;gt;Clam&amp;lt;/tt&amp;gt;, not a raw number.&lt;br /&gt;
&lt;br /&gt;
Luckily in Pawn, you can 'coalesce' tags.  This means you can convert one tag to another.  This is usually a bad idea, however, it can be important for converting a bitstring to another bitstring, or a raw integer.  The generic, or &amp;quot;empty&amp;quot; tag is &amp;lt;tt&amp;gt;_&amp;lt;/tt&amp;gt;, and this symbol will effectively strip a tag from a tagged variable.  For example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;stock GetClamNumber()&lt;br /&gt;
{&lt;br /&gt;
   return _:Oyster;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stock Clam:GetOyster()&lt;br /&gt;
{&lt;br /&gt;
   return Clam:0;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This forces the tags to be correct.  ''Note that the second function could simply return &amp;lt;tt&amp;gt;Oyster&amp;lt;/tt&amp;gt;.  This mistake was for example purposes only.''&lt;br /&gt;
&lt;br /&gt;
=Built-in Tags=&lt;br /&gt;
Pawn has two built-in tags by default.  These are '''bool''' and '''Float'''.&lt;br /&gt;
&lt;br /&gt;
==Boolean==&lt;br /&gt;
The &amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt; tag (note case sensitivity) can be set to two values:&lt;br /&gt;
*'''true''' - 1&lt;br /&gt;
*'''false''' - 0&lt;br /&gt;
&lt;br /&gt;
Again, it is not faster or slower than an integer 1 or 0, because the data type is the same.  This tag simply provides better looking code.&lt;br /&gt;
&lt;br /&gt;
==Float==&lt;br /&gt;
The &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt; tag (note case sensitivity) is used for floating point math.  If the compiler detects a number to have a decimal point, it is automatically tagged as Float.  Floats have the following operators defined.  Note that these operators are not intrinsic to the compiler, and are written in &amp;lt;tt&amp;gt;float.inc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*'''Math'''&lt;br /&gt;
** '''Binary''' +, -, /, * (at least one side must be a Float)&lt;br /&gt;
** '''Unary''' ++, --&lt;br /&gt;
** '''Unary''' -&lt;br /&gt;
*'''Comparison'''&lt;br /&gt;
** '''Binary''' ==, != (at least one side must be a Float)&lt;br /&gt;
** '''Binary''' &amp;gt;=, &amp;gt;, &amp;lt;, &amp;lt;= (at least one side must be a Float)&lt;br /&gt;
** '''Unary''' !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SourceMod Specific=&lt;br /&gt;
==New Magic Tags==&lt;br /&gt;
In SourceMod, the rules for tags change in two cases, as there are a few 'magic' tags.  These magic tags are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Function''': This is the tag returned when using a function without a call.  For example: &amp;lt;pawn&amp;gt;stock Function() { }&lt;br /&gt;
new Function:fCall = Function;&amp;lt;/pawn&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''String''': This is a &amp;quot;magic&amp;quot; tag similar to &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;.  It is inherent to literal strings.  Unlike &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;, it secretly changes the storage method -- this makes it a true data type internally, unlike any other tag.  Any array tagged as a String is stored in ''bytes'', not ''cells''.  Observe the example: &amp;lt;pawn&amp;gt;new String:hello[] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
new hello2[] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
new hello3[] = {'H', 'e', 'l', 'l', 'o', 0};&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In this example, &amp;lt;tt&amp;gt;hello&amp;lt;/tt&amp;gt; is a valid string array.  To the scripter, this appears normal.  Internally, it is roughly 6 bytes.  This is specifically to make C++ coding of Pawn very fast and easy, in order to avoid cell to string conversion.  &amp;lt;tt&amp;gt;hello2&amp;lt;/tt&amp;gt; is an invalid declaration, as it is a tag mismatch.  &amp;lt;tt&amp;gt;hello3&amp;lt;/tt&amp;gt; is a valid declaration, but uses one cell for each character, rather than one byte.  Thus, it will be incompatible with natives that use Strings.  ''This is a good example of why tag coalescence is often dangerous.''  If you attempt to manually rewrite tags for strings, the result will be very unexpected, and may even crash.&lt;br /&gt;
&lt;br /&gt;
Note, however, that is still possible to do assignments like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;new String:string[20]&lt;br /&gt;
new letter = 'a'&lt;br /&gt;
string[3] = 'a'&lt;br /&gt;
string[a] = letter&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These assignments work because the &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt; tag is a true type underneath, and will correctly cast other tags when necessary.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Function Enumerations==&lt;br /&gt;
SourceMod features &amp;quot;function enumerations,&amp;quot; which are normal enums, except they define function prototypes rather than constants.  Each of the prototypes is given a unique sub-tag that only matches a &amp;lt;tt&amp;gt;Function&amp;lt;/tt&amp;gt; of that prototype.  These will be explained more in the future, as they are not used yet.&lt;br /&gt;
&lt;br /&gt;
==New General Tags==&lt;br /&gt;
SourceMod introduces one important general tag.&lt;br /&gt;
*'''Handle''': Used for the [[Handles (SourceMod Scripting)|Handle System]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=AMX Mod X Specific=&lt;br /&gt;
AMX Mod X has literally a plethora of tags, but has no new &amp;quot;magic&amp;quot; tags.  Some of these tags are:&lt;br /&gt;
*'''Sql''': An SQL index for the DBI system.&lt;br /&gt;
*'''Result''': An SQL Result index for the DBI system.&lt;br /&gt;
*'''Handle''': An SQL Handle (precursor to SourceMod's &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;) for the SQLX system.&lt;br /&gt;
*'''Vault''': An index for a vault opened with the nVault module.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
[[Category:Scripting (AMX Mod X)]]&lt;/div&gt;</summary>
		<author><name>Flintb</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Tags_(Scripting)&amp;diff=7769</id>
		<title>Tags (Scripting)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Tags_(Scripting)&amp;diff=7769"/>
		<updated>2010-07-11T10:54:55Z</updated>

		<summary type="html">&lt;p&gt;Flintb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
Tags are a concept in the original Small/Pawn language that work around the inherent lack of data types present.  For example, Java/C would declare variables like so:&lt;br /&gt;
&amp;lt;java&amp;gt;double dNumber = 5.0;&lt;br /&gt;
int iNumber = 5;&lt;br /&gt;
char cLetter = 'a';&lt;br /&gt;
&amp;lt;/java&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Java, the sizes of these types respectively are eight bytes, four bytes, and two bytes.  However, Pawn is only capable of one data type size.  In SourcePawn, that's 32bit (four bytes).  Therefore, tags serve two purposes:&lt;br /&gt;
*Allow overloads and restrictions of basic math operators&lt;br /&gt;
*Introduce weak typing and coalescence&lt;br /&gt;
&lt;br /&gt;
An example of this is:&lt;br /&gt;
&amp;lt;pawn&amp;gt;new Float:fNum = 5.0f;&lt;br /&gt;
new iNum = 5;&lt;br /&gt;
new char = 'A';&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, all of the variables are the same ''type'', the &amp;lt;tt&amp;gt;cell&amp;lt;/tt&amp;gt;, which is four bytes.  But the &amp;lt;tt&amp;gt;fNum&amp;lt;/tt&amp;gt; variable is ''tagged'' as a &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;, and so it uses a set of overloaded operators for floating point math.  The &amp;lt;tt&amp;gt;iNum&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;char&amp;lt;/tt&amp;gt; variables are both integers.  Even though &amp;lt;tt&amp;gt;char&amp;lt;/tt&amp;gt; is only holding one byte of data (an ASCII character), it is still a 32bit data type.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Tags are identified by prefixing the tag name and a colon to a variable name.  Note that you still need the &amp;lt;tt&amp;gt;new&amp;lt;/tt&amp;gt; declaration, as tags aren't a declaration in and of themselves.  Example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;//this is valid&lt;br /&gt;
new ValidTag:crab = something;&lt;br /&gt;
//this is not&lt;br /&gt;
InvalidTag:tag = something;&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tags can be used for enumerations.  For example, the following defines a list of constant symbols which are each tagged as the enumeration name.&lt;br /&gt;
&amp;lt;pawn&amp;gt;enum Clam&lt;br /&gt;
{&lt;br /&gt;
   Oyster = 0,  /* Oyster has the Clam tag */&lt;br /&gt;
   Quahog = 1,  /* Quahog has the Clam tag */&lt;br /&gt;
};&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Mismatches and Coalescence==&lt;br /&gt;
If you attempt to mix tags in an expression, you will get the infamous (213) &amp;quot;Tag mismatch&amp;quot; warning from the compiler.  Although it is only a warning, it ''can'' be a serious error, and it is important that your plugins do not carry this warning (or, if they do, it is carefully understood to be safe).&lt;br /&gt;
&lt;br /&gt;
An example of a tag mismatch, using the above enumeration, might be:&lt;br /&gt;
&amp;lt;pawn&amp;gt;stock GetClamNumber()&lt;br /&gt;
{&lt;br /&gt;
   return Oyster;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stock Clam:GetOyster()&lt;br /&gt;
{&lt;br /&gt;
   return 0;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both of these functions will generate tag mismatch warnings by the compiler.  This is because 0 is not inherently an Oyster, and Oyster is a &amp;lt;tt&amp;gt;Clam&amp;lt;/tt&amp;gt;, not a raw number.&lt;br /&gt;
&lt;br /&gt;
Luckily in Pawn, you can 'coalesce' tags.  This means you can convert one tag to another.  This is usually a bad idea, however, it can be important for converting a bitstring to another bitstring, or a raw integer.  The generic, or &amp;quot;empty&amp;quot; tag is &amp;lt;tt&amp;gt;_&amp;lt;/tt&amp;gt;, and this symbol will effectively strip a tag from a tagged variable.  For example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;stock GetClamNumber()&lt;br /&gt;
{&lt;br /&gt;
   return _:Oyster;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stock Clam:GetOyster()&lt;br /&gt;
{&lt;br /&gt;
   return Clam:0;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This forces the tags to be correct.  ''Note that the second function could simply return &amp;lt;tt&amp;gt;Oyster&amp;lt;/tt&amp;gt;.  This mistake was for example purposes only.''&lt;br /&gt;
&lt;br /&gt;
=Built-in Tags=&lt;br /&gt;
Pawn has two built-in tags by default.  These are '''bool''' and '''Float'''.&lt;br /&gt;
&lt;br /&gt;
==Boolean==&lt;br /&gt;
The &amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt; tag (note case sensitivity) can be set to two values:&lt;br /&gt;
*'''true''' - 1&lt;br /&gt;
*'''false''' - 0&lt;br /&gt;
&lt;br /&gt;
Again, it is not faster or slower than an integer 1 or 0, because the data type is the same.  This tag simply provides better looking code.&lt;br /&gt;
&lt;br /&gt;
==Float==&lt;br /&gt;
The &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt; tag (note case sensitivity) is used for floating point math.  If the compiler detects a number to have a decimal point, it is automatically tagged as Float.  Floats have the following operators defined.  Note that these operators are not intrinsic to the compiler, and are written in &amp;lt;tt&amp;gt;float.inc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*'''Math'''&lt;br /&gt;
** '''Binary''' +, -, /, * (at least one side must be a Float)&lt;br /&gt;
** '''Unary''' ++, --&lt;br /&gt;
** '''Unary''' -&lt;br /&gt;
*'''Comparison'''&lt;br /&gt;
** '''Binary''' ==, != (at least one side must be a Float)&lt;br /&gt;
** '''Binary''' &amp;gt;=, &amp;gt;, &amp;lt;, &amp;lt;= (at least one side must be a Float)&lt;br /&gt;
** '''Unary''' !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SourceMod Specific=&lt;br /&gt;
==New Magic Tags==&lt;br /&gt;
In SourceMod, the rules for tags change in two cases, as there are a few 'magic' tags.  These magic tags are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Function''': This is the tag returned when using a function without a call.  For example: &amp;lt;pawn&amp;gt;stock Function() { }&lt;br /&gt;
new Function:fCall = Function;&amp;lt;/pawn&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''String''': This is a &amp;quot;magic&amp;quot; tag similar to &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;.  It is inherent to literal strings.  Unlike &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;, it secretly changes the storage method -- this makes it a true data type internally, unlike any other tag.  Any array tagged as a String is stored in ''bytes'', not ''cells''.  Observe the example: &amp;lt;pawn&amp;gt;new String:hello[] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
new hello2[] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
new hello3[] = {'H', 'e', 'l', 'l', 'o', 0};&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In this example, &amp;lt;tt&amp;gt;hello&amp;lt;/tt&amp;gt; is a valid string array.  To the scripter, this appears normal.  Internally, it is roughly 6 bytes.  This is specifically to make C++ coding of Pawn very fast and easy, in order to avoid cell to string conversion.  &amp;lt;tt&amp;gt;hello2&amp;lt;/tt&amp;gt; is an invalid declaration, as it is a tag mismatch.  &amp;lt;tt&amp;gt;hello3&amp;lt;/tt&amp;gt; is a valid declaration, but uses one cell for each character, rather than one byte.  Thus, it will be incompatible with natives that use Strings.  ''This is a good example of why tag coalescence is often dangerous.''  If you attempt to manually rewrite tags for strings, the result will be very unexpected, and may even crash.&lt;br /&gt;
&lt;br /&gt;
Note, however, that is still possible to do assignments like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;new String:string[20]&lt;br /&gt;
new letter = 'a'&lt;br /&gt;
string[3] = 'a'&lt;br /&gt;
string[a] = letter&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These assignments work because the &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt; tag is a true type underneath, and will correctly cast other tags when necessary.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Function Enumerations==&lt;br /&gt;
SourceMod features &amp;quot;function enumerations,&amp;quot; which are normal enums, except they define function prototypes rather than constants.  Each of the prototypes is given a unique sub-tag that only matches a &amp;lt;tt&amp;gt;Function&amp;lt;/tt&amp;gt; of that prototype.  These will be explained more in the future, as they are not used yet.&lt;br /&gt;
&lt;br /&gt;
==New General Tags==&lt;br /&gt;
SourceMod introduces one important general tag.&lt;br /&gt;
*'''Handle''': Used for the [[Handles (SourceMod Scripting)|Handle System]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=AMX Mod X Specific=&lt;br /&gt;
AMX Mod X has literally a plethora of tags, but has no new &amp;quot;magic&amp;quot; tags.  Some of these tags are:&lt;br /&gt;
*'''Sql''': An SQL index for the DBI system.&lt;br /&gt;
*'''Result''': An SQL Result index for the DBI system.&lt;br /&gt;
*'''Handle''': An SQL Handle (precursor to SourceMod's &amp;lt;tt&amp;gt;Handle&amp;lt;/tt&amp;gt;) for the SQLX system.&lt;br /&gt;
*'''Vault''': An index for a vault opened with the nVault module.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
[[Category:Scripting (AMX Mod X)]]&lt;/div&gt;</summary>
		<author><name>Flintb</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Talk:Introduction_to_SourcePawn_(legacy_syntax)&amp;diff=7768</id>
		<title>Talk:Introduction to SourcePawn (legacy syntax)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Talk:Introduction_to_SourcePawn_(legacy_syntax)&amp;diff=7768"/>
		<updated>2010-07-11T10:07:45Z</updated>

		<summary type="html">&lt;p&gt;Flintb: Created page with 'Is it possible to have a two-dimensional array? ~Flint B.'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is it possible to have a two-dimensional array? ~Flint B.&lt;/div&gt;</summary>
		<author><name>Flintb</name></author>
		
	</entry>
</feed>