#include <public/ISourceMod.h>
Inherits SourceMod::SMInterface.
Inheritance diagram for SourceMod::ISourceMod:


Public Member Functions | |
| virtual const char * | GetInterfaceName () |
| Must return a string defining the interface's unique name. | |
| virtual unsigned int | GetInterfaceVersion () |
| Must return an integer defining the interface's version. | |
| virtual const char * | GetGamePath () const=0 |
| Returns the full path to the game directory. | |
| virtual const char * | GetSourceModPath () const=0 |
| Returns the full path to the SourceMod directory. | |
| virtual size_t | BuildPath (PathType type, char *buffer, size_t maxlength, const char *format,...)=0 |
| Builds a platform path for a specific target base path. | |
| virtual void | LogMessage (IExtension *pExt, const char *format,...)=0 |
| Logs a message to the SourceMod logs. | |
| virtual void | LogError (IExtension *pExt, const char *format,...)=0 |
| Logs a message to the SourceMod error logs. | |
| virtual size_t | FormatString (char *buffer, size_t maxlength, SourcePawn::IPluginContext *pContext, const cell_t *params, unsigned int param)=0 |
| Formats a string from a native. | |
| virtual IDataPack * | CreateDataPack ()=0 |
| Creates a data pack object. | |
| virtual void | FreeDataPack (IDataPack *pack)=0 |
| Releases a data pack's resources so it can be re-used. | |
| virtual HandleType_t | GetDataPackHandleType (bool readonly=false)=0 |
| Not implemented, do not use. | |
| virtual KeyValues * | ReadKeyValuesHandle (Handle_t hndl, HandleError *err=NULL, bool root=false)=0 |
| Retrieves a KeyValues pointer from a handle. | |
| virtual const char * | GetGameFolderName () const=0 |
| Returns the name of the game directory. | |
| virtual SourcePawn::ISourcePawnEngine * | GetScriptingEngine ()=0 |
| Returns the scripting engine interface. | |
| virtual SourcePawn::IVirtualMachine * | GetScriptingVM ()=0 |
| Deprecated, do not use. | |
| virtual time_t | GetAdjustedTime ()=0 |
| Returns the adjusted server time. | |
| virtual unsigned int | SetGlobalTarget (unsigned int index)=0 |
| Sets the global client SourceMod will use for assisted translations (that is, t). | |
| virtual unsigned int | GetGlobalTarget () const=0 |
| Returns the global client SourceMod is currently using for assisted translations (that is, t). | |
| virtual void | AddGameFrameHook (GAME_FRAME_HOOK hook)=0 |
| Adds a function to be called each game frame. | |
| virtual void | RemoveGameFrameHook (GAME_FRAME_HOOK hook)=0 |
| Removes one game frame hook matching the given function. | |
| virtual size_t | Format (char *buffer, size_t maxlength, const char *fmt,...)=0 |
| Platform-safe wrapper around snprintf(). | |
| virtual size_t | FormatArgs (char *buffer, size_t maxlength, const char *fmt, va_list ap)=0 |
| Platform-safe wrapper around vsnprintf(). | |
| virtual void | AddFrameAction (FRAMEACTION fn, void *data)=0 |
| Adds an action to be executed on the next available frame. | |
| virtual const char * | GetCoreConfigValue (const char *key)=0 |
| Retrieves a core.cfg configuration value. | |
| virtual int | GetPluginId ()=0 |
| Returns SourceMod's Metamod:Source plugin ID. | |
Definition at line 83 of file ISourceMod.h.
| virtual const char* SourceMod::ISourceMod::GetGamePath | ( | ) | const [pure virtual] |
Returns the full path to the game directory.
| virtual const char* SourceMod::ISourceMod::GetSourceModPath | ( | ) | const [pure virtual] |
| virtual size_t SourceMod::ISourceMod::BuildPath | ( | PathType | type, | |
| char * | buffer, | |||
| size_t | maxlength, | |||
| const char * | format, | |||
| ... | ||||
| ) | [pure virtual] |
Builds a platform path for a specific target base path.
If the path starts with the string "file://" and the PathType is not relative, then the "file://" portion is stripped off, and the rest of the path is used without any modification (except for correcting slashes). This can be used to override the path builder to supply alternate absolute paths. Examples:
file://C:/Temp/file.txt file:///tmp/file.txt
| type | Type of path to use as a base. | |
| buffer | Buffer to write to. | |
| maxlength | Size of buffer. | |
| format | Format string. | |
| ... | Format arguments. |
| virtual void SourceMod::ISourceMod::LogMessage | ( | IExtension * | pExt, | |
| const char * | format, | |||
| ... | ||||
| ) | [pure virtual] |
Logs a message to the SourceMod logs.
| pExt | Extension calling this function. | |
| format | Message format. | |
| ... | Message format parameters. |
| virtual void SourceMod::ISourceMod::LogError | ( | IExtension * | pExt, | |
| const char * | format, | |||
| ... | ||||
| ) | [pure virtual] |
Logs a message to the SourceMod error logs.
| pExt | Extension calling this function. | |
| format | Message format. | |
| ... | Message format parameters. |
| virtual size_t SourceMod::ISourceMod::FormatString | ( | char * | buffer, | |
| size_t | maxlength, | |||
| SourcePawn::IPluginContext * | pContext, | |||
| const cell_t * | params, | |||
| unsigned int | param | |||
| ) | [pure virtual] |
Formats a string from a native.
| buffer | Buffer to store message. | |
| maxlength | Maximum length of buffer (including null terminator). | |
| pContext | Pointer to the plugin's context. | |
| params | Parameter array that was passed to the native. | |
| param | Parameter index where format string and variable arguments begin. Note: parameter indexes start at 1. |
| virtual IDataPack* SourceMod::ISourceMod::CreateDataPack | ( | ) | [pure virtual] |
| virtual void SourceMod::ISourceMod::FreeDataPack | ( | IDataPack * | pack | ) | [pure virtual] |
Releases a data pack's resources so it can be re-used.
| pack | An IDataPack object to release. |
| virtual HandleType_t SourceMod::ISourceMod::GetDataPackHandleType | ( | bool | readonly = false |
) | [pure virtual] |
Not implemented, do not use.
| readonly | Ignored |
| virtual KeyValues* SourceMod::ISourceMod::ReadKeyValuesHandle | ( | Handle_t | hndl, | |
| HandleError * | err = NULL, |
|||
| bool | root = false | |||
| ) | [pure virtual] |
Retrieves a KeyValues pointer from a handle.
| hndl | Handle_t from which to retrieve contents. | |
| err | Optional address to store a possible handle error. | |
| root | If true it will return the root KeyValues pointer for the whole structure. |
| virtual const char* SourceMod::ISourceMod::GetGameFolderName | ( | ) | const [pure virtual] |
Returns the name of the game directory.
| virtual SourcePawn::ISourcePawnEngine* SourceMod::ISourceMod::GetScriptingEngine | ( | ) | [pure virtual] |
Returns the scripting engine interface.
| virtual SourcePawn::IVirtualMachine* SourceMod::ISourceMod::GetScriptingVM | ( | ) | [pure virtual] |
Deprecated, do not use.
| virtual time_t SourceMod::ISourceMod::GetAdjustedTime | ( | ) | [pure virtual] |
Returns the adjusted server time.
| virtual unsigned int SourceMod::ISourceMod::SetGlobalTarget | ( | unsigned int | index | ) | [pure virtual] |
Sets the global client SourceMod will use for assisted translations (that is, t).
| index | Client index. |
| virtual unsigned int SourceMod::ISourceMod::GetGlobalTarget | ( | ) | const [pure virtual] |
Returns the global client SourceMod is currently using for assisted translations (that is, t).
| virtual void SourceMod::ISourceMod::AddGameFrameHook | ( | GAME_FRAME_HOOK | hook | ) | [pure virtual] |
Adds a function to be called each game frame.
| hook | Hook function. |
| virtual void SourceMod::ISourceMod::RemoveGameFrameHook | ( | GAME_FRAME_HOOK | hook | ) | [pure virtual] |
Removes one game frame hook matching the given function.
| hook | Hook function. |
| virtual size_t SourceMod::ISourceMod::Format | ( | char * | buffer, | |
| size_t | maxlength, | |||
| const char * | fmt, | |||
| ... | ||||
| ) | [pure virtual] |
Platform-safe wrapper around snprintf().
| buffer | String buffer. | |
| maxlength | Maximum length of buffer. | |
| fmt | Format specifier string. | |
| ... | Format arguments. |
| virtual size_t SourceMod::ISourceMod::FormatArgs | ( | char * | buffer, | |
| size_t | maxlength, | |||
| const char * | fmt, | |||
| va_list | ap | |||
| ) | [pure virtual] |
Platform-safe wrapper around vsnprintf().
| buffer | String buffer. | |
| maxlength | Maximum length of buffer. | |
| fmt | Format specifier string. | |
| ap | Format arguments. |
| virtual void SourceMod::ISourceMod::AddFrameAction | ( | FRAMEACTION | fn, | |
| void * | data | |||
| ) | [pure virtual] |
Adds an action to be executed on the next available frame.
This function is thread safe.
| fn | Function to execute. | |
| data | Data to pass to function. |
| virtual const char* SourceMod::ISourceMod::GetCoreConfigValue | ( | const char * | key | ) | [pure virtual] |
Retrieves a core.cfg configuration value.
| key | Core.cfg key phrase. |
| virtual int SourceMod::ISourceMod::GetPluginId | ( | ) | [pure virtual] |
Returns SourceMod's Metamod:Source plugin ID.
1.5.1