Jump to content
Sign in to follow this  
loki

parse addons into an array?

Recommended Posts

hi

is there a script way to parse a players running addons and put it into an array?

thanks

Share this post


Link to post
Share on other sites

I do not think so. The only thing I can think of is to isClass (possibly with other config-related commands) to check if specific addons are loaded, but, you would have to know which ones you were looking and provide them for comparison in an array or similar method.

Share this post


Link to post
Share on other sites

_addons = [];
_cfg = configFile >> "CfgPatches";
for "_i" from 0 to (count _cfg)-1 do
{
  _addons set [count _addons, configName(_cfg select _i)];
};

hint format["Running addons: %1", _addons];

Keep in mind this will include the game's own addons.

Share this post


Link to post
Share on other sites
_addons = [];
_cfg = configFile >> "CfgPatches";
for "_i" from 0 to (count _cfg)-1 do
{
  _addons set [count _addons, configName(_cfg select _i)];
};

hint format["Running addons: %1", _addons];

Keep in mind this will include the game's own addons.

kickass deadfast.. thanks!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×