<?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=Pimpinjuice</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=Pimpinjuice"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/Pimpinjuice"/>
	<updated>2026-05-08T22:22:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Natives_(SourceMod_Development)&amp;diff=5011</id>
		<title>Natives (SourceMod Development)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Natives_(SourceMod_Development)&amp;diff=5011"/>
		<updated>2007-08-08T00:09:31Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: /* Strings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Natives are functions which are available to plugins via Core itself, or a C++ extension.  They are called &amp;quot;natives&amp;quot; because they must be translated via a ''native interface''.  This article explains the various parameter passing conventions in SourcePawn, as well as how to use them in your own natives.&lt;br /&gt;
&lt;br /&gt;
To understand the contents of this article, you will need to read [[Writing_Extensions#Creating_Native_Functions|Creating Natives]], the Native section in the introductory article on creating extensions.&lt;br /&gt;
&lt;br /&gt;
In this article, &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt; refers to the C/C++ data type, and &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt; (note capital 'F') refers to the SourcePawn [[Tags (Scripting)|tag]].&lt;br /&gt;
&lt;br /&gt;
=By Value versus By Reference=&lt;br /&gt;
There are two ways to pass integers/Floats to native implementations.  They are ''by value'' (ByVal) and ''by reference'' (ByRef).  ByVal means that a copy of the value is passed to the native.  This is the default behaviour.  ByRef means a ''reference'' is passed to the native, and this reference points to the value.  Both will be explained below.&lt;br /&gt;
&lt;br /&gt;
Note that arrays and strings, as will be explained later, are always passed by reference.  This is because they are usually larger structures, and passing them ByVal would require copying their data, wasting CPU cycles.&lt;br /&gt;
&lt;br /&gt;
==By Value==&lt;br /&gt;
Passing by value is the default behaviour for primitive data types (integers, Floats, or any tag that's cell-based).  Data is treated normally as raw, copied input.  Observe the following native:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Returns the number decremented by one.&lt;br /&gt;
 *&lt;br /&gt;
 * @param num		Number to decrement.&lt;br /&gt;
 * @return		Decremented number.&lt;br /&gt;
 */&lt;br /&gt;
