Raised This Month: $32 Target: $400
 8% 

[EXTENSION][CS:GO] VScript Functions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Backup
Senior Member
Join Date: Jul 2010
Location: Česká Republika
Old 03-12-2018 , 17:23   Re: [EXTENSION][CS:GO] VScript Functions
Reply With Quote #11

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
__________________
Sorry for my english.
Backup is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode