JeViCo

[C++] Can i use MTA functions in modules?

Recommended Posts

Hello there! So the question is in the title - am i able to use MTA functions somehow inside module code? Maybe i can link it somehow with MTA source code to avoid errors during compiling

Share this post


Link to post

MTA doesn't export the scripting API to modules at the moment.

Currently, the only way is to use Lua to call the functions.

Share this post


Link to post
CLuaArguments args;
args.PushString(szEventName);
args.PushBoolean(true);
args.Call(luaVM, "addEvent");

Like so I called once MTA functions

  • Thanks 1

Share this post


Link to post
On 17/05/2019 at 14:01, XaskeL said:

CLuaArguments args;
args.PushString(szEventName);
args.PushBoolean(true);
args.Call(luaVM, "addEvent");

Like so I called once MTA functions

Thanks =D I understand module mechanics a bit more now

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.