Hi,
small update - I've added a SM interface:
https://github.com/jonatan1024/vscri...iptfunctions.h
Now this extension can be easily used by other extensions direcly from c++.
Example usage, getting current map name.
Code:
ScriptVariant_t mapName = g_pVSF->CallFunction("", "GetMapName", NULL, NULL);
The map name string can be retrieved from returned ScriptVariant_t either from its member m_pszString or by casting it to const char *.
This is the case of a "global" function, in case of member function, you supply the class name into the first parameter and the object pointer into the third parameter. If the function require parameters, you pass an array of ScriptVariant_t into the last parameter.
The g_pVSF interface pointer was acquired using the method described here:
https://wiki.alliedmods.net/Writing_...nal_Interfaces
__________________