Full Python 3.7.6 support for server-side scripts
TODO
int[, string] pythonInit(table moduleNames)
Initializes Python VM and loads modules.
table moduleNames
- list of module names (strings)
Amount of loaded modules, if success. Exit code and error message, otherwise.
pythonDestroy()
Destroys Python VM
Nothing
bool isPythonInited()
Checks is Python VM already created.
True, if Python VM is created. False otherwise.
[return_args ...] pythonCall(string moduleName, string functionName [, arguments ...])
Calls function from Python VM
string moduleName
- Python module name
string functionName
- Python function name
[arguments ...]
- Arguments to pass to Python function
Allowed argument types: string, number, boolean, table, Element
Returned values from Python function, or negative int and string on error
Prints error into console
any call(str function_name, int return_args_amount, *args)
Calls any global Lua function (from resources, also)
str function_name
- name of Lua function
str return_args_amount
- amount of returned arguments
*args
- arguments to pass to Lua function
Allowed argument types: string, number, boolean, list, dict, Element (or subclasses)
Returned values from Lua function
any call(Element element, str method_name, int return_args_amount, *args)
Calls any global Lua function (from resources, also)
Element element
- MTASA Element
str method_name
- name of Lua method
str return_args_amount
- amount of returned arguments
*args
- arguments to pass to Lua method
Returned values from Lua method