native Decrement(num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How would we use this native?  Since &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; is passed as a value, it cannot change in the native code.  This means we have to use the return value as such:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;//Decrements a number 5 times&lt;br /&gt;
Example(num)&lt;br /&gt;
{&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	return num;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==By Reference==&lt;br /&gt;
Let's reuse the above example to use reference passing.  Observe the new native below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Subtracts one from the given number, by reference.&lt;br /&gt;
 *&lt;br /&gt;
 * @param num		Number to subtract, by reference.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native Decrement(&amp;amp;num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the ampersand ('&amp;amp;') before the parameter name -- this specifies that it is passed by reference.  Now, let's see how this would look in our script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;Example(num)&lt;br /&gt;
{&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	return num;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, &amp;lt;tt&amp;gt;Decrement&amp;lt;/tt&amp;gt; is acting on the &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; variable ''itself'', not a copy of it.  Thus, num will decrease 5 times.  In fact, scripts can even do this internally.  We can shorten the example even more:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;Example(&amp;amp;num)&lt;br /&gt;
{&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==When to use By Ref==&lt;br /&gt;
There is a misconception that passing by reference is always better then by value.  After all, copying data sounds excessive.  However, by value in SourcePawn only works on 32bit values, and thus copying the value is inherent to the processor, and trivial.&lt;br /&gt;
&lt;br /&gt;
On the other hand, passing by reference is slightly more expensive.  First, the compiler has to generate a little extra code to compute the local address of the variable.  Second, the native code itself has to translate the local address to a ''real virtual address'' (native memory).&lt;br /&gt;
&lt;br /&gt;
It is a good idea to only use by reference when you need it.  A common usage is when you need to return more than one piece of data, and you can't fit it into the return value of your native or function.  In this case, by reference is ideal.&lt;br /&gt;
&lt;br /&gt;
=Integers/Floats=&lt;br /&gt;
&lt;br /&gt;
==By Value==&lt;br /&gt;
Natives based purely on by-value floating point or integer input are generally the easiest to make.  Let's take a simple function which takes in a Float and an integer, and returns a Float:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Raises a number to an integer power.&lt;br /&gt;
 *&lt;br /&gt;
 * @param fNum		Base number (Float).&lt;br /&gt;
 * @param exp		Exponent (integer).&lt;br /&gt;
 * @return		Computed exponent result as a Float.&lt;br /&gt;
 */&lt;br /&gt;
native FloatIntPower(Float:fNum, exp);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An implementation of this native might look like:&lt;br /&gt;
&amp;lt;cpp&amp;gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static cell_t sm_FloatIntPower(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	float f1 = sp_ctof(params[1]);&lt;br /&gt;
	int num = params[2];&lt;br /&gt;
	&lt;br /&gt;
	float result = (float)pow(f1, (double)f2);&lt;br /&gt;
	return sp_ftoc(result);&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Integers, as we saw in the introduction, are accessed from the parameter stack normally.  Floats, however, must be ''reinterpret casted'' from a &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;.  Two inline functions are provided for this:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sp_ctof&amp;lt;/tt&amp;gt;: Convert a &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt; to a &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sp_ftoc&amp;lt;/tt&amp;gt;: Convert a &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt; to a &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==By Reference==&lt;br /&gt;
By reference is a little more tricky.  Let's first implement our &amp;lt;tt&amp;gt;Decrement&amp;lt;/tt&amp;gt; native from earlier.  A refresher:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native Decrement(&amp;amp;num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we try to use our above code, &amp;lt;tt&amp;gt;params[1]&amp;lt;/tt&amp;gt; will no longer hold a value.  Instead, it holds a ''local address'' in the plugin.  We must use the &amp;lt;tt&amp;gt;LocalToPhysAddr&amp;lt;/tt&amp;gt; function to translate this.  It takes in a local address and returns back a physical pointer, which we can then modify.  This will modify the value in the script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_Decrement(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *addr;&lt;br /&gt;
&lt;br /&gt;
	/* Translate the address. */&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;addr);&lt;br /&gt;
&lt;br /&gt;
	/* Decrement the number */&lt;br /&gt;
	*addr -= 1;&lt;br /&gt;
&lt;br /&gt;
	/* We have to return something, even if the plugin doesn't the value */&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
''Note: LocalToPhysAddr can return an error code.  For all practical purposes, this will never error, unless there is some memory or corruption issue, so checking it isn't necessary.''&lt;br /&gt;
&lt;br /&gt;
This works the same way for floats.  Let's say we change our native to this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Decrements a Float by an integer, and stores the result by reference.&lt;br /&gt;
 *&lt;br /&gt;
 * @param fNum		Float number to decrement (by ref).&lt;br /&gt;
 * @param decamt	Amount to decrement by.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native Decrement(&amp;amp;Float:fNum, decamt);&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example is fairly contrived -- our native simply performs a subtract operation.  But let's look at the implementation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_Decrement(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *addr;&lt;br /&gt;
&lt;br /&gt;
	/* Translate the address. */&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;addr);&lt;br /&gt;
&lt;br /&gt;
	/* Get the value */&lt;br /&gt;
	float val = sp_ctof(*addr);&lt;br /&gt;
	/* Decrement */&lt;br /&gt;
	val -= params[2];&lt;br /&gt;
	/* Store back */&lt;br /&gt;
	*addr = sp_ftoc(val);&lt;br /&gt;
&lt;br /&gt;
	/* We have to return something, even if the plugin doesn't the value */&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even though the first parameter was passed by reference, the second was not, and is accessed normally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Arrays=&lt;br /&gt;
&lt;br /&gt;
==Basic Arrays==&lt;br /&gt;
Arrays are always passed by reference.  The first example is an array which contains a list of numbers to sum.  Observe the native:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Averages an array of numbers.&lt;br /&gt;
 *&lt;br /&gt;
 * @param array		Array of numbers to average.&lt;br /&gt;
 * @param num		Number of slots in the array.&lt;br /&gt;
 * @return		Average number as a Float.&lt;br /&gt;
 */&lt;br /&gt;
native Float:Average(array[], num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage might look like:&lt;br /&gt;
&amp;lt;pawn&amp;gt;Example()&lt;br /&gt;
{&lt;br /&gt;
	new numbers[5] = {5, 6, 1, 3, 8};&lt;br /&gt;
	return Average(numbers, 5);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation, like the by ref examples above, requires &amp;lt;tt&amp;gt;LocalToPhysAddr&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_Average(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *array;&lt;br /&gt;
	float sum = 0.0f, average;&lt;br /&gt;
&lt;br /&gt;
	if (params[2] &amp;lt; 1)&lt;br /&gt;
	{&lt;br /&gt;
		/* 0 works without sp_ftoc() */&lt;br /&gt;
		return 0;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;array);&lt;br /&gt;
	for (cell_t i=0; i&amp;lt;params[2]; i++)&lt;br /&gt;
	{&lt;br /&gt;
		sum += array[i];&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	average = sum / params[2];&lt;br /&gt;
&lt;br /&gt;
	return sp_ftoc(average);&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Float Arrays==&lt;br /&gt;
This works similarly for Float arrays.  Let's take Vectors an example, with the following native:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Adds two vectors together.&lt;br /&gt;
 *&lt;br /&gt;
 * @param r	Array to store the result in.&lt;br /&gt;
 * @param v1	First vector to add.&lt;br /&gt;
 * @param v2	Second vector to add.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native AddVectors(Float:r[3], const Float:v1[3], const Float:v2[3]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation is straightforward:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_AddVectors(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *v1, *v2;&lt;br /&gt;
	float result[3];&lt;br /&gt;
	&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[2], &amp;amp;v1);&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[3], &amp;amp;v2);&lt;br /&gt;
&lt;br /&gt;
	result[0] = sp_ctof(v1[0]) + sp_ctof(v2[0]);&lt;br /&gt;
	result[1] = sp_ctof(v1[1]) + sp_ctof(v2[1]);&lt;br /&gt;
	result[2] = sp_ctof(v1[2]) + sp_ctof(v2[2]);&lt;br /&gt;
&lt;br /&gt;
	cell_t *r;&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;r);&lt;br /&gt;
	r[0] = sp_ftoc(result[0]);&lt;br /&gt;
	r[1] = sp_ftoc(result[1]);&lt;br /&gt;
	r[2] = sp_ftoc(result[2]);&lt;br /&gt;
	&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we only store the result after we have computed the input, rather than store directly.  This is a bit more work, but is good practice in case users re-use data inputs, and risk overwriting inputs as they are written.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;new Float:origin[3];&lt;br /&gt;
AddVectors(origin, origin, origin);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Strings=&lt;br /&gt;
Strings are just like arrays, in that they are passed by reference.  The only difference is that each character is stored in a byte, not a 32bit &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt;.  However, to make coding a bit easier for you, the coder, there are separate functions.&lt;br /&gt;
*&amp;lt;tt&amp;gt;LocalToString&amp;lt;/tt&amp;gt;: Converts a local address to a physical string address.&lt;br /&gt;
*&amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt;: Copies a physical string into a local address buffer.&lt;br /&gt;
*&amp;lt;tt&amp;gt;StringToLocalUTF8&amp;lt;/tt&amp;gt;: Same as &amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt;, but only copies the maximum amount possible without cutting off any multi byte characters.&lt;br /&gt;
&lt;br /&gt;
First, let's take an easy example: the infamous strlen.&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Returns the length of a string.&lt;br /&gt;
 * &lt;br /&gt;
 * @param string	String to calculate.&lt;br /&gt;
 * @return		Number of bytes in the string.&lt;br /&gt;
 */&lt;br /&gt;
native strlen(const String:string[]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implementation:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_StrLen(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	char *str;&lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[1], &amp;amp;str);&lt;br /&gt;
	return strlen(str);&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let's say we want to modify the string.  There is an important note here: since the string is passed by reference, when you modify the string, it is also modified in the plugin.  This is a huge difference from AMX Mod X, where strings were essentially by value in most cases, and you had to copy results back.&lt;br /&gt;
&lt;br /&gt;
Thus, if we wanted to copy a new result into &amp;lt;tt&amp;gt;str&amp;lt;/tt&amp;gt; in the above implementation, it would be very easy.  If we were implementing &amp;lt;tt&amp;gt;strcpy()&amp;lt;/tt&amp;gt;, we would have to use &amp;lt;tt&amp;gt;memmove()&amp;lt;/tt&amp;gt; to make sure there are no overlaps.  Let's do this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Copies one string onto another.&lt;br /&gt;
 *&lt;br /&gt;
 * @param dest		Destination buffer to copy to.&lt;br /&gt;
 * @param length	Maximum length of the buffer.&lt;br /&gt;
 * @param source	Source to copy from.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native StringCopy(String:dest[], length, const String:source);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implementation using &amp;lt;tt&amp;gt;memmove&amp;lt;/tt&amp;gt; for safety:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_StringCopy(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	char *dest, *src;&lt;br /&gt;
	size_t len;&lt;br /&gt;
&lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[1], &amp;amp;dest);&lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[3], &amp;amp;src);&lt;br /&gt;
	&lt;br /&gt;
	/* Perform bounds checking */&lt;br /&gt;
	len = strlen(src);&lt;br /&gt;
	if (len &amp;gt;= params[2])&lt;br /&gt;
	{&lt;br /&gt;
		len = params[2] - 1;&lt;br /&gt;
	} else {&lt;br /&gt;
		len = params[2];&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/* Copy */&lt;br /&gt;
	memmove(dest, src, len);&lt;br /&gt;
&lt;br /&gt;
	dest[len] = '\0';&lt;br /&gt;
&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also use &amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt;, which would requires a temporary buffer for the original string:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_StringCopy(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	char *src;&lt;br /&gt;
	char buffer[2048];&lt;br /&gt;
	size_t len;&lt;br /&gt;
 &lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[3], &amp;amp;src);&lt;br /&gt;
 &lt;br /&gt;
	snprintf(buffer, sizeof(buffer), &amp;quot;%s&amp;quot;, src);&lt;br /&gt;
	pContext-&amp;gt;StringToLocal(params[1], params[2], buffer);&lt;br /&gt;
 &lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally, you will be using &amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt; for setting strings from outside sources, because it calculates addresses and overflows for you.  However, you must make sure that you are not overwriting memory as you are reading it, or else programmers who are using certain types of array slicing may find themselves getting unexpected results.&lt;br /&gt;
&lt;br /&gt;
=Advanced=&lt;br /&gt;
==Default Arguments==&lt;br /&gt;
Any type of parameter can have a default argument.  For example, here is a native where every argument has a default parameter:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native RandomStuff(a=0, Float:b=1.0f, &amp;amp;c=0, const String:d[]=&amp;quot;&amp;quot;, e[3] = {0,1,2});&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even by reference parameters can have default arguments, as shown above.  This does not change the code; it just means the address will contain the default value.  &lt;br /&gt;
&lt;br /&gt;
Scripts can force default values.  Example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native RandomStuff(a, b, c=0, d=0);&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
{&lt;br /&gt;
	RandomStuff(1, 2, _, d);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore ('_') means &amp;quot;use the default value for this argument.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Variable Arguments==&lt;br /&gt;
Variable arguments means any number of arguments can be passed.  An example of this looks like:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native FormatText(const String:format[], {Float,String,_}:...);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;{Float,Handle_}:&amp;lt;/tt&amp;gt; is a multi-tag specifier that means any extra parameters must be either a &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt;, or have no tag at all.  The &amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt; characters mean any number of parameters can follow.&lt;br /&gt;
&lt;br /&gt;
'''There is one important note about variable arguments.  They are always passed by reference.'''  This means if you have a function which supports variable arguments, and an integer is passed, you will need to use &amp;lt;tt&amp;gt;LocalToPhysAddr&amp;lt;/tt&amp;gt; as required with by reference parameters.  &lt;br /&gt;
&lt;br /&gt;
==Argument Counts/Backwards Compatibility==&lt;br /&gt;
In native handlers, the &amp;lt;tt&amp;gt;params&amp;lt;/tt&amp;gt; array has a 0th index which stores the number of parameters it contains.  This is useful for both Default Arguments and Variable Arguments.  &lt;br /&gt;
&lt;br /&gt;
For example, consider the following native:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native DoSomething(index);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's say that this native exists in plugins for six months.  After that, you decide to add a new parameter.  You want two conditions to be true after you release this update:&lt;br /&gt;
*Old plugins in binary form should still work on newer installations.&lt;br /&gt;
*Old plugins should still compile fine on the new API.&lt;br /&gt;
&lt;br /&gt;
The second condition is solved by using default arguments.  You should choose a value that will mimic the old functionality of the native.&lt;br /&gt;
&amp;lt;pawn&amp;gt;native DoSomething(index, newparam = 0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, when changing the implementation, you should detect whether &amp;lt;tt&amp;gt;params[0]&amp;lt;/tt&amp;gt; contains ''one parameter'' or ''two parameters''.  If it only contains one, you know to use the old version.  If it contains two, you know to use the later version and accept the second parameter.&lt;br /&gt;
&lt;br /&gt;
Similarly, you can use the &amp;lt;tt&amp;gt;params[0]&amp;lt;/tt&amp;gt; count to detect how many arguments were passed to a variable argument native.  This is used primarily in [[Format Class Functions (SourceMod Scripting)|Format Class Functions]] for parameter-count validation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Throwing Errors/Invoking the Debugger=&lt;br /&gt;
Often, you will write a native and realize that you need to tell the plugin that a serious error has occurred.  A good example of this is if you are writing a function which requires a player index, but that index is beyond the reasonable bounds for the maximum players in the server.&lt;br /&gt;
&lt;br /&gt;
In this case, it is a good idea to throw a ''runtime error''.  This is an error that halts the plugin and invokes a call trace from the debugger.  The halt is not permanent, but it does break the execution flow of the current callback.&lt;br /&gt;
&lt;br /&gt;
There are two ways to throw a native error: &amp;lt;tt&amp;gt;ThrowNativeErrorEx()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ThrowNativeError()&amp;lt;/tt&amp;gt;.  The former lets you specify a detailed error code from &amp;lt;tt&amp;gt;sp_vm_types.h&amp;lt;/tt&amp;gt;.  The latter is a helper function for generic errors, and it returns 0, allowing you to return with the function itself.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t GetPlayerFrags(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	if (params[1] &amp;lt; 0 || params[1] &amp;gt; maxplayers)&lt;br /&gt;
	{&lt;br /&gt;
		return pContext-&amp;gt;ThrowNativeError(&amp;quot;Invalid client index: %d&amp;quot;, params[1]);&lt;br /&gt;
	}&lt;br /&gt;
	/* ... rest of code ... */&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don't worry about including extra information, such as your native name or the module name.  The debugger knows all of this information and will decide what to print to the user.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Development]]&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Natives_(SourceMod_Development)&amp;diff=5010</id>
		<title>Natives (SourceMod Development)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Natives_(SourceMod_Development)&amp;diff=5010"/>
		<updated>2007-08-07T23:46:26Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: /* Strings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Natives are functions which are available to plugins via Core itself, or a C++ extension.  They are called &amp;quot;natives&amp;quot; because they must be translated via a ''native interface''.  This article explains the various parameter passing conventions in SourcePawn, as well as how to use them in your own natives.&lt;br /&gt;
&lt;br /&gt;
To understand the contents of this article, you will need to read [[Writing_Extensions#Creating_Native_Functions|Creating Natives]], the Native section in the introductory article on creating extensions.&lt;br /&gt;
&lt;br /&gt;
In this article, &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt; refers to the C/C++ data type, and &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt; (note capital 'F') refers to the SourcePawn [[Tags (Scripting)|tag]].&lt;br /&gt;
&lt;br /&gt;
=By Value versus By Reference=&lt;br /&gt;
There are two ways to pass integers/Floats to native implementations.  They are ''by value'' (ByVal) and ''by reference'' (ByRef).  ByVal means that a copy of the value is passed to the native.  This is the default behaviour.  ByRef means a ''reference'' is passed to the native, and this reference points to the value.  Both will be explained below.&lt;br /&gt;
&lt;br /&gt;
Note that arrays and strings, as will be explained later, are always passed by reference.  This is because they are usually larger structures, and passing them ByVal would require copying their data, wasting CPU cycles.&lt;br /&gt;
&lt;br /&gt;
==By Value==&lt;br /&gt;
Passing by value is the default behaviour for primitive data types (integers, Floats, or any tag that's cell-based).  Data is treated normally as raw, copied input.  Observe the following native:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Returns the number decremented by one.&lt;br /&gt;
 *&lt;br /&gt;
 * @param num		Number to decrement.&lt;br /&gt;
 * @return		Decremented number.&lt;br /&gt;
 */&lt;br /&gt;
native Decrement(num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How would we use this native?  Since &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; is passed as a value, it cannot change in the native code.  This means we have to use the return value as such:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;//Decrements a number 5 times&lt;br /&gt;
Example(num)&lt;br /&gt;
{&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	num = Decrement(num);&lt;br /&gt;
	return num;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==By Reference==&lt;br /&gt;
Let's reuse the above example to use reference passing.  Observe the new native below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Subtracts one from the given number, by reference.&lt;br /&gt;
 *&lt;br /&gt;
 * @param num		Number to subtract, by reference.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native Decrement(&amp;amp;num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the ampersand ('&amp;amp;') before the parameter name -- this specifies that it is passed by reference.  Now, let's see how this would look in our script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;Example(num)&lt;br /&gt;
{&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	return num;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, &amp;lt;tt&amp;gt;Decrement&amp;lt;/tt&amp;gt; is acting on the &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; variable ''itself'', not a copy of it.  Thus, num will decrease 5 times.  In fact, scripts can even do this internally.  We can shorten the example even more:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;Example(&amp;amp;num)&lt;br /&gt;
{&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
	Decrement(num);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==When to use By Ref==&lt;br /&gt;
There is a misconception that passing by reference is always better then by value.  After all, copying data sounds excessive.  However, by value in SourcePawn only works on 32bit values, and thus copying the value is inherent to the processor, and trivial.&lt;br /&gt;
&lt;br /&gt;
On the other hand, passing by reference is slightly more expensive.  First, the compiler has to generate a little extra code to compute the local address of the variable.  Second, the native code itself has to translate the local address to a ''real virtual address'' (native memory).&lt;br /&gt;
&lt;br /&gt;
It is a good idea to only use by reference when you need it.  A common usage is when you need to return more than one piece of data, and you can't fit it into the return value of your native or function.  In this case, by reference is ideal.&lt;br /&gt;
&lt;br /&gt;
=Integers/Floats=&lt;br /&gt;
&lt;br /&gt;
==By Value==&lt;br /&gt;
Natives based purely on by-value floating point or integer input are generally the easiest to make.  Let's take a simple function which takes in a Float and an integer, and returns a Float:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Raises a number to an integer power.&lt;br /&gt;
 *&lt;br /&gt;
 * @param fNum		Base number (Float).&lt;br /&gt;
 * @param exp		Exponent (integer).&lt;br /&gt;
 * @return		Computed exponent result as a Float.&lt;br /&gt;
 */&lt;br /&gt;
native FloatIntPower(Float:fNum, exp);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An implementation of this native might look like:&lt;br /&gt;
&amp;lt;cpp&amp;gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static cell_t sm_FloatIntPower(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	float f1 = sp_ctof(params[1]);&lt;br /&gt;
	int num = params[2];&lt;br /&gt;
	&lt;br /&gt;
	float result = (float)pow(f1, (double)f2);&lt;br /&gt;
	return sp_ftoc(result);&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Integers, as we saw in the introduction, are accessed from the parameter stack normally.  Floats, however, must be ''reinterpret casted'' from a &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;.  Two inline functions are provided for this:&lt;br /&gt;
*&amp;lt;tt&amp;gt;sp_ctof&amp;lt;/tt&amp;gt;: Convert a &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt; to a &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&amp;lt;tt&amp;gt;sp_ftoc&amp;lt;/tt&amp;gt;: Convert a &amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt; to a &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==By Reference==&lt;br /&gt;
By reference is a little more tricky.  Let's first implement our &amp;lt;tt&amp;gt;Decrement&amp;lt;/tt&amp;gt; native from earlier.  A refresher:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native Decrement(&amp;amp;num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we try to use our above code, &amp;lt;tt&amp;gt;params[1]&amp;lt;/tt&amp;gt; will no longer hold a value.  Instead, it holds a ''local address'' in the plugin.  We must use the &amp;lt;tt&amp;gt;LocalToPhysAddr&amp;lt;/tt&amp;gt; function to translate this.  It takes in a local address and returns back a physical pointer, which we can then modify.  This will modify the value in the script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_Decrement(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *addr;&lt;br /&gt;
&lt;br /&gt;
	/* Translate the address. */&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;addr);&lt;br /&gt;
&lt;br /&gt;
	/* Decrement the number */&lt;br /&gt;
	*addr -= 1;&lt;br /&gt;
&lt;br /&gt;
	/* We have to return something, even if the plugin doesn't the value */&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
''Note: LocalToPhysAddr can return an error code.  For all practical purposes, this will never error, unless there is some memory or corruption issue, so checking it isn't necessary.''&lt;br /&gt;
&lt;br /&gt;
This works the same way for floats.  Let's say we change our native to this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Decrements a Float by an integer, and stores the result by reference.&lt;br /&gt;
 *&lt;br /&gt;
 * @param fNum		Float number to decrement (by ref).&lt;br /&gt;
 * @param decamt	Amount to decrement by.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native Decrement(&amp;amp;Float:fNum, decamt);&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example is fairly contrived -- our native simply performs a subtract operation.  But let's look at the implementation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_Decrement(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *addr;&lt;br /&gt;
&lt;br /&gt;
	/* Translate the address. */&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;addr);&lt;br /&gt;
&lt;br /&gt;
	/* Get the value */&lt;br /&gt;
	float val = sp_ctof(*addr);&lt;br /&gt;
	/* Decrement */&lt;br /&gt;
	val -= params[2];&lt;br /&gt;
	/* Store back */&lt;br /&gt;
	*addr = sp_ftoc(val);&lt;br /&gt;
&lt;br /&gt;
	/* We have to return something, even if the plugin doesn't the value */&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even though the first parameter was passed by reference, the second was not, and is accessed normally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Arrays=&lt;br /&gt;
&lt;br /&gt;
==Basic Arrays==&lt;br /&gt;
Arrays are always passed by reference.  The first example is an array which contains a list of numbers to sum.  Observe the native:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Averages an array of numbers.&lt;br /&gt;
 *&lt;br /&gt;
 * @param array		Array of numbers to average.&lt;br /&gt;
 * @param num		Number of slots in the array.&lt;br /&gt;
 * @return		Average number as a Float.&lt;br /&gt;
 */&lt;br /&gt;
native Float:Average(array[], num);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage might look like:&lt;br /&gt;
&amp;lt;pawn&amp;gt;Example()&lt;br /&gt;
{&lt;br /&gt;
	new numbers[5] = {5, 6, 1, 3, 8};&lt;br /&gt;
	return Average(numbers, 5);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation, like the by ref examples above, requires &amp;lt;tt&amp;gt;LocalToPhysAddr&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_Average(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *array;&lt;br /&gt;
	float sum = 0.0f, average;&lt;br /&gt;
&lt;br /&gt;
	if (params[2] &amp;lt; 1)&lt;br /&gt;
	{&lt;br /&gt;
		/* 0 works without sp_ftoc() */&lt;br /&gt;
		return 0;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;array);&lt;br /&gt;
	for (cell_t i=0; i&amp;lt;params[2]; i++)&lt;br /&gt;
	{&lt;br /&gt;
		sum += array[i];&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	average = sum / params[2];&lt;br /&gt;
&lt;br /&gt;
	return sp_ftoc(average);&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Float Arrays==&lt;br /&gt;
This works similarly for Float arrays.  Let's take Vectors an example, with the following native:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Adds two vectors together.&lt;br /&gt;
 *&lt;br /&gt;
 * @param r	Array to store the result in.&lt;br /&gt;
 * @param v1	First vector to add.&lt;br /&gt;
 * @param v2	Second vector to add.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native AddVectors(Float:r[3], const Float:v1[3], const Float:v2[3]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation is straightforward:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_AddVectors(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	cell_t *v1, *v2;&lt;br /&gt;
	float result[3];&lt;br /&gt;
	&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[2], &amp;amp;v1);&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[3], &amp;amp;v2);&lt;br /&gt;
&lt;br /&gt;
	result[0] = sp_ctof(v1[0]) + sp_ctof(v2[0]);&lt;br /&gt;
	result[1] = sp_ctof(v1[1]) + sp_ctof(v2[1]);&lt;br /&gt;
	result[2] = sp_ctof(v1[2]) + sp_ctof(v2[2]);&lt;br /&gt;
&lt;br /&gt;
	cell_t *r;&lt;br /&gt;
	pContext-&amp;gt;LocalToPhysAddr(params[1], &amp;amp;r);&lt;br /&gt;
	r[0] = sp_ftoc(result[0]);&lt;br /&gt;
	r[1] = sp_ftoc(result[1]);&lt;br /&gt;
	r[2] = sp_ftoc(result[2]);&lt;br /&gt;
	&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we only store the result after we have computed the input, rather than store directly.  This is a bit more work, but is good practice in case users re-use data inputs, and risk overwriting inputs as they are written.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;new Float:origin[3];&lt;br /&gt;
AddVectors(origin, origin, origin);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Strings=&lt;br /&gt;
Strings are just like arrays, in that they are passed by reference.  The only difference is that each character is stored in a byte, not a 32bit &amp;lt;tt&amp;gt;cell_t&amp;lt;/tt&amp;gt;.  However, to make coding a bit easier for you, the coder, there are separate functions.&lt;br /&gt;
*&amp;lt;tt&amp;gt;LocalToString&amp;lt;/tt&amp;gt;: Converts a local address to a physical string address.&lt;br /&gt;
*&amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt;: Copies a physical string into a local address buffer.&lt;br /&gt;
*&amp;lt;tt&amp;gt;StringToLocalUTF8&amp;lt;/tt&amp;gt;: Same as &amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt;, but only copies the maximum amount possible without cutting off any multi byte characters.&lt;br /&gt;
&lt;br /&gt;
First, let's take an easy example: the infamous strlen.&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Returns the length of a string.&lt;br /&gt;
 * &lt;br /&gt;
 * @param string	String to calculate.&lt;br /&gt;
 * @return		Number of bytes in the string.&lt;br /&gt;
 */&lt;br /&gt;
native strlen(const String:string[]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implementation:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_StrLen(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	char *str;&lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[1], &amp;amp;str);&lt;br /&gt;
	return strlen(str);&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let's say we want to modify the string.  There is an important note here: since the string is passed by reference, when you modify the string, it is also modified in the plugin.  This is a huge difference from AMX Mod X, where strings were essentially by value in most cases, and you had to copy results back.&lt;br /&gt;
&lt;br /&gt;
Thus, if we wanted to copy a new result into &amp;lt;tt&amp;gt;str&amp;lt;/tt&amp;gt; in the above implementation, it would be very easy.  If we were implementing &amp;lt;tt&amp;gt;strcpy()&amp;lt;/tt&amp;gt;, we would have to use &amp;lt;tt&amp;gt;memmove()&amp;lt;/tt&amp;gt; to make sure there are no overlaps.  Let's do this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Copies one string onto another.&lt;br /&gt;
 *&lt;br /&gt;
 * @param dest		Destination buffer to copy to.&lt;br /&gt;
 * @param length	Maximum length of the buffer.&lt;br /&gt;
 * @param source	Source to copy from.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native StringCopy(String:dest[], length, const String:source);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implementation using &amp;lt;tt&amp;gt;memmove&amp;lt;/tt&amp;gt; for safety:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_StringCopy(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	char *dest, *src;&lt;br /&gt;
	size_t len;&lt;br /&gt;
&lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[1], &amp;amp;dest);&lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[3], &amp;amp;src);&lt;br /&gt;
	&lt;br /&gt;
	/* Perform bounds checking */&lt;br /&gt;
	len = strlen(src);&lt;br /&gt;
	if (len &amp;gt;= params[2])&lt;br /&gt;
	{&lt;br /&gt;
		len = params[2] - 1;&lt;br /&gt;
	} else {&lt;br /&gt;
		len = params[2];&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/* Copy */&lt;br /&gt;
	memmove(dest, src, len);&lt;br /&gt;
&lt;br /&gt;
	dest[len] = '\0';&lt;br /&gt;
&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also use &amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt;, which would requires a temporary buffer for the original string:&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t sm_StringCopy(IPluginContext *pContext, cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	char *src;&lt;br /&gt;
	char buffer[2048];&lt;br /&gt;
	size_t len;&lt;br /&gt;
&lt;br /&gt;
	pContext-&amp;gt;LocalToString(params[3], &amp;amp;src);&lt;br /&gt;
&lt;br /&gt;
	pContext-&amp;gt;StringToLocal(params[1], params[2], src);&lt;br /&gt;
&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally, you will be using &amp;lt;tt&amp;gt;StringToLocal&amp;lt;/tt&amp;gt; for setting strings from outside sources, because it calculates addresses and overflows for you.  However, you must make sure that you are not overwriting memory as you are reading it, or else programmers who are using certain types of array slicing may find themselves getting unexpected results.&lt;br /&gt;
&lt;br /&gt;
=Advanced=&lt;br /&gt;
==Default Arguments==&lt;br /&gt;
Any type of parameter can have a default argument.  For example, here is a native where every argument has a default parameter:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native RandomStuff(a=0, Float:b=1.0f, &amp;amp;c=0, const String:d[]=&amp;quot;&amp;quot;, e[3] = {0,1,2});&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even by reference parameters can have default arguments, as shown above.  This does not change the code; it just means the address will contain the default value.  &lt;br /&gt;
&lt;br /&gt;
Scripts can force default values.  Example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native RandomStuff(a, b, c=0, d=0);&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
{&lt;br /&gt;
	RandomStuff(1, 2, _, d);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore ('_') means &amp;quot;use the default value for this argument.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Variable Arguments==&lt;br /&gt;
Variable arguments means any number of arguments can be passed.  An example of this looks like:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native FormatText(const String:format[], {Float,String,_}:...);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;{Float,Handle_}:&amp;lt;/tt&amp;gt; is a multi-tag specifier that means any extra parameters must be either a &amp;lt;tt&amp;gt;Float&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt;, or have no tag at all.  The &amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt; characters mean any number of parameters can follow.&lt;br /&gt;
&lt;br /&gt;
'''There is one important note about variable arguments.  They are always passed by reference.'''  This means if you have a function which supports variable arguments, and an integer is passed, you will need to use &amp;lt;tt&amp;gt;LocalToPhysAddr&amp;lt;/tt&amp;gt; as required with by reference parameters.  &lt;br /&gt;
&lt;br /&gt;
==Argument Counts/Backwards Compatibility==&lt;br /&gt;
In native handlers, the &amp;lt;tt&amp;gt;params&amp;lt;/tt&amp;gt; array has a 0th index which stores the number of parameters it contains.  This is useful for both Default Arguments and Variable Arguments.  &lt;br /&gt;
&lt;br /&gt;
For example, consider the following native:&lt;br /&gt;
&amp;lt;pawn&amp;gt;native DoSomething(index);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's say that this native exists in plugins for six months.  After that, you decide to add a new parameter.  You want two conditions to be true after you release this update:&lt;br /&gt;
*Old plugins in binary form should still work on newer installations.&lt;br /&gt;
*Old plugins should still compile fine on the new API.&lt;br /&gt;
&lt;br /&gt;
The second condition is solved by using default arguments.  You should choose a value that will mimic the old functionality of the native.&lt;br /&gt;
&amp;lt;pawn&amp;gt;native DoSomething(index, newparam = 0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, when changing the implementation, you should detect whether &amp;lt;tt&amp;gt;params[0]&amp;lt;/tt&amp;gt; contains ''one parameter'' or ''two parameters''.  If it only contains one, you know to use the old version.  If it contains two, you know to use the later version and accept the second parameter.&lt;br /&gt;
&lt;br /&gt;
Similarly, you can use the &amp;lt;tt&amp;gt;params[0]&amp;lt;/tt&amp;gt; count to detect how many arguments were passed to a variable argument native.  This is used primarily in [[Format Class Functions (SourceMod Scripting)|Format Class Functions]] for parameter-count validation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Throwing Errors/Invoking the Debugger=&lt;br /&gt;
Often, you will write a native and realize that you need to tell the plugin that a serious error has occurred.  A good example of this is if you are writing a function which requires a player index, but that index is beyond the reasonable bounds for the maximum players in the server.&lt;br /&gt;
&lt;br /&gt;
In this case, it is a good idea to throw a ''runtime error''.  This is an error that halts the plugin and invokes a call trace from the debugger.  The halt is not permanent, but it does break the execution flow of the current callback.&lt;br /&gt;
&lt;br /&gt;
There are two ways to throw a native error: &amp;lt;tt&amp;gt;ThrowNativeErrorEx()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ThrowNativeError()&amp;lt;/tt&amp;gt;.  The former lets you specify a detailed error code from &amp;lt;tt&amp;gt;sp_vm_types.h&amp;lt;/tt&amp;gt;.  The latter is a helper function for generic errors, and it returns 0, allowing you to return with the function itself.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cpp&amp;gt;static cell_t GetPlayerFrags(IPluginContext *pContext, const cell_t *params)&lt;br /&gt;
{&lt;br /&gt;
	if (params[1] &amp;lt; 0 || params[1] &amp;gt; maxplayers)&lt;br /&gt;
	{&lt;br /&gt;
		return pContext-&amp;gt;ThrowNativeError(&amp;quot;Invalid client index: %d&amp;quot;, params[1]);&lt;br /&gt;
	}&lt;br /&gt;
	/* ... rest of code ... */&lt;br /&gt;
}&amp;lt;/cpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don't worry about including extra information, such as your native name or the module name.  The debugger knows all of this information and will decide what to print to the user.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Development]]&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Interface&amp;diff=4807</id>
		<title>War3Source Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Interface&amp;diff=4807"/>
		<updated>2007-06-21T22:31:55Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source_Development]]&lt;br /&gt;
=What is it?=&lt;br /&gt;
The War3Source interface allows users to customize their War3Source server for more suitable game play!&lt;br /&gt;
&lt;br /&gt;
=Enums=&lt;br /&gt;
These are enums used for various things such as immunities in War3Source.&lt;br /&gt;
&lt;br /&gt;
==War3Immunity==&lt;br /&gt;
&amp;lt;pawn&amp;gt;// The types of immunities you can get/set from.&lt;br /&gt;
enum War3Immunity&lt;br /&gt;
{&lt;br /&gt;
	Immunity_Ultimates = 0, // Immune from ultimates&lt;br /&gt;
	Immunity_HealthTake = 1, // Immune from health taking&lt;br /&gt;
	Immunity_Explosion = 2, // Immune from explosion based stuff&lt;br /&gt;
	Immunity_ShopItems = 3, // Immune from shop items&lt;br /&gt;
};&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Natives=&lt;br /&gt;
Natives are commands that you can call to make a modification plug-in for War3Source.&lt;br /&gt;
&lt;br /&gt;
==War3_CreateRace==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Registers a race with the War3Source plugin&lt;br /&gt;
 * @param name: The name of the race. (max 64)&lt;br /&gt;
 * @param short: The shortname used for SQL stuff. (max 16) &lt;br /&gt;
 * @param switchmessage_instant: The message displayed to the player when they are switched to a new race. (max 192)&lt;br /&gt;
 * @param switchmessage_dead: The message displayed to the play when they try to switch to the race, but they are alive so they need to wait until they die or the new round. (max 192)&lt;br /&gt;
 * @param skill1: The name of the first skill. (max 64)&lt;br /&gt;
 * @param skill1_desc: The description of the first skill. (max 192)&lt;br /&gt;
 * @param skill2: The name of the second skill. (max 64)&lt;br /&gt;
 * @param skill2_desc: The description of the second skill. (max 192)&lt;br /&gt;
 * @param skill3: The name of the third skill. (max 64)&lt;br /&gt;
 * @param skill3_desc: The description of the third skill. (max 192)&lt;br /&gt;
 * @param ult: The name of the ultimate. (max 64)&lt;br /&gt;
 * @param ult_desc: The description of the ultimate. (max 192)&lt;br /&gt;
 * @return The return value will be the race index or -1 if there was a problem.&lt;br /&gt;
 */         &lt;br /&gt;
native War3_CreateRace(String:name[],String:short[],String:switchmessage_instant[],String:switchmessage_dead[],String:skill1[],String:skill1_desc[],String:skill2[],String:skill2_desc[],String:skill3[],String:skill3_desc[],String:ult[],String:ult_desc[]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_CreateShopItem==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Registers a shop item with the War3Source plugin&lt;br /&gt;
 * @param name: The name of the item. (max 64)&lt;br /&gt;
 * @param desc: The description of the item. (max 256) &lt;br /&gt;
 * @param cost: The cost of the item as a string for vector reasons. (max 4 chars)&lt;br /&gt;
 * @return The return value will be the item index or -1 if there was a problem.&lt;br /&gt;
 */         &lt;br /&gt;
native War3_CreateShopItem(String:name[],String:desc[],String:cost[]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_CreateHelpCommand==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Registers a help command with the War3Source plugin for war3help&lt;br /&gt;
 * @param name: The name of the command. (max 64)&lt;br /&gt;
 * @param desc: The description of the command. (max 256) &lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_CreateHelpCommand(String:name[],String:desc[]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_GetWar3Player==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets the War3Player ID used for the rest of the War3 interface natives.&lt;br /&gt;
 * @param client: The client's index you want.&lt;br /&gt;
 * @return The return value will be the War3Player ID, -1 on failure.&lt;br /&gt;
 */&lt;br /&gt;
native War3_GetWar3Player(client);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_GetLevel==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets the current level for the provided race.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param race: The race ID returned from War3_CreateRace&lt;br /&gt;
 * @return The return value will be the level, if -1 then it failed.&lt;br /&gt;
 */&lt;br /&gt;
native War3_GetLevel(war3player,race);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_GetRace==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets the current race for the war3player.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @return The return value will be the race of the player, if -1 then it failed.&lt;br /&gt;
 */&lt;br /&gt;
native War3_GetRace(war3player);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_GetXP==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets the XP for the provided race.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param race: The race ID returned from War3_CreateRace&lt;br /&gt;
 * @return The return value will be the xp, if -1 then it failed.&lt;br /&gt;
 */&lt;br /&gt;
native War3_GetXP(war3player,race);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_SetXP==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Sets the XP for the provided race.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param race: The race ID returned from War3_CreateRace&lt;br /&gt;
 * @param newxp: The XP you want to set to &lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_SetXP(war3player,race,newxp);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_GetSkillLevel==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets the current level for the skill for the provided race.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param race: The race ID returned from War3_CreateRace&lt;br /&gt;
 * @param skill: The skill you want to lookup with, (0==skill1,1==skill2,2==skill3,3==ultimate) &lt;br /&gt;
 * @return The return value will be the skill level, if -1 then it failed.&lt;br /&gt;
 */&lt;br /&gt;
native War3_GetSkillLevel(war3player,race,skill);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_GetOwnsItem==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets if the player owns a specific item.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param item: The item ID returned from War3_CreateShopItem&lt;br /&gt;
 * @return The return value will be 1 if they own it, if 0 they don't, if -1 then it failed.&lt;br /&gt;
 */&lt;br /&gt;
native War3_GetOwnsItem(war3player,item);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_SetOwnsItem==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Sets if the player owns a specific item.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param item: The item ID returned from War3_CreateShopItem&lt;br /&gt;
 * @param owns: 1 if you want them to own it, 0 if you want them not to own it &lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_SetOwnsItem(war3player,item,owns);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_GetImmunity==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets the state of a certain immunity.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param immunity: The immunity you want to check. &lt;br /&gt;
 * @return The return value will be 1 if they are immune, if 0 they aren't, if -1 then it failed.&lt;br /&gt;
 */&lt;br /&gt;
native War3_GetImmunity(war3player,War3Immunity:immunity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_SetImmunity==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Sets if the player owns a specific item.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param immunity: The immunity you want to set.&lt;br /&gt;
 * @param imm_state: The state of immunity, 1 if they are, 0 if they aren't.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_SetImmunity(war3player,War3Immunity:immunity,imm_state);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_SetMaxSpeed==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Sets the speed for the player that is handled within the War3Source system, good for skills and items that set speed so you don't end up making the player slower.&lt;br /&gt;
 * Pass 1.0 as gravity when they no longer should use the speed, make sure to do this when they no longer have the skill or item, or whatever.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param speed: The speed you want to pass.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_SetMaxSpeed(war3player,Float:speed);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_SetMinGravity==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Sets the gravity for the player that is handled within the War3Source system, good for skills and items that set gravity so you don't end up making the player jump lower.&lt;br /&gt;
 * Pass 1.0 as gravity when they no longer should use the gravity, make sure to do this when they no longer have the skill or item, or whatever.&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param gravity: The gravity you want to pass.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_SetMinGravity(war3player,Float:gravity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_SetOverrideSpeed==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Overrides the speed for War3Source, useful for punishing them or whatever.&lt;br /&gt;
 * Pass 0.0 as speed when you want the War3Source system to take over again, make sure to do this when they are no longer supposed to follow!&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param speed: The speed you want to pass.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_SetOverrideSpeed(war3player,Float:speed);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==War3_SetOverrideGravity==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Overrides the gravity for War3Source, useful for punishing them or whatever.&lt;br /&gt;
 * Pass 0.0 as gravity when you want the War3Source system to take over again, make sure to do this when they are no longer supposed to follow!&lt;br /&gt;
 * @param war3player: The War3Player ID to use. Can be retrieved with War3_GetWar3Player.&lt;br /&gt;
 * @param gravity: The gravity you want to pass.&lt;br /&gt;
 * @noreturn&lt;br /&gt;
 */&lt;br /&gt;
native War3_SetOverrideGravity(war3player,Float:gravity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Forwards=&lt;br /&gt;
Forwards are functions that are called when happening.&lt;br /&gt;
Here is an example for the OnWar3PlayerAuthed forward.&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnWar3PlayerAuthed(client,war3player)&lt;br /&gt;
{&lt;br /&gt;
    PrintToServer(&amp;quot;Client index %d authenticated with the War3Source system, with War3Player ID %d.&amp;quot;,client,war3player);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OnRaceSelected==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets called when someone changes their race.&lt;br /&gt;
 * @param client: The client's index.&lt;br /&gt;
 * @param war3player: The War3Player ID of the client.&lt;br /&gt;
 * @param oldrace: The player's old race. &lt;br /&gt;
 * @param newrace: The player's new race.&lt;br /&gt;
 */&lt;br /&gt;
forward OnRaceSelected(client,war3player,oldrace,newrace);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OnUltimateCommand==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets called when the +ultimate or -ultimate command is called, IT ISNT ALWAYS FOR YOUR RACE, YOU NEED TO CHECK!!!&lt;br /&gt;
 * @param client: The client's index.&lt;br /&gt;
 * @param war3player: The War3Player ID of the client.&lt;br /&gt;
 * @param race: The race for which it was called.&lt;br /&gt;
 * @param pressed: If true, +ultimate, false, -ultimate.&lt;br /&gt;
 */&lt;br /&gt;
forward OnUltimateCommand(client,war3player,race,bool:pressed);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OnItemPurchase==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets called when a player purchases an item.&lt;br /&gt;
 * @param client: The client's index.&lt;br /&gt;
 * @param war3player: The War3Player ID of the client.&lt;br /&gt;
 * @param item: The item that was purchased.&lt;br /&gt;
 */&lt;br /&gt;
forward OnItemPurchase(client,war3player,item);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OnSkillLevelChanged==&lt;br /&gt;
&amp;lt;pawn&amp;gt;/**&lt;br /&gt;
 * Gets called when a skill level is changed.&lt;br /&gt;
 * @param client: The client's index.&lt;br /&gt;
 * @param war3player: The War3Player ID of the client.&lt;br /&gt;
 * @param race: The race effected.&lt;br /&gt;
 * @param skill: The skill effected.&lt;br /&gt;
 * @param oldskilllevel: The old skill level.&lt;br /&gt;
 * @param newskilllevel: The new skill level.   &lt;br /&gt;
 */&lt;br /&gt;
forward OnSkillLevelChanged(client,war3player,race,skill,oldskilllevel,newskilllevel);&amp;lt;/pawn&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Help_Commands&amp;diff=4806</id>
		<title>War3Source Creating Help Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Help_Commands&amp;diff=4806"/>
		<updated>2007-06-21T21:42:13Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source_Development]]&lt;br /&gt;
=What is it?=&lt;br /&gt;
When someone accesses the War3Source help menu through &amp;quot;war3help&amp;quot;, or a variant of the command, you can put your own custom commands on the menu!&lt;br /&gt;
&lt;br /&gt;
=How to do it=&lt;br /&gt;
The native is as followed.&lt;br /&gt;
&amp;lt;pawn&amp;gt;native War3_CreateHelpCommand(String:name[],String:desc[]);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
This would add the command &amp;quot;say hello there&amp;quot; with the description &amp;quot;This is a test command!&amp;quot; to the menu.&lt;br /&gt;
&amp;lt;pawn&amp;gt;public OnPluginStart()&lt;br /&gt;
{&lt;br /&gt;
    War3_CreateHelpCommand(&amp;quot;say hello there&amp;quot;,&amp;quot;This is a test command!&amp;quot;);&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Interface&amp;diff=4805</id>
		<title>War3Source Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Interface&amp;diff=4805"/>
		<updated>2007-06-20T13:54:21Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: New page: Category:War3Source_Development Placeholder.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source_Development]]&lt;br /&gt;
Placeholder.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Help_Commands&amp;diff=4804</id>
		<title>War3Source Creating Help Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Help_Commands&amp;diff=4804"/>
		<updated>2007-06-20T13:53:59Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: New page: Category:War3Source_Development Placeholder.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source_Development]]&lt;br /&gt;
Placeholder.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Shop_Items&amp;diff=4803</id>
		<title>War3Source Creating Shop Items</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Shop_Items&amp;diff=4803"/>
		<updated>2007-06-20T13:53:36Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: New page: Category:War3Source_Development Placeholder.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source_Development]]&lt;br /&gt;
Placeholder.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Races&amp;diff=4802</id>
		<title>War3Source Creating Races</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Races&amp;diff=4802"/>
		<updated>2007-06-20T13:51:26Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source_Development]]&lt;br /&gt;
Placeholder.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Races&amp;diff=4801</id>
		<title>War3Source Creating Races</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Creating_Races&amp;diff=4801"/>
		<updated>2007-06-20T13:50:49Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: New page: Placeholder.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Placeholder.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Category:War3Source_Development&amp;diff=4739</id>
		<title>Category:War3Source Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Category:War3Source_Development&amp;diff=4739"/>
		<updated>2007-06-09T19:05:02Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: New page: Category:War3Source Here are the documents on developing for War3Source.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source]]&lt;br /&gt;
Here are the documents on developing for War3Source.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Category:War3Source&amp;diff=4738</id>
		<title>Category:War3Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Category:War3Source&amp;diff=4738"/>
		<updated>2007-06-09T19:02:18Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: New page: Here are the wiki documents for War3Source.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are the wiki documents for War3Source.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=War3Source_Installation&amp;diff=4737</id>
		<title>War3Source Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=War3Source_Installation&amp;diff=4737"/>
		<updated>2007-06-09T19:01:42Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: New page: Category:War3Source Placeholder.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:War3Source]]&lt;br /&gt;
Placeholder.&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Useful_Signatures_(Source)&amp;diff=4587</id>
		<title>Useful Signatures (Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Useful_Signatures_(Source)&amp;diff=4587"/>
		<updated>2007-06-05T01:02:16Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
I have posted this page here so I can share some useful [http://wiki.alliedmods.net/Signature_Scanning sigscan] signatures. With these, and the use of [http://forums.alliedmods.net/showthread.php?t=53893 PimpinJuice's SigOffset Extension] you can call some very useful functions from within [[SourceMod]] plugins.&lt;br /&gt;
&lt;br /&gt;
=The difference between SignatureScanCall and SignatureScanCall_NoIndex=&lt;br /&gt;
In order to truely understand the difference between the two calls, you need to know how the function you have is constructed.&lt;br /&gt;
Lets take two functions, CBaseEntity::Teleport and CGib::SpawnRandomGibs.&lt;br /&gt;
In the C++ code of the source engine, the teleport function is constructed as follows:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void CBaseEntity::Teleport(Vector newPosition,QAngle newAngle,Vector newVelocity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you look around in the source code of the source engine, you will find it called like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;pEntity-&amp;gt;Teleport(location,angle,velocity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In the case that it is called by a pointer (pEntity-&amp;gt;) then you use SignatureScanCall.&lt;br /&gt;
Now lets take the spawn random gibs construction:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void CGib::SpawnRandomGibs(CBaseEntity *pVictim,int cGibs,GibType_e eGibType);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you look around, it is called like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;CGib::SpawnRandomGibs(pVictimEntity,6,0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In the case the there is NOT a pointer, you would use SignatureScanCall_NoIndex.&lt;br /&gt;
If you still do not understand, look below for the examples.&lt;br /&gt;
&lt;br /&gt;
=Function Signatures=&lt;br /&gt;
This is the list of all of the functions that we have signatures for.&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::Spawn==&lt;br /&gt;
This function is used to spawn player entities into the game. Either after creation, or re-spawn the player back to their spawn point. This function is good to call once you have changed the value of 'm_iTeamNum'. Once you have changed this value, you will need to call this function so the swapped player has the right skin and game rules associated.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xec\x2c\x53\x55\x56\x57\x68\x2c\x2d\x49\x22\x8b\xf1\xe8\x2d\x1c\xed\xff\x8b\x06\x8b\xce\xff\x90\x28\x04\x00\x00\x80\xbe\xad\x02\x00\x00\x01\x8d\x8e\xad\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x54\x24\x10\x52\xe8\x85\xa8\xed\xff\x80\xbe\xae\x02\x00\x00\x01\x8d\x8e\xae\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x44\x24\x10\x50\xe8\xb7\xa8\xed\xff\x8b\x16\x8b\xce\xff\x92\x9c\x05\x00\x00\x8b\x8e\xf8\x0b\x00\x00\x8b\xd8&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx?????xx?????xxxxxxxxxxxxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
107&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity5SpawnEv&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::Teleport==&lt;br /&gt;
This function will teleport an entity to a certain place in the world with a given vector. Useful for moving things across the world, or 'pushing' with a given force&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xEC\x18\x53\x56\x8B\xD9\x8B\x0D\x78\xB2\x46\x22\x33\xF6\x33\xC0\x3B\xCE\x7E\x21\x8B\x15\x6C\xB2\x46\x22\xEB\x03\x8D\x49\x00\x39\x1C\x82\x74\x09\x83\xC0\x01\x3B\xC1\x7C\xF4\xEB\x08\x3B\xC6\x0F\x8D\x17\x01\x00\x00\x55\x57\x8D\x44\x24\x10\x50\x51\xB9\x6C\xB2\x46\x22\x89\x5C\x24\x18\xE8\xB4\x88\xF9\xFF\x8D\x4C\x24\x14\x51\x53\x89\x44\x24\x18\x89\x74\x24\x1C\x89\x74\x24\x20\x89\x74\x24\x24\x89\x74\x24\x28\x89\x74\x24\x2C&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx??????xxxxxx?????????????xxx?????xx????xx??????x?????xx?????xxxx?????????xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
106&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity8TeleportEPK6VectorPK6QAngleS&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector newPosition'''&lt;br /&gt;
**The place to teleport to&lt;br /&gt;
*'''QAngle newAngles'''&lt;br /&gt;
**The new angle of the entity&lt;br /&gt;
*'''Vector newVelocity'''&lt;br /&gt;
**Directional vector for velocity&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;new Float:Pos[3];&lt;br /&gt;
new Float:Vel[3];&lt;br /&gt;
SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_VECTOR, Pos, PARAM_QANGLE, -1, PARAM_VECTOR, Vel);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::SetModel==&lt;br /&gt;
This function will set the model of the entity to the model that you specify. (Yes even player models ;))&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8b\x74\x24\x08\x57\x8b\xf9\x8b\x0d\x8c\x69\x5f\x22\x8b\x01\x56\xff\x50\x08\x8b\x0d\x8c\x69\x5f\x22\x8b\x11\x50\xff\x52\x04\x85\xc0\x74\x20\x8b\x0d\x8c\x69\x5f\x22\x8b\x11\x50\xff\xf2\x24\x83\xf8\x01&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx??????xxx?????????xxx???xx????????xxx??xxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
51&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity8SetModelEPKc&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''const char *szModelName'''&lt;br /&gt;
**The model to set to&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;PrecacheModel(&amp;quot;models/Alyx.mdl&amp;quot;);&lt;br /&gt;
SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_CONST_CHAR_PTR, &amp;quot;models/Alyx.mdl&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::SetModelIndex==&lt;br /&gt;
This function will set the model of the entity to the model index that you specify. To see a list of models currently cached and their id's type this into server console&lt;br /&gt;
&amp;lt;pawn&amp;gt;sv_cheats 1;listmodels;sv_cheats 0&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x8b\x5c\x24\x08\x56\x57\x8b\xf9\x66\x8b\x4f\x1e\x8d\x77\x1e\x8d\x44\x24\x10\x66\x3b\x08\x74\x0c\x56\x8d\x4e\xe2\xe8\x4a\xe9\xfd\xff\x66\x89\x18\x8b\xcf&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxx????????????????????&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
39&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity13SetModelIndexEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''int index '''&lt;br /&gt;
**The model index to set to&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_INT, 123);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBasePlayer::DamageEffect==&lt;br /&gt;
This function shows an effect like you would get if you got damaged. Some options dont do anything, but others look kinda cool&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x44\x24\x08\x83\xec\x14\xa8\x01\x56\x57\xeb\xf1\x74\x36\x6a\x01\xb0\x80\x68\xcd\xcc\xcc\x3d\x88\x44\x24\x2c\x88\x44\x24\x2f\x68\x00\x00\x80\x3f\x8d\x44\x24\x30\x50\x56\xc6\x44\x24\x39\x00\xc6\x44\x24\x3a\x00\xe8\x46\x6d\x09\x00\x83\xc4\x14\x5f&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx????xxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
62&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBasePlayer12DamageEffectEfi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Float flDamage'''&lt;br /&gt;
**[not used]&lt;br /&gt;
*'''int fDamageType'''&lt;br /&gt;
**DMG_CRUSH (1&amp;lt;&amp;lt;0)&lt;br /&gt;
**DMG_DROWN (1&amp;lt;&amp;lt;14)&lt;br /&gt;
**DMG_SLASH (1&amp;lt;&amp;lt;2)&lt;br /&gt;
**DMG_PLASMA (1&amp;lt;&amp;lt;24)&lt;br /&gt;
**DMG_SONIC (1&amp;lt;&amp;lt;9)&lt;br /&gt;
**MG_BULLET (1&amp;lt;&amp;lt;1)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_FLOAT, 0, PARAM_INT, (1&amp;lt;&amp;lt;24));&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBasePlayer::SetFOV==&lt;br /&gt;
This function will change the players Field of View (FOV) with a given zoom rate&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x57\x8b\x7c\x24\x03\x85\xff\x8b\xd9\x75\x07\x5f\x32\xc0\x5b\xc2\x0c\x00\x8b\x83\x08\x0a\x00\x00\x83\xf8\xff\x56\x8d\xb3\x08\x0a\x00\x00&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxx????????xxxxxxxxx??????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
35&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBasePlayer13SetDefaultFOVEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pRequester'''&lt;br /&gt;
**The entity of the player to change FOV of&lt;br /&gt;
*'''int FOV'''&lt;br /&gt;
**The FOV value (0-360) anything over 180 goes foobar (default 90)&lt;br /&gt;
*'''Float zoomRate'''&lt;br /&gt;
**Time it takes for the new FOV to zoom in/out&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_CBASEENTITY, client, PARAM_INT, 95, PARAM_FLOAT, 2.0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CCSPlayer::RoundRespawn==&lt;br /&gt;
This function causes a dead player in CS:S to respawn at a spawn point, we all love this one.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8B\xF1\x8B\x06\xFF\x90\xB8\x04\x00\x00\x8B\x86\xE8\x0D\x00\x00\x85\xC0\x74\x0E\x8B\x50\x18\x85\xD2\x74\x07\x8B\x48\x1C\x03\xCE\xFF\xD2&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxx??xxxxx??xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
35&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN9CCSPlayer12RoundRespawnEv&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sigSpawn,client,SIGTYPE_CCSPLAYER);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CCSPlayer::SwitchTeam (CS:S ONLY)==&lt;br /&gt;
This function will switch team of the player entity. It wont re-spawn the player, but it will switch the player to the new team without them dyeing.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xEC\x10\x56\x57\x8B\x7C\x24\x1C\x57\x8B\xF1\xE8\x7F\xE8\xF9\xFF\x83\xC4\x04\x85\xC0\x0F\x84\xEA\x00\x00\x00\x83\xFF\x03\x74\x09\x83\xFF\x02\x0F\x85\xDC\x00\x00\x00\x8B\xCE\xE8\xAF\x22\xE1\xFF\x3B\xF8\x0F\x84\xDC\x00\x00\x00\x57\x8B\xCE\xC6\x86\x14\x0E&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxx????xxxxxxxxxxxxx??&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
64&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN9CCSPlayer10SwitchTeamEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''int iTeamIndex'''&lt;br /&gt;
**The new team index of the player&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_INT, 2);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseAnimating::Ignite==&lt;br /&gt;
This function will ignite the entity (duh)&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8B\xF1\x8B\x86\xBC\x00\x00\x00\xC1\xE8\x1B\xA8\x01\x0F\x85\x9A\x00\x00\x00\x8B\x16\xFF\x92\xF0\x00\x00\x00\x80\x7C\x24\x0C\x00\x74\x08\x84\xC0\x0F\x84\x83\x00\x00\x00\x3C\x01\x75\x20\x80\x7C\x24\x14\x00\x75\x19\x8B\xCE\xE8\x83\x1A\x01\x00\x85\xC0\x74\x0E\x8B\x10\x8B\xC8\xFF\x92\x08\x05\x00\x00\x84\xC0\x74\x5F\x57\x6A\x01\x56\xE8\x48\xEA\x07\x00\x8B\xF8\x83\xC4\x08\x85\xFF\x74\x3D\x8B\x44\x24\x0C\x50\x8B\xCF\xE8\x83\xE5\x07\x00\x68\x00\x00\x00\x08\x8B\xCE&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxx?????????????????xxx????????????xx??????xx??xxxxx??xxx????????xxxxx?????xx??xxxxx????xxxxxxx??xxxxxxxx????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
116&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN14CBaseAnimating6IgniteEfbfb&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Float flFlameLifetime'''&lt;br /&gt;
**The time the fire should burn&lt;br /&gt;
*'''bool bNPCOnly'''&lt;br /&gt;
**I assume only NPC's get burnt&lt;br /&gt;
*'''float flSize'''&lt;br /&gt;
**Size of the flames&lt;br /&gt;
*'''bool bCalledByLevelDesigner'''&lt;br /&gt;
**Dont know what this is; I suggest setting to 0 because you are not the level designer :P&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEANIMATING, PARAM_FLOAT, 25.0, PARAM_INT, 0, PARAM_FLOAT, 100.0, PARAM_INT, 0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CGib::SpawnRandomGibs==&lt;br /&gt;
This function will spawn head gibs from the entity. Even though the signature says 'RandomGibs' the code is only setup to spawn head gibs. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x51\x8b\x44\x24\x0c\x85\xc0\x0f\x8e\x30\x01\x00\x00\x53\x55\x56\x57\x89\x44\x24\x1c\xbb\x01\x00\x00\x00\xed\x9b\x00\x00\x00\x00\x6a\x00\x68\xd8\xeb\x58\x22\x68\x20\x73\x57\x22\x6a\x00\x6a\xff\x68\xdc\x57\x4c\x22\xe8\x46\x55\x01\x00\x83\xc4\x08&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx??????xxxxxxxxxxxx???????????????????xxxx??????????xxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
61&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN4CGib15SpawnRandomGibsEP11CBaseEntityi9Gib&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pVictim'''&lt;br /&gt;
**The entity to spawn gibs from&lt;br /&gt;
*'''int cGibs'''&lt;br /&gt;
**The amount of gibs to spawn, I suggest anything over 1000000 ^^&lt;br /&gt;
*'''GibType_e eGibType'''&lt;br /&gt;
**GIB_HUMAN = 0 (Head gib)&lt;br /&gt;
**GIB_ALIEN = 1 (Head gib with some blood splatter) MUST PRECACHE &amp;quot;models/gibs/agibs.mdl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client, PARAM_INT, 10, PARAM_INT, 1);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodDrips==&lt;br /&gt;
This function will spawn a small 'splash' of blood under the entity. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x57\x8b\x7c\x24\x10\x83\xff\xff\x0f\x84\xe5\x00\x00\x00\x81\xff\xf7\x00\x00\x00\x75\x0b\xa1\x18\xa6\x61\x22\x83\x78\x2c\x00\xeb\x0a\x8b\x0d\xa8\xa6\x61\x22\x83\x79\x2c\x00\x0f\x95\xc0&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx??????xxxxxx???????xxxx????????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
46&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z15UTIL_BloodDripsRK6VectorS1_ii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The location to spawn the effect&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**Dont know what this is, i set it same as origin&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, origin, PARAM_INT, 247);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodStream==&lt;br /&gt;
Creates a moving stream of blood (like someone threw a bucket of water). Only shows pink/black (missing texture) still fun though. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x44\x24\x0c\x83\xec\x20\x50\xe8\x53\x5c\x00\x00\x83\xc4\x04\x84\xc0\x74\x61\x56\x8d\x4c\x24\x04\xe8\x42\x0b\xfa\xff\x8b\x74\x24\x28\x56\x8d\x4c\x24\x08\xc7\x44\x24\x08\x7c\x99\x4b\x22\xe8\x4c\x12\xfa\xff\x8b\x44\x24\x34\x3d\xff\x00\x00\x00&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx?????xxxxx??xxxxx?????xxxxxxxxx?????????????xxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
61&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z16UTIL_BloodStreamRK6VectorS1_ii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The place the blood starts&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**The place the blood lands (close to)&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
*'''int amount'''&lt;br /&gt;
**Dunno what this is (alpha?) set to 255&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
new Float:direction[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, direction, PARAM_INT, 247, PARAM_INT, 255);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodSpray==&lt;br /&gt;
Makes a blood spray (duh!)'''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x4c\x24\x0c\x83\xec\x60\x83\xf9\xff\x0f\x84\xa7\x00\x00\x00\x33\xc0\xdb\x44\x24\x70\x89\x44\x24\x34\x89\x44\x24\x44\x66\x89\x44\x24\x48\xd9\x5c\x24\x38\x89\x44\x24\x3c\x89\x44\x24\x40\x89\x44\x24\x4c&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxx??????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
51&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z15UTIL_BloodSprayRK6VectorS1_iii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The place the blood starts&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**The place the blood lands (close to)&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
*'''int amount'''&lt;br /&gt;
**Dunno what this is (alpha?) set to 255&lt;br /&gt;
*'''int flags'''&lt;br /&gt;
**0 nothing&lt;br /&gt;
**1 makes a baseball bat like blood spray&lt;br /&gt;
**2 makes a ring of blood mist&lt;br /&gt;
**3 makes an upward spray&lt;br /&gt;
**4 makes clouds of blood mist&lt;br /&gt;
**5 seems to be a mixture of the above&lt;br /&gt;
**6 seems to be a thicker cloud of dust&lt;br /&gt;
**(i cant be bothered to check any more. go experament)&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
new Float:direction[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, direction, PARAM_INT, 247, PARAM_INT, 255, PARAM_INT, 5);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_Tracer (NOT CS:S)==&lt;br /&gt;
Uhh.. dont know  i assume its for tracer stuff ^^ i guess someone will have a use for it :P '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xec\x60\x8b\x44\x24\x64\x8b\x10\x89\x54\x24\x0c\x8b\x50\x04\x8b\x40\x08\x89\x44\x24\x14\x8b\x44\x24\x68\x89\x54\x24\x10\x8b\x10\x33\xc9\x38\x4c\x24\x78\x89\x14\x24\x8b\x50\x04\x8b\x40\x08\x89\x44\x24\x08\x8b\x44\x24\x97\x89&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
54&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z11UTIL_TracerRK6VectorS1_iifbPKc&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector vecStart'''&lt;br /&gt;
**Starting Vector (duh)&lt;br /&gt;
*'''Vector vecEnd'''&lt;br /&gt;
**Ending Vector&lt;br /&gt;
*'''int EntIndex'''&lt;br /&gt;
**Entity index using the tracer&lt;br /&gt;
*'''int iAttachment'''&lt;br /&gt;
**Dont know (-1 for no attachement)&lt;br /&gt;
*'''float flVelocity'''&lt;br /&gt;
**Velocity the tracer moves at (m/s?)&lt;br /&gt;
*'''bool bWhiz'''&lt;br /&gt;
**I assume it emmits a sound?&lt;br /&gt;
*'''char ptr pCustomTracerName'''&lt;br /&gt;
**A nice name for your tracer &lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:start[3];&lt;br /&gt;
new Float:end[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, start, PARAM_VECTOR, end, PARAM_INT, client, PARAM_INT, -1, PARAM_FLOAT, 10.0, PARAM_INT, 1, PARAM_CONST_CHAR_PTR, &amp;quot;OLLY&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SetMinMaxSize==&lt;br /&gt;
Sets the size of the collision box around a Physics entity '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x8b\x5c\x24\x0c\x55\x8b\x6c\x24\x14\x56\x57\x8b\xf5\x2b\xdd\xbf\x03\x00\x00\x00\xd9\x04\x33\xd8\x1e\xdf\xe0\xf6\xc4\x41\x75\x23\x8b\x4c\x24\x14\x85\xc9&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx??xxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
39&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt; [cant find someone help me out?] &amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pEnt'''&lt;br /&gt;
**The entity ptr of the entity you are working with&lt;br /&gt;
*'''Vector mins'''&lt;br /&gt;
**The minimum size the box will 'squash' to when you run into it&lt;br /&gt;
*'''Vector max'''&lt;br /&gt;
**The maximum size&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:min[3];&lt;br /&gt;
new Float:max[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client, PARAM_VECTOR, min, PARAM_VECTOR, max);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CreateEntityByName==&lt;br /&gt;
Creates a new entity from the classname specified (Does NOT spawn the entity) '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8b\x74\x24\x0c\x83\xfe\xff\x57\x8b\x7c\x24\x0c\x74\x25\x8b\x0d\x68\x69\x5f\x22\x8b\x01\x56\xff\x50\x54\x85\xc0\xa3\x9c\xfa\x5c\x22\x75\x10\x56\x57\x68\x08\x6d\x4e\x22\xff\x15\xfc\xb1\x48\x22\x83\xc4\x0c&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxx??xxxxxxxxx???xx???????xx???????????xxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
52&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z18CreateEntityByNamePKci&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''char ptr classname'''&lt;br /&gt;
**The classname of the entity to make&lt;br /&gt;
*'''int iForceEdictIndex'''&lt;br /&gt;
**Manually set the edict ID (dont set for auto) (MUST BE &amp;gt; 64)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CONST_CHAR_PTR, &amp;quot;hostage_entity&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result'''&lt;br /&gt;
[[Image:De_dust0012.jpg]]&lt;br /&gt;
&lt;br /&gt;
==DispatchSpawn==&lt;br /&gt;
Used to spawn created entities, or to respawn players '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x55\x56\x8b\x74\x24\x10\x85\xf6\x57\x0f\x84\x3a\x01\x00\x00\x8b\x1d\xa4\x69\x5f\x22\x8b\x03\x8b\xcb\xff\x50\x60\x8b\x16\x8b\xce\xff\x52\x08\x8b\x0d\xa4\x69\x5f\x22\x8b\x28&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxx????????????xxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
44&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z13DispatchSpawnP11CBaseEntity&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pEntity'''&lt;br /&gt;
**The entity to spawn&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&amp;lt;pawn&amp;gt;//Yarrrr!&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Useful_Signatures_(Source)&amp;diff=4586</id>
		<title>Useful Signatures (Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Useful_Signatures_(Source)&amp;diff=4586"/>
		<updated>2007-06-05T00:56:07Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
I have posted this page here so I can share some useful [http://wiki.alliedmods.net/Signature_Scanning sigscan] signatures. With these, and the use of [http://forums.alliedmods.net/showthread.php?t=53893 PimpinJuice's SigOffset Extension] you can call some very useful functions from within [[SourceMod]] plugins.&lt;br /&gt;
&lt;br /&gt;
=The difference between SignatureScanCall and SignatureScanCall_NoIndex=&lt;br /&gt;
In order to truely understand the difference between the two calls, you need to know how the function you have is constructed.&lt;br /&gt;
Lets take two functions, CBaseEntity::Teleport and CGib::SpawnRandomGibs.&lt;br /&gt;
In the C++ code of the source engine, the teleport function is constructed as follows:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void CBaseEntity::Teleport(Vector newPosition,QAngle newAngle,Vector newVelocity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you look around in the source code of the source engine, you will find it called like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;pEntity-&amp;gt;Teleport(location,angle,velocity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In the case that it is called by a pointer (pEntity-&amp;gt;) then you use SignatureScanCall.&lt;br /&gt;
Now lets take the spawn random gibs construction:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void CGib::SpawnRandomGibs(CBaseEntity *pVictim,int cGibs,GibType_e eGibType);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you look around, it is called like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;CGib::SpawnRandomGibs(pVictimEntity,6,0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In the case the there is NOT a pointer, you would use SignatureScanCall_NoIndex.&lt;br /&gt;
If you still do not understand, look below for the examples.&lt;br /&gt;
&lt;br /&gt;
=Function Signatures=&lt;br /&gt;
This is the list of all of the functions that we have signatures for.&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::Spawn==&lt;br /&gt;
This function is used to spawn player entities into the game. Either after creation, or re-spawn the player back to their spawn point. This function is good to call once you have changed the value of 'm_iTeamNum'. Once you have changed this value, you will need to call this function so the swapped player has the right skin and game rules associated.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xec\x2c\x53\x55\x56\x57\x68\x2c\x2d\x49\x22\x8b\xf1\xe8\x2d\x1c\xed\xff\x8b\x06\x8b\xce\xff\x90\x28\x04\x00\x00\x80\xbe\xad\x02\x00\x00\x01\x8d\x8e\xad\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x54\x24\x10\x52\xe8\x85\xa8\xed\xff\x80\xbe\xae\x02\x00\x00\x01\x8d\x8e\xae\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x44\x24\x10\x50\xe8\xb7\xa8\xed\xff\x8b\x16\x8b\xce\xff\x92\x9c\x05\x00\x00\x8b\x8e\xf8\x0b\x00\x00\x8b\xd8&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx?????xx?????xxxxxxxxxxxxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
107&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity5SpawnEv&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CCSPlayer::RoundRespawn==&lt;br /&gt;
This function causes a dead player in CS:S to respawn at a spawn point, we all love this one.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8B\xF1\x8B\x06\xFF\x90\xB8\x04\x00\x00\x8B\x86\xE8\x0D\x00\x00\x85\xC0\x74\x0E\x8B\x50\x18\x85\xD2\x74\x07\x8B\x48\x1C\x03\xCE\xFF\xD2&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxx??xxxxx??xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
35&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN9CCSPlayer12RoundRespawnEv&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sigSpawn,client,SIGTYPE_CCSPLAYER);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::Teleport==&lt;br /&gt;
This function will teleport an entity to a certain place in the world with a given vector. Useful for moving things across the world, or 'pushing' with a given force&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xEC\x18\x53\x56\x8B\xD9\x8B\x0D\x78\xB2\x46\x22\x33\xF6\x33\xC0\x3B\xCE\x7E\x21\x8B\x15\x6C\xB2\x46\x22\xEB\x03\x8D\x49\x00\x39\x1C\x82\x74\x09\x83\xC0\x01\x3B\xC1\x7C\xF4\xEB\x08\x3B\xC6\x0F\x8D\x17\x01\x00\x00\x55\x57\x8D\x44\x24\x10\x50\x51\xB9\x6C\xB2\x46\x22\x89\x5C\x24\x18\xE8\xB4\x88\xF9\xFF\x8D\x4C\x24\x14\x51\x53\x89\x44\x24\x18\x89\x74\x24\x1C\x89\x74\x24\x20\x89\x74\x24\x24\x89\x74\x24\x28\x89\x74\x24\x2C&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx??????xxxxxx?????????????xxx?????xx????xx??????x?????xx?????xxxx?????????xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
106&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity8TeleportEPK6VectorPK6QAngleS&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector newPosition'''&lt;br /&gt;
**The place to teleport to&lt;br /&gt;
*'''QAngle newAngles'''&lt;br /&gt;
**The new angle of the entity&lt;br /&gt;
*'''Vector newVelocity'''&lt;br /&gt;
**Directional vector for velocity&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;new Float:Pos[3];&lt;br /&gt;
new Float:Vel[3];&lt;br /&gt;
SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_VECTOR, Pos, PARAM_QANGLE, -1, PARAM_VECTOR, Vel);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::SetModel==&lt;br /&gt;
This function will set the model of the entity to the model that you specify. (Yes even player models ;))&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8b\x74\x24\x08\x57\x8b\xf9\x8b\x0d\x8c\x69\x5f\x22\x8b\x01\x56\xff\x50\x08\x8b\x0d\x8c\x69\x5f\x22\x8b\x11\x50\xff\x52\x04\x85\xc0\x74\x20\x8b\x0d\x8c\x69\x5f\x22\x8b\x11\x50\xff\xf2\x24\x83\xf8\x01&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx??????xxx?????????xxx???xx????????xxx??xxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
51&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity8SetModelEPKc&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''const char *szModelName'''&lt;br /&gt;
**The model to set to&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;PrecacheModel(&amp;quot;models/Alyx.mdl&amp;quot;);&lt;br /&gt;
SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_CONST_CHAR_PTR, &amp;quot;models/Alyx.mdl&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::SetModelIndex==&lt;br /&gt;
This function will set the model of the entity to the model index that you specify. To see a list of models currently cached and their id's type this into server console&lt;br /&gt;
&amp;lt;pawn&amp;gt;sv_cheats 1;listmodels;sv_cheats 0&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x8b\x5c\x24\x08\x56\x57\x8b\xf9\x66\x8b\x4f\x1e\x8d\x77\x1e\x8d\x44\x24\x10\x66\x3b\x08\x74\x0c\x56\x8d\x4e\xe2\xe8\x4a\xe9\xfd\xff\x66\x89\x18\x8b\xcf&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxx????????????????????&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
39&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity13SetModelIndexEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''int index '''&lt;br /&gt;
**The model index to set to&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_INT, 123);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBasePlayer::DamageEffect==&lt;br /&gt;
This function shows an effect like you would get if you got damaged. Some options dont do anything, but others look kinda cool&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x44\x24\x08\x83\xec\x14\xa8\x01\x56\x57\xeb\xf1\x74\x36\x6a\x01\xb0\x80\x68\xcd\xcc\xcc\x3d\x88\x44\x24\x2c\x88\x44\x24\x2f\x68\x00\x00\x80\x3f\x8d\x44\x24\x30\x50\x56\xc6\x44\x24\x39\x00\xc6\x44\x24\x3a\x00\xe8\x46\x6d\x09\x00\x83\xc4\x14\x5f&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx????xxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
62&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBasePlayer12DamageEffectEfi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Float flDamage'''&lt;br /&gt;
**[not used]&lt;br /&gt;
*'''int fDamageType'''&lt;br /&gt;
**DMG_CRUSH (1&amp;lt;&amp;lt;0)&lt;br /&gt;
**DMG_DROWN (1&amp;lt;&amp;lt;14)&lt;br /&gt;
**DMG_SLASH (1&amp;lt;&amp;lt;2)&lt;br /&gt;
**DMG_PLASMA (1&amp;lt;&amp;lt;24)&lt;br /&gt;
**DMG_SONIC (1&amp;lt;&amp;lt;9)&lt;br /&gt;
**MG_BULLET (1&amp;lt;&amp;lt;1)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_FLOAT, 0, PARAM_INT, (1&amp;lt;&amp;lt;24));&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBasePlayer::SetFOV==&lt;br /&gt;
This function will change the players Field of View (FOV) with a given zoom rate&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x57\x8b\x7c\x24\x03\x85\xff\x8b\xd9\x75\x07\x5f\x32\xc0\x5b\xc2\x0c\x00\x8b\x83\x08\x0a\x00\x00\x83\xf8\xff\x56\x8d\xb3\x08\x0a\x00\x00&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxx????????xxxxxxxxx??????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
35&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBasePlayer13SetDefaultFOVEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pRequester'''&lt;br /&gt;
**The entity of the player to change FOV of&lt;br /&gt;
*'''int FOV'''&lt;br /&gt;
**The FOV value (0-360) anything over 180 goes foobar (default 90)&lt;br /&gt;
*'''Float zoomRate'''&lt;br /&gt;
**Time it takes for the new FOV to zoom in/out&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_CBASEENTITY, client, PARAM_INT, 95, PARAM_FLOAT, 2.0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CCSPlayer::SwitchTeam (CS:S ONLY)==&lt;br /&gt;
This function will switch team of the player entity. It wont re-spawn the player, but it will switch the player to the new team without them dyeing.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xEC\x10\x56\x57\x8B\x7C\x24\x1C\x57\x8B\xF1\xE8\x7F\xE8\xF9\xFF\x83\xC4\x04\x85\xC0\x0F\x84\xEA\x00\x00\x00\x83\xFF\x03\x74\x09\x83\xFF\x02\x0F\x85\xDC\x00\x00\x00\x8B\xCE\xE8\xAF\x22\xE1\xFF\x3B\xF8\x0F\x84\xDC\x00\x00\x00\x57\x8B\xCE\xC6\x86\x14\x0E&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxx????xxxxxxxxxxxxx??&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
64&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN9CCSPlayer10SwitchTeamEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''int iTeamIndex'''&lt;br /&gt;
**The new team index of the player&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_INT, 2);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseAnimating::Ignite==&lt;br /&gt;
This function will ignite the entity (duh)&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8B\xF1\x8B\x86\xBC\x00\x00\x00\xC1\xE8\x1B\xA8\x01\x0F\x85\x9A\x00\x00\x00\x8B\x16\xFF\x92\xF0\x00\x00\x00\x80\x7C\x24\x0C\x00\x74\x08\x84\xC0\x0F\x84\x83\x00\x00\x00\x3C\x01\x75\x20\x80\x7C\x24\x14\x00\x75\x19\x8B\xCE\xE8\x83\x1A\x01\x00\x85\xC0\x74\x0E\x8B\x10\x8B\xC8\xFF\x92\x08\x05\x00\x00\x84\xC0\x74\x5F\x57\x6A\x01\x56\xE8\x48\xEA\x07\x00\x8B\xF8\x83\xC4\x08\x85\xFF\x74\x3D\x8B\x44\x24\x0C\x50\x8B\xCF\xE8\x83\xE5\x07\x00\x68\x00\x00\x00\x08\x8B\xCE&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxx?????????????????xxx????????????xx??????xx??xxxxx??xxx????????xxxxx?????xx??xxxxx????xxxxxxx??xxxxxxxx????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
116&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN14CBaseAnimating6IgniteEfbfb&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Float flFlameLifetime'''&lt;br /&gt;
**The time the fire should burn&lt;br /&gt;
*'''bool bNPCOnly'''&lt;br /&gt;
**I assume only NPC's get burnt&lt;br /&gt;
*'''float flSize'''&lt;br /&gt;
**Size of the flames&lt;br /&gt;
*'''bool bCalledByLevelDesigner'''&lt;br /&gt;
**Dont know what this is; I suggest setting to 0 because you are not the level designer :P&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEANIMATING, PARAM_FLOAT, 25.0, PARAM_INT, 0, PARAM_FLOAT, 100.0, PARAM_INT, 0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CGib::SpawnRandomGibs==&lt;br /&gt;
This function will spawn head gibs from the entity. Even though the signature says 'RandomGibs' the code is only setup to spawn head gibs. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x51\x8b\x44\x24\x0c\x85\xc0\x0f\x8e\x30\x01\x00\x00\x53\x55\x56\x57\x89\x44\x24\x1c\xbb\x01\x00\x00\x00\xed\x9b\x00\x00\x00\x00\x6a\x00\x68\xd8\xeb\x58\x22\x68\x20\x73\x57\x22\x6a\x00\x6a\xff\x68\xdc\x57\x4c\x22\xe8\x46\x55\x01\x00\x83\xc4\x08&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx??????xxxxxxxxxxxx???????????????????xxxx??????????xxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
61&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN4CGib15SpawnRandomGibsEP11CBaseEntityi9Gib&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pVictim'''&lt;br /&gt;
**The entity to spawn gibs from&lt;br /&gt;
*'''int cGibs'''&lt;br /&gt;
**The amount of gibs to spawn, I suggest anything over 1000000 ^^&lt;br /&gt;
*'''GibType_e eGibType'''&lt;br /&gt;
**GIB_HUMAN = 0 (Head gib)&lt;br /&gt;
**GIB_ALIEN = 1 (Head gib with some blood splatter) MUST PRECACHE &amp;quot;models/gibs/agibs.mdl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client, PARAM_INT, 10, PARAM_INT, 1);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodDrips==&lt;br /&gt;
This function will spawn a small 'splash' of blood under the entity. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x57\x8b\x7c\x24\x10\x83\xff\xff\x0f\x84\xe5\x00\x00\x00\x81\xff\xf7\x00\x00\x00\x75\x0b\xa1\x18\xa6\x61\x22\x83\x78\x2c\x00\xeb\x0a\x8b\x0d\xa8\xa6\x61\x22\x83\x79\x2c\x00\x0f\x95\xc0&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx??????xxxxxx???????xxxx????????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
46&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z15UTIL_BloodDripsRK6VectorS1_ii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The location to spawn the effect&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**Dont know what this is, i set it same as origin&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, origin, PARAM_INT, 247);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodStream==&lt;br /&gt;
Creates a moving stream of blood (like someone threw a bucket of water). Only shows pink/black (missing texture) still fun though. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x44\x24\x0c\x83\xec\x20\x50\xe8\x53\x5c\x00\x00\x83\xc4\x04\x84\xc0\x74\x61\x56\x8d\x4c\x24\x04\xe8\x42\x0b\xfa\xff\x8b\x74\x24\x28\x56\x8d\x4c\x24\x08\xc7\x44\x24\x08\x7c\x99\x4b\x22\xe8\x4c\x12\xfa\xff\x8b\x44\x24\x34\x3d\xff\x00\x00\x00&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx?????xxxxx??xxxxx?????xxxxxxxxx?????????????xxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
61&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z16UTIL_BloodStreamRK6VectorS1_ii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The place the blood starts&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**The place the blood lands (close to)&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
*'''int amount'''&lt;br /&gt;
**Dunno what this is (alpha?) set to 255&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
new Float:direction[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, direction, PARAM_INT, 247, PARAM_INT, 255);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodSpray==&lt;br /&gt;
Makes a blood spray (duh!)'''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x4c\x24\x0c\x83\xec\x60\x83\xf9\xff\x0f\x84\xa7\x00\x00\x00\x33\xc0\xdb\x44\x24\x70\x89\x44\x24\x34\x89\x44\x24\x44\x66\x89\x44\x24\x48\xd9\x5c\x24\x38\x89\x44\x24\x3c\x89\x44\x24\x40\x89\x44\x24\x4c&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxx??????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
51&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z15UTIL_BloodSprayRK6VectorS1_iii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The place the blood starts&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**The place the blood lands (close to)&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
*'''int amount'''&lt;br /&gt;
**Dunno what this is (alpha?) set to 255&lt;br /&gt;
*'''int flags'''&lt;br /&gt;
**0 nothing&lt;br /&gt;
**1 makes a baseball bat like blood spray&lt;br /&gt;
**2 makes a ring of blood mist&lt;br /&gt;
**3 makes an upward spray&lt;br /&gt;
**4 makes clouds of blood mist&lt;br /&gt;
**5 seems to be a mixture of the above&lt;br /&gt;
**6 seems to be a thicker cloud of dust&lt;br /&gt;
**(i cant be bothered to check any more. go experament)&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
new Float:direction[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, direction, PARAM_INT, 247, PARAM_INT, 255, PARAM_INT, 5);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_Tracer (NOT CS:S)==&lt;br /&gt;
Uhh.. dont know  i assume its for tracer stuff ^^ i guess someone will have a use for it :P '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xec\x60\x8b\x44\x24\x64\x8b\x10\x89\x54\x24\x0c\x8b\x50\x04\x8b\x40\x08\x89\x44\x24\x14\x8b\x44\x24\x68\x89\x54\x24\x10\x8b\x10\x33\xc9\x38\x4c\x24\x78\x89\x14\x24\x8b\x50\x04\x8b\x40\x08\x89\x44\x24\x08\x8b\x44\x24\x97\x89&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
54&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z11UTIL_TracerRK6VectorS1_iifbPKc&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector vecStart'''&lt;br /&gt;
**Starting Vector (duh)&lt;br /&gt;
*'''Vector vecEnd'''&lt;br /&gt;
**Ending Vector&lt;br /&gt;
*'''int EntIndex'''&lt;br /&gt;
**Entity index using the tracer&lt;br /&gt;
*'''int iAttachment'''&lt;br /&gt;
**Dont know (-1 for no attachement)&lt;br /&gt;
*'''float flVelocity'''&lt;br /&gt;
**Velocity the tracer moves at (m/s?)&lt;br /&gt;
*'''bool bWhiz'''&lt;br /&gt;
**I assume it emmits a sound?&lt;br /&gt;
*'''char ptr pCustomTracerName'''&lt;br /&gt;
**A nice name for your tracer &lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:start[3];&lt;br /&gt;
new Float:end[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, start, PARAM_VECTOR, end, PARAM_INT, client, PARAM_INT, -1, PARAM_FLOAT, 10.0, PARAM_INT, 1, PARAM_CONST_CHAR_PTR, &amp;quot;OLLY&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SetMinMaxSize==&lt;br /&gt;
Sets the size of the collision box around a Physics entity '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x8b\x5c\x24\x0c\x55\x8b\x6c\x24\x14\x56\x57\x8b\xf5\x2b\xdd\xbf\x03\x00\x00\x00\xd9\x04\x33\xd8\x1e\xdf\xe0\xf6\xc4\x41\x75\x23\x8b\x4c\x24\x14\x85\xc9&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx??xxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
39&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt; [cant find someone help me out?] &amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pEnt'''&lt;br /&gt;
**The entity ptr of the entity you are working with&lt;br /&gt;
*'''Vector mins'''&lt;br /&gt;
**The minimum size the box will 'squash' to when you run into it&lt;br /&gt;
*'''Vector max'''&lt;br /&gt;
**The maximum size&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:min[3];&lt;br /&gt;
new Float:max[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client, PARAM_VECTOR, min, PARAM_VECTOR, max);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CreateEntityByName==&lt;br /&gt;
Creates a new entity from the classname specified (Does NOT spawn the entity) '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8b\x74\x24\x0c\x83\xfe\xff\x57\x8b\x7c\x24\x0c\x74\x25\x8b\x0d\x68\x69\x5f\x22\x8b\x01\x56\xff\x50\x54\x85\xc0\xa3\x9c\xfa\x5c\x22\x75\x10\x56\x57\x68\x08\x6d\x4e\x22\xff\x15\xfc\xb1\x48\x22\x83\xc4\x0c&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxx??xxxxxxxxx???xx???????xx???????????xxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
52&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z18CreateEntityByNamePKci&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''char ptr classname'''&lt;br /&gt;
**The classname of the entity to make&lt;br /&gt;
*'''int iForceEdictIndex'''&lt;br /&gt;
**Manually set the edict ID (dont set for auto) (MUST BE &amp;gt; 64)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CONST_CHAR_PTR, &amp;quot;hostage_entity&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result'''&lt;br /&gt;
[[Image:De_dust0012.jpg]]&lt;br /&gt;
&lt;br /&gt;
==DispatchSpawn==&lt;br /&gt;
Used to spawn created entities, or to respawn players '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x55\x56\x8b\x74\x24\x10\x85\xf6\x57\x0f\x84\x3a\x01\x00\x00\x8b\x1d\xa4\x69\x5f\x22\x8b\x03\x8b\xcb\xff\x50\x60\x8b\x16\x8b\xce\xff\x52\x08\x8b\x0d\xa4\x69\x5f\x22\x8b\x28&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxx????????????xxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
44&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z13DispatchSpawnP11CBaseEntity&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pEntity'''&lt;br /&gt;
**The entity to spawn&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&amp;lt;pawn&amp;gt;//Yarrrr!&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Useful_Signatures_(Source)&amp;diff=4570</id>
		<title>Useful Signatures (Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Useful_Signatures_(Source)&amp;diff=4570"/>
		<updated>2007-05-29T13:54:17Z</updated>

		<summary type="html">&lt;p&gt;Pimpinjuice: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
I have posted this page here so I can share some useful [http://wiki.alliedmods.net/Signature_Scanning sigscan] signatures. With these, and the use of [http://forums.alliedmods.net/showthread.php?t=53893 PimpinJuice's SigOffset Extension] you can call some very useful functions from within [[SourceMod]] plugins.&lt;br /&gt;
&lt;br /&gt;
=The difference between SignatureScanCall and SignatureScanCall_NoIndex=&lt;br /&gt;
In order to truely understand the difference between the two calls, you need to know how the function you have is constructed.&lt;br /&gt;
Lets take two functions, CBaseEntity::Teleport and CGib::SpawnRandomGibs.&lt;br /&gt;
In the C++ code of the source engine, the teleport function is constructed as follows:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void CBaseEntity::Teleport(Vector newPosition,QAngle newAngle,Vector newVelocity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you look around in the source code of the source engine, you will find it called like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;pEntity-&amp;gt;Teleport(location,angle,velocity);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In the case that it is called by a pointer (pEntity-&amp;gt;) then you use SignatureScanCall.&lt;br /&gt;
Now lets take the spawn random gibs construction:&lt;br /&gt;
&amp;lt;pawn&amp;gt;void CGib::SpawnRandomGibs(CBaseEntity *pVictim,int cGibs,GibType_e eGibType);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
If you look around, it is called like this:&lt;br /&gt;
&amp;lt;pawn&amp;gt;CGib::SpawnRandomGibs(pVictimEntity,6,0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In the case the there is NOT a pointer, you would use SignatureScanCall_NoIndex.&lt;br /&gt;
If you still do not understand, look below for the examples.&lt;br /&gt;
&lt;br /&gt;
=Function Signatures=&lt;br /&gt;
This is the list of all of the functions that we have signatures for.&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::Spawn==&lt;br /&gt;
This function is used to spawn player entities into the game. Either after creation, or re-spawn the player back to their spawn point. This function is good to call once you have changed the value of 'm_iTeamNum'. Once you have changed this value, you will need to call this function so the swapped player has the right skin and game rules associated.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xec\x2c\x53\x55\x56\x57\x68\x2c\x2d\x49\x22\x8b\xf1\xe8\x2d\x1c\xed\xff\x8b\x06\x8b\xce\xff\x90\x28\x04\x00\x00\x80\xbe\xad\x02\x00\x00\x01\x8d\x8e\xad\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x54\x24\x10\x52\xe8\x85\xa8\xed\xff\x80\xbe\xae\x02\x00\x00\x01\x8d\x8e\xae\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x44\x24\x10\x50\xe8\xb7\xa8\xed\xff\x8b\x16\x8b\xce\xff\x92\x9c\x05\x00\x00\x8b\x8e\xf8\x0b\x00\x00\x8b\xd8&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx?????xx?????xxxxxxxxxxxxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
107&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity5SpawnEv&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::Teleport==&lt;br /&gt;
This function will teleport an entity to a certain place in the world with a given vector. Useful for moving things across the world, or 'pushing' with a given force&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xEC\x18\x53\x56\x8B\xD9\x8B\x0D\x78\xB2\x46\x22\x33\xF6\x33\xC0\x3B\xCE\x7E\x21\x8B\x15\x6C\xB2\x46\x22\xEB\x03\x8D\x49\x00\x39\x1C\x82\x74\x09\x83\xC0\x01\x3B\xC1\x7C\xF4\xEB\x08\x3B\xC6\x0F\x8D\x17\x01\x00\x00\x55\x57\x8D\x44\x24\x10\x50\x51\xB9\x6C\xB2\x46\x22\x89\x5C\x24\x18\xE8\xB4\x88\xF9\xFF\x8D\x4C\x24\x14\x51\x53\x89\x44\x24\x18\x89\x74\x24\x1C\x89\x74\x24\x20\x89\x74\x24\x24\x89\x74\x24\x28\x89\x74\x24\x2C&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx??????xxxxxx?????????????xxx?????xx????xx??????x?????xx?????xxxx?????????xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
106&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity8TeleportEPK6VectorPK6QAngleS&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector newPosition'''&lt;br /&gt;
**The place to teleport to&lt;br /&gt;
*'''QAngle newAngles'''&lt;br /&gt;
**The new angle of the entity&lt;br /&gt;
*'''Vector newVelocity'''&lt;br /&gt;
**Directional vector for velocity&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;new Float:Pos[3];&lt;br /&gt;
new Float:Vel[3];&lt;br /&gt;
SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_VECTOR, Pos, PARAM_QANGLE, -1, PARAM_VECTOR, Vel);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::SetModel==&lt;br /&gt;
This function will set the model of the entity to the model that you specify. (Yes even player models ;))&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8b\x74\x24\x08\x57\x8b\xf9\x8b\x0d\x8c\x69\x5f\x22\x8b\x01\x56\xff\x50\x08\x8b\x0d\x8c\x69\x5f\x22\x8b\x11\x50\xff\x52\x04\x85\xc0\x74\x20\x8b\x0d\x8c\x69\x5f\x22\x8b\x11\x50\xff\xf2\x24\x83\xf8\x01&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx??????xxx?????????xxx???xx????????xxx??xxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
51&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity8SetModelEPKc&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''const char *szModelName'''&lt;br /&gt;
**The model to set to&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;PrecacheModel(&amp;quot;models/Alyx.mdl&amp;quot;);&lt;br /&gt;
SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_CONST_CHAR_PTR, &amp;quot;models/Alyx.mdl&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseEntity::SetModelIndex==&lt;br /&gt;
This function will set the model of the entity to the model index that you specify. To see a list of models currently cached and their id's type this into server console&lt;br /&gt;
&amp;lt;pawn&amp;gt;sv_cheats 1;listmodels;sv_cheats 0&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x8b\x5c\x24\x08\x56\x57\x8b\xf9\x66\x8b\x4f\x1e\x8d\x77\x1e\x8d\x44\x24\x10\x66\x3b\x08\x74\x0c\x56\x8d\x4e\xe2\xe8\x4a\xe9\xfd\xff\x66\x89\x18\x8b\xcf&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxx????????????????????&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
39&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBaseEntity13SetModelIndexEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''int index '''&lt;br /&gt;
**The model index to set to&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_INT, 123);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBasePlayer::DamageEffect==&lt;br /&gt;
This function shows an effect like you would get if you got damaged. Some options dont do anything, but others look kinda cool&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x44\x24\x08\x83\xec\x14\xa8\x01\x56\x57\xeb\xf1\x74\x36\x6a\x01\xb0\x80\x68\xcd\xcc\xcc\x3d\x88\x44\x24\x2c\x88\x44\x24\x2f\x68\x00\x00\x80\x3f\x8d\x44\x24\x30\x50\x56\xc6\x44\x24\x39\x00\xc6\x44\x24\x3a\x00\xe8\x46\x6d\x09\x00\x83\xc4\x14\x5f&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx????xxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
62&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBasePlayer12DamageEffectEfi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Float flDamage'''&lt;br /&gt;
**[not used]&lt;br /&gt;
*'''int fDamageType'''&lt;br /&gt;
**DMG_CRUSH (1&amp;lt;&amp;lt;0)&lt;br /&gt;
**DMG_DROWN (1&amp;lt;&amp;lt;14)&lt;br /&gt;
**DMG_SLASH (1&amp;lt;&amp;lt;2)&lt;br /&gt;
**DMG_PLASMA (1&amp;lt;&amp;lt;24)&lt;br /&gt;
**DMG_SONIC (1&amp;lt;&amp;lt;9)&lt;br /&gt;
**MG_BULLET (1&amp;lt;&amp;lt;1)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_FLOAT, 0, PARAM_INT, (1&amp;lt;&amp;lt;24));&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBasePlayer::SetFOV==&lt;br /&gt;
This function will change the players Field of View (FOV) with a given zoom rate&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x57\x8b\x7c\x24\x03\x85\xff\x8b\xd9\x75\x07\x5f\x32\xc0\x5b\xc2\x0c\x00\x8b\x83\x08\x0a\x00\x00\x83\xf8\xff\x56\x8d\xb3\x08\x0a\x00\x00&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxx????????xxxxxxxxx??????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
35&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN11CBasePlayer13SetDefaultFOVEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pRequester'''&lt;br /&gt;
**The entity of the player to change FOV of&lt;br /&gt;
*'''int FOV'''&lt;br /&gt;
**The FOV value (0-360) anything over 180 goes foobar (default 90)&lt;br /&gt;
*'''Float zoomRate'''&lt;br /&gt;
**Time it takes for the new FOV to zoom in/out&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_CBASEENTITY, client, PARAM_INT, 95, PARAM_FLOAT, 2.0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CCSPlayer::SwitchTeam (CS:S ONLY)==&lt;br /&gt;
This function will switch team of the player entity. It wont re-spawn the player, but it will switch the player to the new team without them dyeing.&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xEC\x10\x56\x57\x8B\x7C\x24\x1C\x57\x8B\xF1\xE8\x7F\xE8\xF9\xFF\x83\xC4\x04\x85\xC0\x0F\x84\xEA\x00\x00\x00\x83\xFF\x03\x74\x09\x83\xFF\x02\x0F\x85\xDC\x00\x00\x00\x8B\xCE\xE8\xAF\x22\xE1\xFF\x3B\xF8\x0F\x84\xDC\x00\x00\x00\x57\x8B\xCE\xC6\x86\x14\x0E&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxx????xxxxxxxxxxxxx??&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
64&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN9CCSPlayer10SwitchTeamEi&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''int iTeamIndex'''&lt;br /&gt;
**The new team index of the player&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_INT, 2);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CBaseAnimating::Ignite==&lt;br /&gt;
This function will ignite the entity (duh)&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8B\xF1\x8B\x86\xBC\x00\x00\x00\xC1\xE8\x1B\xA8\x01\x0F\x85\x9A\x00\x00\x00\x8B\x16\xFF\x92\xF0\x00\x00\x00\x80\x7C\x24\x0C\x00\x74\x08\x84\xC0\x0F\x84\x83\x00\x00\x00\x3C\x01\x75\x20\x80\x7C\x24\x14\x00\x75\x19\x8B\xCE\xE8\x83\x1A\x01\x00\x85\xC0\x74\x0E\x8B\x10\x8B\xC8\xFF\x92\x08\x05\x00\x00\x84\xC0\x74\x5F\x57\x6A\x01\x56\xE8\x48\xEA\x07\x00\x8B\xF8\x83\xC4\x08\x85\xFF\x74\x3D\x8B\x44\x24\x0C\x50\x8B\xCF\xE8\x83\xE5\x07\x00\x68\x00\x00\x00\x08\x8B\xCE&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxx?????????????????xxx????????????xx??????xx??xxxxx??xxx????????xxxxx?????xx??xxxxx????xxxxxxx??xxxxxxxx????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
116&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN14CBaseAnimating6IgniteEfbfb&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Float flFlameLifetime'''&lt;br /&gt;
**The time the fire should burn&lt;br /&gt;
*'''bool bNPCOnly'''&lt;br /&gt;
**I assume only NPC's get burnt&lt;br /&gt;
*'''float flSize'''&lt;br /&gt;
**Size of the flames&lt;br /&gt;
*'''bool bCalledByLevelDesigner'''&lt;br /&gt;
**Dont know what this is; I suggest setting to 0 because you are not the level designer :P&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall(sig_id, client, SIGTYPE_CBASEANIMATING, PARAM_FLOAT, 25.0, PARAM_INT, 0, PARAM_FLOAT, 100.0, PARAM_INT, 0);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CGib::SpawnRandomGibs==&lt;br /&gt;
This function will spawn head gibs from the entity. Even though the signature says 'RandomGibs' the code is only setup to spawn head gibs. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x51\x8b\x44\x24\x0c\x85\xc0\x0f\x8e\x30\x01\x00\x00\x53\x55\x56\x57\x89\x44\x24\x1c\xbb\x01\x00\x00\x00\xed\x9b\x00\x00\x00\x00\x6a\x00\x68\xd8\xeb\x58\x22\x68\x20\x73\x57\x22\x6a\x00\x6a\xff\x68\xdc\x57\x4c\x22\xe8\x46\x55\x01\x00\x83\xc4\x08&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxx??????xxxxxxxxxxxx???????????????????xxxx??????????xxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
61&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_ZN4CGib15SpawnRandomGibsEP11CBaseEntityi9Gib&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pVictim'''&lt;br /&gt;
**The entity to spawn gibs from&lt;br /&gt;
*'''int cGibs'''&lt;br /&gt;
**The amount of gibs to spawn, I suggest anything over 1000000 ^^&lt;br /&gt;
*'''GibType_e eGibType'''&lt;br /&gt;
**GIB_HUMAN = 0 (Head gib)&lt;br /&gt;
**GIB_ALIEN = 1 (Head gib with some blood splatter) MUST PRECACHE &amp;quot;models/gibs/agibs.mdl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client, PARAM_INT, 10, PARAM_INT, 1);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodDrips==&lt;br /&gt;
This function will spawn a small 'splash' of blood under the entity. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x57\x8b\x7c\x24\x10\x83\xff\xff\x0f\x84\xe5\x00\x00\x00\x81\xff\xf7\x00\x00\x00\x75\x0b\xa1\x18\xa6\x61\x22\x83\x78\x2c\x00\xeb\x0a\x8b\x0d\xa8\xa6\x61\x22\x83\x79\x2c\x00\x0f\x95\xc0&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx??????xxxxxx???????xxxx????????xxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
46&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z15UTIL_BloodDripsRK6VectorS1_ii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The location to spawn the effect&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**Dont know what this is, i set it same as origin&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, origin, PARAM_INT, 247);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodStream==&lt;br /&gt;
Creates a moving stream of blood (like someone threw a bucket of water). Only shows pink/black (missing texture) still fun though. '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x44\x24\x0c\x83\xec\x20\x50\xe8\x53\x5c\x00\x00\x83\xc4\x04\x84\xc0\x74\x61\x56\x8d\x4c\x24\x04\xe8\x42\x0b\xfa\xff\x8b\x74\x24\x28\x56\x8d\x4c\x24\x08\xc7\x44\x24\x08\x7c\x99\x4b\x22\xe8\x4c\x12\xfa\xff\x8b\x44\x24\x34\x3d\xff\x00\x00\x00&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxx?????xxxxx??xxxxx?????xxxxxxxxx?????????????xxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
61&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z16UTIL_BloodStreamRK6VectorS1_ii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The place the blood starts&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**The place the blood lands (close to)&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
*'''int amount'''&lt;br /&gt;
**Dunno what this is (alpha?) set to 255&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
new Float:direction[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, direction, PARAM_INT, 247, PARAM_INT, 255);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_BloodSpray==&lt;br /&gt;
Makes a blood spray (duh!)'''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x8b\x4c\x24\x0c\x83\xec\x60\x83\xf9\xff\x0f\x84\xa7\x00\x00\x00\x33\xc0\xdb\x44\x24\x70\x89\x44\x24\x34\x89\x44\x24\x44\x66\x89\x44\x24\x48\xd9\x5c\x24\x38\x89\x44\x24\x3c\x89\x44\x24\x40\x89\x44\x24\x4c&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxx??????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
51&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z15UTIL_BloodSprayRK6VectorS1_iii&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector origin'''&lt;br /&gt;
**The place the blood starts&lt;br /&gt;
*'''Vector direction'''&lt;br /&gt;
**The place the blood lands (close to)&lt;br /&gt;
*'''int color'''&lt;br /&gt;
**BLOOD_COLOR_RED = 247 (Wont work on German games :S)&lt;br /&gt;
**BLOOD_COLOR_YELLOW = 195&lt;br /&gt;
**BLOOD_COLOR_MECH = 20 (Makes smoke and sparks too)&lt;br /&gt;
*'''int amount'''&lt;br /&gt;
**Dunno what this is (alpha?) set to 255&lt;br /&gt;
*'''int flags'''&lt;br /&gt;
**0 nothing&lt;br /&gt;
**1 makes a baseball bat like blood spray&lt;br /&gt;
**2 makes a ring of blood mist&lt;br /&gt;
**3 makes an upward spray&lt;br /&gt;
**4 makes clouds of blood mist&lt;br /&gt;
**5 seems to be a mixture of the above&lt;br /&gt;
**6 seems to be a thicker cloud of dust&lt;br /&gt;
**(i cant be bothered to check any more. go experament)&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:origin[3];&lt;br /&gt;
new Float:direction[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, origin, PARAM_VECTOR, direction, PARAM_INT, 247, PARAM_INT, 255, PARAM_INT, 5);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UTIL_Tracer (NOT CS:S)==&lt;br /&gt;
Uhh.. dont know  i assume its for tracer stuff ^^ i guess someone will have a use for it :P '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x83\xec\x60\x8b\x44\x24\x64\x8b\x10\x89\x54\x24\x0c\x8b\x50\x04\x8b\x40\x08\x89\x44\x24\x14\x8b\x44\x24\x68\x89\x54\x24\x10\x8b\x10\x33\xc9\x38\x4c\x24\x78\x89\x14\x24\x8b\x50\x04\x8b\x40\x08\x89\x44\x24\x08\x8b\x44\x24\x97\x89&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
54&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z11UTIL_TracerRK6VectorS1_iifbPKc&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''Vector vecStart'''&lt;br /&gt;
**Starting Vector (duh)&lt;br /&gt;
*'''Vector vecEnd'''&lt;br /&gt;
**Ending Vector&lt;br /&gt;
*'''int EntIndex'''&lt;br /&gt;
**Entity index using the tracer&lt;br /&gt;
*'''int iAttachment'''&lt;br /&gt;
**Dont know (-1 for no attachement)&lt;br /&gt;
*'''float flVelocity'''&lt;br /&gt;
**Velocity the tracer moves at (m/s?)&lt;br /&gt;
*'''bool bWhiz'''&lt;br /&gt;
**I assume it emmits a sound?&lt;br /&gt;
*'''char ptr pCustomTracerName'''&lt;br /&gt;
**A nice name for your tracer &lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:start[3];&lt;br /&gt;
new Float:end[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_VECTOR, start, PARAM_VECTOR, end, PARAM_INT, client, PARAM_INT, -1, PARAM_FLOAT, 10.0, PARAM_INT, 1, PARAM_CONST_CHAR_PTR, &amp;quot;OLLY&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SetMinMaxSize==&lt;br /&gt;
Sets the size of the collision box around a Physics entity '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x8b\x5c\x24\x0c\x55\x8b\x6c\x24\x14\x56\x57\x8b\xf5\x2b\xdd\xbf\x03\x00\x00\x00\xd9\x04\x33\xd8\x1e\xdf\xe0\xf6\xc4\x41\x75\x23\x8b\x4c\x24\x14\x85\xc9&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx??xxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
39&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt; [cant find someone help me out?] &amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pEnt'''&lt;br /&gt;
**The entity ptr of the entity you are working with&lt;br /&gt;
*'''Vector mins'''&lt;br /&gt;
**The minimum size the box will 'squash' to when you run into it&lt;br /&gt;
*'''Vector max'''&lt;br /&gt;
**The maximum size&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
new Float:min[3];&lt;br /&gt;
new Float:max[3];&lt;br /&gt;
SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client, PARAM_VECTOR, min, PARAM_VECTOR, max);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CreateEntityByName==&lt;br /&gt;
Creates a new entity from the classname specified (Does NOT spawn the entity) '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x56\x8b\x74\x24\x0c\x83\xfe\xff\x57\x8b\x7c\x24\x0c\x74\x25\x8b\x0d\x68\x69\x5f\x22\x8b\x01\x56\xff\x50\x54\x85\xc0\xa3\x9c\xfa\x5c\x22\x75\x10\x56\x57\x68\x08\x6d\x4e\x22\xff\x15\xfc\xb1\x48\x22\x83\xc4\x0c&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxxxxx??xxxxxxxxx???xx???????xx???????????xxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
52&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z18CreateEntityByNamePKci&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''char ptr classname'''&lt;br /&gt;
**The classname of the entity to make&lt;br /&gt;
*'''int iForceEdictIndex'''&lt;br /&gt;
**Manually set the edict ID (dont set for auto) (MUST BE &amp;gt; 64)&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CONST_CHAR_PTR, &amp;quot;hostage_entity&amp;quot;);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result'''&lt;br /&gt;
[[Image:De_dust0012.jpg]]&lt;br /&gt;
&lt;br /&gt;
==DispatchSpawn==&lt;br /&gt;
Used to spawn created entities, or to respawn players '''NOTE: This function requires no pointer, check the Example Call to see how to get round this'''&lt;br /&gt;
&lt;br /&gt;
'''The Signature'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;\x53\x55\x56\x8b\x74\x24\x10\x85\xf6\x57\x0f\x84\x3a\x01\x00\x00\x8b\x1d\xa4\x69\x5f\x22\x8b\x03\x8b\xcb\xff\x50\x60\x8b\x16\x8b\xce\xff\x52\x08\x8b\x0d\xa4\x69\x5f\x22\x8b\x28&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The Mask'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;xxxxxxxxxx????????????xxxxxxxxxxxxxxxxxxxxxx&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Length'''&lt;br /&gt;
44&lt;br /&gt;
&lt;br /&gt;
'''Linux Function'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;_Z13DispatchSpawnP11CBaseEntity&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Function Paramaters'''&lt;br /&gt;
*'''CBaseEntity pEntity'''&lt;br /&gt;
**The entity to spawn&lt;br /&gt;
&lt;br /&gt;
'''Example Call'''&lt;br /&gt;
&amp;lt;pawn&amp;gt;SignatureScanCall_NoIndex(sig_id, PARAM_CBASEENTITY, client);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&amp;lt;pawn&amp;gt;//Yarrrr!&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;/div&gt;</summary>
		<author><name>Pimpinjuice</name></author>
		
	</entry>
</feed>