Page MenuHomeFeedback Tracker

How use GetAddons() function from ensystem.c?
Reviewed, UrgentPublic

Description

Hello @Geez
Can you tell how use this function?

file - scripts\1_core\proto\ensystem.c

//! returns all addons
proto int GetAddons(string addonNames[]);

//! returns all plugins (addons and mods)
proto int GetPlugins(string pluginNames[]);

i try use this:

string addons[50];
GetAddons(addons);

and this

string addons[] = {"VPPAdminTools"};
GetAddons(addons);

and this

string addons[];
GetAddons(addons);

and this

autoptr string addons[50];
GetAddons(addons);

and this

array<string> addons;
GetAddons(addons);

and this

string addons;
GetAddons(addons);

but my server always crashing when i call the function GetAddons() or GetPlugins()

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
General

Event Timeline

Nytlenc created this task.Jan 12 2023, 4:09 PM
Geez changed the task status from New to Reviewed.Jan 16 2023, 9:29 AM

Hello Nytlenc.
Please try g_Game.GetModInfos(...) from scripts\3_game\global\game.c instead as that could be what you are looking for.
Regards,
Geez

Thank you @Geez, this is exactly the information I needed!