https://wiki.alliedmods.net/api.php?action=feedcontributions&user=Cliptonheist&feedformat=atomAlliedModders Wiki - User contributions [en]2024-03-29T12:44:03ZUser contributionsMediaWiki 1.31.6https://wiki.alliedmods.net/index.php?title=SourcePawn_Basics_-_Handles,_DataPacks,_and_Timers&diff=11441SourcePawn Basics - Handles, DataPacks, and Timers2023-06-22T01:25:04Z<p>Cliptonheist: Update to new syntax</p>
<hr />
<div>Prerequisite:<br />
<br />
This guide assumes you have read [[Introduction to SourcePawn]] and [[Introduction to SourceMod Plugins]].<br />
<br />
==Handles==<br />
<br />
A '''<tt>Handle</tt>''' is a cell data type in Pawn that contains a pointer to an object stored in the SourceMod core.<br />
<br />
Handles have an associated handle type. Trying to pass the wrong kind of handle to a function will cause SourceMod to log an error and cause your current code to stop executing.<br />
<br />
Before using a Handle, you should always make sure it doesn't equal INVALID_HANDLE.<br />
<br />
You can make copies of a Handle using the <tt>CloneHandle</tt> function. Be aware that a cloned Handle still points to the same object as the original and that changes to the data on the object will show up in all clones. The object will only be destroyed when all Handles pointing to it are closed. You should clone a handle if you are receiving it from another plugin or extension that may close the handle before you finish with it.<br />
<br />
For most Handle types, you should use <tt>CloseHandle</tt> on the Handle when you are done with it. The major exceptions are Convars, non-repeating Timers, and DataPacks created using <tt>CreateDataTimer</tt>.<br />
<br />
If you fail to close a Handle, your plugin will leak Handles and memory and SourceMod will eventually restart the plugin.<br />
<br />
==DataPacks==<br />
<br />
Datapacks are a common type of Handle you will come across. They are a serialized set of data... that is, data must be read in the same order it was written. Datapacks are created with either the <tt>CreateDataTimer</tt> or <tt>CreateDataPack</tt> functions, and are assigned to a Handle variable.<br />
<br />
Data is written to a Datapack using the <tt>WritePackCell</tt>, <tt>WritePackFloat</tt>, and <tt>WritePackString</tt> functions. Remember that enums and Handles are both cells, so you can write those using the WritePackCell function.<br />
<br />
Before you read data back out of a Datapack, you must call <tt>ResetPack</tt> on it with the second argument set to false.<br />
<br />
Data can be read back out using <tt>ReadPackCell</tt>, <tt>ReadPackFloat</tt>, and <tt>ReadPackString</tt>. These '''must''' be called in the same order your called your Write functions.<br />
<br />
If you manually created a Data Pack, you should manually close the DataPack Handle when you are finished with it to avoid a Handle leak.<br />
<br />
Note: You will get warnings if you attempt to ReadPackCell and save the value to a <tt>bool</tt>, <tt>enum</tt>, or <tt>Handle</tt> value. You must retag those like so:<br />
<br />
ResetPack(data);<br />
bool myBool = ReadPackCell(data);<br />
<br />
==Timers==<br />
<br />
'''If you <tt>CloseHandle</tt> a timer, you should also set its variable to <tt>INVALID_HANDLE</tt>.'''<br />
<br />
Timers are used to run a block of code after a delay, or as a repeating timer to run code at regular intervals.<br />
<br />
Timers are created using one of two functions. The first is <tt>CreateTimer</tt>. The second is <tt>CreateDataTimer</tt>. The two functions have the same number of arguments, but <tt>CreateDataTimer</tt> will automatically create a [[#DataPacks|DataPack]], save it to the third argument, and implicitly have the <tt>TIMER_DATA_HNDL_CLOSE</tt> flag set.<br />
<br />
The first argument is the time as a Float... that is to say, if you want a 2 second timer, you must instead pass <tt>2.0</tt> .<br />
<br />
The second argument is a Timer callback function. See: [[#Timer Callback Functions|Timer Callback Functions]].<br />
<br />
For the data argument, you will usually want to pass a single value, such as a client userid, or use <tt>CreateDataTimer</tt> to create a DataPack. Never pass a client index to a timer. I repeat, '''never pass a client index to a timer'''. In most situations, you'll want to pass a Userid, such as one created by <tt>GetClientUserId(client)</tt> .<br />
<br />
=== Timer Flags === <br />
By default, a standard timer doesn't have any flags set. By default, a Data Timer has <tt>TIMER_DATA_HNDL_CLOSE</tt> set.<br />
<br />
The valid flags are the fourth argument to <tt>CreateTimer</tt> and <tt>CreateDataTimer</tt> are <br />
<br />
; <tt>TIMER_REPEAT</tt> : The timer will be called repeatedly until its handle is closed or the timer callback function returns <tt>Plugin_Stop</tt><br />
; <tt>TIMER_FLAG_NO_MAPCHANGE</tt> : The timer will automatically stop if the map changes<br />
; <tt>TIMER_DATA_HNDL_CLOSE</tt> : Automatically close the Handle when the Timer ends. This is the default for <tt>CreateDataTimer</tt>.<br />
<br />
=== "Fire and Forget" vs. "Tracked" Timers ===<br />
<br />
A "Fire and Forget" timer is one where you don't save the handle returned by the <tt>CreateTimer</tt> or <tt>CreateDataTimer</tt> functions. It is highly recommended that you pass the <tt>TIMER_FLAG_NO_MAPCHANGE</tt> flag for fire and forget timers.<br />
<br />
A "tracked" timer is one you save the Handle of when you create it. You can then call <tt>CloseHandle</tt> or <tt>KillTimer</tt> on it to end it early, or call TriggerTimer to trigger it early. It is recommended that you '''not''' pass the <tt>TIMER_FLAG_NO_MAPCHANGE</tt> for tracked timers and instead manually end them in <tt>OnMapEnd</tt> and set their variable to <tt>INVALID_HANDLE</tt>.<br />
<br />
=== Timer Callback Functions ===<br />
<br />
Timer callbacks always return an action. The return value only matters for repeating timers, which will stop as soon as you return Plugin_Stop.<br />
<br />
The 3 valid signatures are:<br />
<br />
<tt>Action MyFunc(Handle timer)</tt> - Use this when you don't pass any data to a timer at all.<br />
<br />
<tt>Action MyFunc(Handle timer, any data)</tt> - Use this when you pass a single value to a timer, such as a userid. Remember to convert userids back to client indexes using <tt>GetClientOfUserId</tt> and make sure it doesn't equal 0.<br />
<br />
<tt>Action MyFunc(Handle timer, Handle hndl)</tt> - Use this for a Data timer<br />
<br />
=== Timer Example ===<br />
<br />
In this example, we want to pass a userid to a timer. Note that Translation Strings are covered in [[Translations (SourceMod Scripting)]].<br />
<br />
public void OnClientPutInServer(int client)<br />
{<br />
CreateTimer(15.0, Timer_Greet, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);<br />
}<br />
<br />
Action Timer_Greet(Handle timer, any data)<br />
{<br />
int client = GetClientOfUserId(data);<br />
if (client == 0)<br />
{<br />
return Plugin_Stop;<br />
}<br />
char name[MAX_NAME_LENGTH];<br />
GetClientName(client, name, sizeof(name)); // In non-translation phrases use %N instead<br />
PrintToChat(client, "%t", "Hello", name);<br />
<br />
return Plugin_Stop;<br />
}<br />
<br />
[[Category:SourcePawn Basics]]</div>Cliptonheisthttps://wiki.alliedmods.net/index.php?title=Category:SourceMod_Scripting&diff=11332Category:SourceMod Scripting2022-08-04T08:12:38Z<p>Cliptonheist: Added transitional syntax wiki page to introductions heading</p>
<hr />
<div>This category contains articles about scripting for SourceMod with SourcePawn.<br />
<br />
===Introductions===<br />
*[[Introduction to SourcePawn 1.7]] - Learning language syntax.<br />
*[[SourcePawn Transitional Syntax]] - Learning transitional syntax.<br />
*[[Introduction to SourceMod Plugins]] - Writing your "first plugin."<br />
*[https://sm.alliedmods.net/new-api/ API Reference] - Searchable scripting API reference.<br />
<br />
===Basic API===<br />
*[[AutoConfigs (SourceMod Scripting)|AutoConfigs]] - Automatic .cfg creation for cvars.<br />
*[[Commands (SourceMod Scripting)|Commands]] - Console commands/input.<br />
*[[ConVars (SourceMod Scripting)|ConVars]] - Console variables (cvars).<br />
*[[Events (SourceMod Scripting)|Events]] - Half-Life 2 Game Events.<br />
*[[KeyValues (SourceMod Scripting)|KeyValues]] - KeyValues file parsing/writing.<br />
*[[Menu API (SourceMod)|Menus]] - Building and drawing menus.<br />
*[[SQL (SourceMod Scripting)|SQL]] - Using databases (MySQL, SQLite).<br />
*[[Timers (SourceMod Scripting)|Timers]] - Timed callbacks.<br />
*[[DataPacks|DataPacks]] - A good way to store asynchronous data.<br />
*[[Translations (SourceMod Scripting)|Translations]] - Internationalization.<br />
*[[Entity References (SourceMod)|Entity References]] - A safe way of storing entities.<br />
*[[Checking Admin Flags (SourceMod Scripting)|Checking Admin Flags]] - Limit commands to certain users<br />
<br />
===Advanced API===<br />
*[[Admin API (SourceMod)|Administration API]] - Using the Admin Cache.<br />
*[[Admin Menu (SourceMod Scripting)|Admin Menu API]] - Attaching to the Admin Menu.<br />
*[[Creating Natives (SourceMod Scripting)|Creating Natives]] - Exposing API to other plugins.<br />
*[[Function Calling API (SourceMod Scripting)|Function Calling API]] - Calling external functions.<br />
*[[Optional Requirements (SourceMod Scripting)|Optional Requirements]] - Managing dependencies.<br />
*[[SDKTools (SourceMod Scripting)|SDKTools]] - Using the powerful SDK abstraction layer.<br />
*[[TempEnts (SourceMod SDKTools)|Temporary Entities]] - Using temporary entities.<br />
<br />
===Information===<br />
*[[Format Class Functions (SourceMod Scripting)|Format Class Functions]] - All about text formatting.<br />
*[[Handles (SourceMod Scripting)|Handles]] - Overview of Handles and some common types.<br />
*[[Optimizing Plugins (SourceMod Scripting)|Optimizing Plugins]] - Optimization hints.<br />
*[[Tags (Scripting)|Tags]] - All about tags.<br />
*[[Vectors Explained (Scripting)|Vectors Explained]] - Explanation of Vector types.<br />
<br />
===Resources===<br />
*[https://sm.alliedmods.net/new-api/ API Reference] - Searchable scripting API reference.<br />
*[[Entity Properties]] - Explanation of Source entity properties.<br />
*[[Game Events (Source)|Game Events]] - Game events listings for popular mods.<br />
*[[Mod TempEnt List (Source)|Temp Entity Lists]] - Temporary entities for popular mods.<br />
*[[SourceMod Profiler]] - Performance tracking and optimizing.<br />
*[[Vice_keys]] - Decryption keys for ctx files<br />
*[[Weapon Names(Source)]] - Weapon Names / weapon entity names<br />
[[Category:SourceMod]]<br />
[[Category:SourceMod Development]]</div>Cliptonheisthttps://wiki.alliedmods.net/index.php?title=Managing_your_Sourcemod_installation&diff=11299Managing your Sourcemod installation2022-05-22T22:38:26Z<p>Cliptonheist: Changed dead HLSW link to updated github project</p>
<hr />
<div>{{Languages|Managing your Sourcemod installation}}<br />
== Getting Familiar ==<br />
=== Server console ===<br />
You've just [[Installing_SourceMod|installed sourcemod]] and made sure that it's working. For that you did the instructions in the [[Installing_SourceMod#Checking_the_Install|Checking the Install]] chapter and issued some first commands in the server console.<br />
<br />
Get more familiar with the console, either directly or preferably via rcon (e.g. by using [https://github.com/dgibbs64/HLSW-Fixes/ HLSW]).<br />
<br />
Try at least these commands:<br />
* sm<br />
* sm version<br />
* sm plugins<br />
* sm plugins list<br />
* sm plugins reload 1<br />
* sm plugins refresh<br />
* sm plugins unload funvotes<br />
* sm plugins load funvotes<br />
* sm exts list<br />
<br />
<br />
=== Directory Layout ===<br />
Also get to know the directory layout sourcemod is using, this means:<br />
# look and see what folders are there<br />
# what files are in them<br />
# and what's in those files <span style="font-size:80%">(open them with notepad (better: notepad++ or some other custom text editor)).</span><br />
<br />
{| style="width:600px;" cellpadding="5"<br />
!Directory<br />
!Description<br />
|- class="t2td"<br />
| '''/bin'''<br />
| ignore this folder, it has the actual sourcemod binaries in it<br />
|- class="t2td"<br />
| '''/configs'''<br />
| This is the default place where sourcemod and its plugins put their configuration files.<br />
Look at every file in this folder at least once, try to understand them.<br />
|- class="t2td"<br />
| '''/data'''<br />
| ignore this folder for now<br />
|- class="t2td"<br />
| '''/extensions'''<br />
| This is the directory where extensions must be installed. You might notice that many extensions exist multiple times, this is due to the fact that the different game engines each need their own extension based on their SDK.<br />
Lets take a look at the bintools extension for example:<br />
{| style="width:450px;" cellpadding="5"<br />
|- class="t1td"<br />
| '''bintools.ext.dll'''<br />
| This is for the original source engine<br />
|- class="t1td"<br />
| '''bintools.ext.1.ep1.dll'''<br />
| "Old Metamod" (Insurgency, Eternal Silence and other EP1 mods)<br />
|- class="t1td"<br />
| '''bintools.ext.2.darkm.dll'''<br />
| This is for Dark Messiah.<br />
|- class="t1td"<br />
| '''bintools.ext.2.ep2.dll'''<br />
| This is for the "OrangeBox"-Engine used by mods, e.g. ZPS, AOC, PVKII etc<br />
|- class="t1td"<br />
| '''bintools.ext.2.ep2v.dll'''<br />
| This is for the "OrangeBoxValve"-Engine e.g. CSS,TF2,DODS,HL2DM,GMOD.<br />
|- class="t1td"<br />
| '''bintools.ext.2.l4d.dll'''<br />
| This is for L4D<br />
|- class="t1td"<br />
| '''bintools.ext.2.l4d2.dll'''<br />
| This is for L4D2<br />
|- class="t1td"<br />
| '''bintools.ext.2.swarm.dll'''<br />
| This is for Alien Swarm<br />
|}<br />
|- class="t2td"<br />
| '''/gamedata'''<br />
| If an extension or a plugin is using functionality provided by the game engine, e.g. Respawn a player or equipping a player with a weapon, sourcemod needs to know a few "facts" (to be precise: offsets and signatures) about the function. These can change after valve releases an update. At this point you don't need to know more about this, because sourcemod has an integrated updater, which automatically fetches the new gamedata files for you.<br />
|- class="t2td"<br />
| '''/logs'''<br />
| The holy grail of debugging your actions. Everything will be logged here. If someone asks you what the logfiles are saying or whether you get any errors: reproduce your problem, then take a look at the logfiles and just copy&paste the messages. Don't try to be smart here and post what you think the given errors are saying, just post the lines. Or fix the problem yourself if you understand the error.<br />
|- class="t2td"<br />
| '''/plugins'''<br />
| All plugins (.smx files) in this directory will be loaded automatically when sourcemod starts. Plugins will also be reloaded on mapchange if their file has changed.<br />
|- class="t2td"<br />
| '''/plugins/disabled'''<br />
| Plugins in this sub-folder won't be loaded. Move plugins from the parent directory to this one to disable a plugin and vice-a-versa. You will find some official alliedmods plugins in this directory you might want to install (e.g. rockthevote) and some others you want to disable by moving them here (e.g. funvotes).<br />
|- class="t2td"<br />
| '''/scripting'''<br />
| You can find the sourcecode to plugins in this directory, at least the original alliedmods ones. You don't need to place any files here to install a plugin, but it is highly recommended to not only install the smx files, but also their corresponding sp file.<br />
|- class="t2td"<br />
| '''/translations'''<br />
| Not much to say about this folder, it contains translations for many languages. Plugins are encouraged to provide translation files, so you might need to copy some files in here when installing a plugin.<br />
|}<br />
<br />
<br />
=== Adding yourself as an admin ===<br />
To make things easier from now on, you should add yourself as an root-admin.<br />
There are several ways to manage access rights on your server. In this step we do it quick and dirty, but you might want to read the chapter about [[Adding_Admins_(SourceMod)|Adding Admins]] and [[Adding_Groups_(SourceMod)|Adding Groups]], then create a group for system administrators and add yourself to it.<br />
<br />
We are using the simple approach and just add one line to the <tt>admins_simple.cfg</tt> file in your <tt>sourcemod/configs/</tt> directory:<br />
<pre>"yoursteamid" "99:z"</pre><br />
Then enter '''sm_reloadadmins''' in the server console, you should get this as a response: <tt>[SM] Admin cache has been refreshed.</tt><br />
<br />
<br />
=== Try to disable/enable a plugin ===<br />
If you've read the subsection about the directory layout you should already know how to do this.<br />
<br />
And if you read the subsection about the server console you also know how to test if it worked.<br />
<br />
But lets explain this again. We want to enable the mapchooser plugin:<br />
# Copy <tt>plugins/disabled/mapchooser.smx</tt> to <tt>plugins/mapchooser.smx</tt><br />
# You can make this change active by either loading the plugin with <tt>sm plugins load mapchooser</tt><br>or by changing the map.<br />
# Lets take a look at the plugin list and see if it is being listed. Type <tt>sm plugins list</tt>.<br />
<br />
If not, read the chapter [[#How to test if your plugin is installed correctly|about testing sourcemod plugin installations]]?<br />
<br />
<br />
<br />
== Installing Plugins ==<br />
=== The basics ===<br />
For simple plugins that come only with the source and a binary like [http://forums.alliedmods.net/showthread.php?t=74531 Basic AFK Manager] installation is pretty straight forward and is basically the same as enabling one of the official plugins (see section [[#Try to disable/enable a plugin|1.4]]). You copy the <tt>.smx</tt> to the <tt>plugins</tt> folder and the <tt>.sp</tt> to the <tt>scripting</tt> folder.<br />
<br />
For more complex plugins like [http://forums.alliedmods.net/showthread.php?t=59147 SM Bot Tools] it might also be required to copy translations or gamedata to the corresponding folders, but the smart developer gives you a zip with the correct folder layout anyway, so you just need to copy everything to the sourcemod folder.<br />
<br />
'''Always follow instructions on the plugins page.'''<br />
<br />
<br />
=== Dependencies ===<br />
Rarely plugins have dependencies on other plugins, but it's quite common for a plugin to require one or more extensions. Extensions usually provide features that enable plugins to do stuff they couldnt otherwise. If a plugin has any dependencies it has to be noted somewhere in the plugin description. Look for it.<br />
<br />
Learn in chapter 3 [[#Installing an extension|how to install an extension]].<br />
<br />
<br />
=== How to test if your plugin is installed correctly ===<br />
When you are troubleshooting plugin and/or extension issues always use the server console. Forget the client console. SourceMod is a server-side addon after all.<br />
<br />
Just change the map after the installation and type <tt>sm plugins list</tt> in the server console. You should see the changes you've made. If the plugin you've installed is not listed, then it is not installed correctly (aka its not the plugins fault, but yours) and you need to figure out what you did wrong. Basically it has to be this: you didn't put the compiled plugin (the <tt>.smx</tt> file) in the <tt>/plugins</tt> directory of your sourcemod installation.<br />
<br />
If it is listed but prefixed with a <tt><Failed></tt>, something else went wrong. To get details what exactly was the problem type <tt>sm plugins info <plugin id></tt>, replace <tt><plugin id></tt> with the number of the plugin you've got in the list. It will probably say something like this:<br />
<br />
{| style="width:600px;" cellpadding="5"<br />
! scope="col" width="80" | <br />
! scope="col" width="180" |<br />
|- class="t2th"<br />
|Error || Description<br />
|- class="t2td"<br />
| '''Could not find translation file'''<br />
| You've forgot to put the translation files on the server or placed them in the wrong directory. Check the plugins thread again, check the provided zip again. If it is really missing from either of those, report it, otherwise: place them in the correct directory.<br />
|- class="t2td"<br />
| '''Native 'xyz' was not found'''<br>or<br>'''Required extension "xyz" file("xyz.ext") not running.'''<br />
| You've installed an old version of an extension or did not install a required extension in the first place. Check the installed version (by typing sm exts list) against the version on alliedmods and update if possible.<br />
|- class="t2td"<br />
| '''Wrong game'''<br />
| The plugin you are trying to use is not made for your game, but for another (e.g. [TF2] tHeadshotOnly is obviously only working on TF2). Disable the plugin to get rid of the error message.<br />
|}<br />
<br />
<br />
=== Helping the developer ===<br />
Ok, so you've tried everything to get a plugin to work, but it still won't load. This is pretty unusual. The plugin developer will think you did something wrong installing it and link you to this page. '''Prevent this from happening.''' Give them proof that you've reached a point where it is out of your hand to fix the problem. Tell them what you've tried, give them the console log (via screenshot if you can't copy+paste) and provide them with as much information as you can.<br />
<br />
<br />
<br />
== Installing Extensions ==<br />
=== The basics ===<br />
Extensions are like plugins, just more powerful. They load if required by a plugin and stay dormant if not. This means extensions that are not required by any of your plugins won't even load - you won't see them when typing <tt>sm exts list</tt>.<br />
<br />
Some extensions provide features for other plugins to use (like [http://forums.alliedmods.net/showthread.php?t=106748 SDKHooks]), some extensions influence the game directly (like [http://forums.alliedmods.net/showthread.php?t=145218 UnlockBlock]).<br />
<br />
=== Extension versions and filenames ===<br />
Some extensions will have just one version for all Source games. These will have filenames like <tt>bintools.ext.dll</tt> for Windows, <tt>bintools.ext.so</tt> for Linux, or <tt>bintools.ext.dylib</tt> for OSX.<br />
<br />
Other extensions will have multiple versions depending on the game engine being used. These filenames are generally named like this: <tt>[extension name].ext.[MetaMod: Source API version].[Game engine string].[extension]</tt>.<br />
<br />
For example, SDKTools has the following files in the Windows SourceMod release<br />
<br />
{| class="wikitable"<br />
|-<br />
! Games !! filename<br />
|-<br />
| Alien Swarm || <tt>sdktools.ext.2.swarm.dll</tt><br />
|-<br />
| Bloody Good Time || <tt>sdktools.ext.2.bgt.dll</tt><br />
|-<br />
| Dark Messiah || <tt>sdktools.ext.2.darkm.dll</tt><br />
|-<br />
| Episode 1 / Generic non-OB mods || <tt>sdktools.ext.1.ep1.dll</tt><br />
|-<br />
| Episode 2 / Orange Box / Source 2007 / Generic OB mods || <tt>sdktools.ext.2.ep2.dll</tt><br />
|-<br />
| E.Y.E: Divine Cybermancy || <tt>sdktools.ext.2.eye.dll</tt><br />
|-<br />
| Left 4 Dead || <tt>sdktools.ext.2.l4d.dll</tt><br />
|-<br />
| Left 4 Dead 2 || <tt>sdktools.ext.2.l4d2.dll</tt><br />
|-<br />
| Source 2009 / Half-Life 2: DeathMatch / Day of Defeat: Source / Counter-Strike: Source / Team Fortress 2 || <tt>sdktools.ext.2.ep2v.dll</tt><br />
|}<br />
<br />
=== Installing an extension ===<br />
This is pretty much the same as installing plugins, so it does not seem necessary to list the required steps, but i will do it anyway.<br />
To install an extension you just copy it to the <tt>/extensions</tt> directory.<br />
'''Extensions can require gamedata and translations like plugins, so don't forget to install them too.'''<br />
<br />
To actually load the extension just change the map or type <tt>sm exts load <name of your extension></tt> in the server console. Remember that extensions wont load automatically if they are not required in the first place.<br />
<br />
To force an extension to always load, just create an empty file with the name of the extension itself and the file-extension <tt>.autoload</tt>.<br />
* Example:<br />
** extension file name is <tt>extensions/sdkhooks.ext.2.ep2v.dll</tt><br />
** to autoload this extension create an empty file <tt>extensions/sdkhooks.autoload</tt><br />
<br />
'''Note:''' You can't update a running extension, you need to disable it first via <tt>sm unload <extensionname></tt> or stop your server. Otherwise your server will most likely crash if you're on linux and block you from doing so on windows.<br />
<br />
=== Troubleshooting extension issues ===<br />
Again, this is pretty much the same procedure that you've learned already.<br />
<br />
How to test if it is loaded or failed while loading? sm exts list<br />
How to load an extension at runtime? sm exts load <extension name><br />
<br />
Both should give you an output '''why''' it failed. Those can be the same reasons as in chapter [[#How to test if your plugin is installed correctly|How to test if your plugin is installed correctly]], so make sure to read that if you haven't done already.<br />
At the very least they should give you an indication on how to proceed.<br />
<br />
<br />
[[Category:SourceMod Documentation]]</div>Cliptonheist