| AutoExecConfig | Specifies that the given config file should be executed after plugin load.
OnConfigsExecuted() will not be called until the config file has executed,
but it will be called if the execution fails. |
| CanTestFeatures | Returns whether "GetFeatureStatus" will work. Using this native
or this function will not cause SourceMod to fail loading on older versions,
however, GetFeatureStatus will only work if this function returns true. |
| FindPluginByNumber | Finds a plugin by its order in the list from the "plugins list" server
"sm" command. You should not use this function to loop through all plugins,
use the iterator instead. Looping through all plugins using this native
is O(n^2), whereas using the iterator is O(n). |
| FormatTime | Produces a date and/or time string value for a timestamp.
See this URL for valid parameters:
https://cplusplus.com/reference/ctime/strftime/
Note that available parameters depends on support from your operating system.
In particular, ones highlighted in yellow on that page are not currently
available on Windows and should be avoided for portable plugins. |
| GameConfGetAddress | Finds an address calculation in a GameConfig file,
performs LoadFromAddress on it as appropriate, then returns the final address. |
| GameConfGetKeyValue | Gets the value of a key from the "Keys" section. |
| GameConfGetOffset | Returns an offset value. |
| GetExtensionFileStatus | Returns the status of an extension, by filename. |
| GetFeatureStatus | Returns whether a feature exists, and if so, whether it is usable. |
| GetMyHandle | Returns the calling plugin's Handle. |
| GetPluginFilename | Retrieves a plugin's file name relative to the plugins folder. |
| GetPluginInfo | Retrieves a plugin's public info. |
| GetPluginIterator | Returns an iterator that can be used to search through plugins. |
| GetPluginStatus | Returns a plugin's status. |
| GetSysTickCount | Returns the operating system's "tick count," which is a number of
milliseconds since the operating system loaded. This can be used
for basic benchmarks. |
| GetTime | Gets the system time as a unix timestamp. |
| IsPluginDebugging | Retrieves whether or not a plugin is being debugged. |
| LibraryExists | Returns whether a library exists. This function should be considered
expensive; it should only be called on plugin to determine availability
of resources. Use OnLibraryAdded()/OnLibraryRemoved() to detect changes
in libraries. |
| LoadAddressFromAddress | Load sizeof(void*) from a memory address. |
| LoadFromAddress | Load up to 4 bytes from a memory address. |
| LoadGameConfigFile | Loads a game config file. |
| LogStackTrace | Logs a stack trace from the current function call. Code
execution continues after the call |
| MorePlugins | Returns whether there are more plugins available in the iterator. |
| ParseTime | Parses a string representing a date and/or time into a unix timestamp.
The timezone is always interpreted as UTC/GMT.
See this URL for valid parameters:
https://en.cppreference.com/w/cpp/io/manip/get_time
Note that available parameters depends on support from your operating system.
In particular, ones highlighted in yellow on that page are not currently
available on Windows and should be avoided for portable plugins. |
| ReadMapList | Loads a map list to an ADT Array.
A map list is a list of maps from a file. SourceMod allows easy configuration of
maplists through addons/sourcemod/configs/maplists.cfg. Each entry is given a
name and a file (for example, "rtv" => "rtv.cfg"), or a name and a redirection
(for example, "rtv" => "default"). This native will read a map list entry,
cache the file, and return the list of maps it holds.
Serial change numbers are used to identify if a map list has changed. Thus, if
you pass a serial change number and it's equal to what SourceMod currently knows
about the map list, then SourceMod won't re-parse the file.
If the maps end up being read from the maps folder (MAPLIST_FLAG_MAPSFOLDER), they
are automatically sorted in alphabetical, ascending order.
Arrays created by this function are temporary and must be freed via CloseHandle().
Modifying arrays created by this function will not affect future return values or
or the contents of arrays returned to other plugins. |
| ReadPlugin | Returns the current plugin in the iterator and advances the iterator. |
| RegPluginLibrary | Registers a library name for identifying as a dependency to
other plugins. |
| RequireFeature | Requires that a given feature is available. If it is not, SetFailState()
is called with the given message. |
| SetFailState | Causes the plugin to enter a failed state. An error will be thrown and
the plugin will be paused until it is unloaded or reloaded.
For backwards compatibility, if no extra arguments are passed, no
formatting is applied. If one or more additional arguments is passed,
the string is formatted using Format(). If any errors are encountered
during formatting, both the format specifier string and an additional
error message are written.
This function does not return, and no further code in the plugin is
executed. |
| SetMapListCompatBind | Makes a compatibility binding for map lists. For example, if a function previously used
"clam.cfg" for map lists, this function will insert a "fake" binding to "clam.cfg" that
will be overridden if it's in the maplists.cfg file. |
| StoreAddressToAddress | Store sizeof(void*) bytes to a memory address. |
| StoreToAddress | Store up to 4 bytes to a memory address. |
| ThrowError | Aborts the current callback and throws an error. This function
does not return in that no code is executed following it. |