Jump to content
Sign in to follow this  
Squirtman

how to extract allowed attachments/acesories from config

Recommended Posts

With the code below you are able to create an array with all the magazines that can be used in a weapon. What i would like to know is there some way to do the same thing with attachments/accessories. I've looked at several weapons in the config viewer but i haven't been able to tell what determines what controls what attachments are allowed. Thank you in advance for your time and any assistance you can provide.

    _weap = selectrandom ["hgun_Pistol_heavy_01_F", "hgun_ACPC2_F","hgun_P07_F"];
    _mags = (getArray(configFile >> 'CfgWeapons' >> _weap >> 'magazines'));

 

Share this post


Link to post
Share on other sites
_compatibleItems = "<weapon classname>" call BIS_fnc_compatibleItems;

 

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  

×