Jump to content

Ibragim A

[SOLVED] How to get an array of all ammo boxes classes

Recommended Posts

Good morning.
Please teach me how to correctly get an array with all classes from configurations.

I need to get an array with all the classes of ammunition boxes that I can see in the editor in Props> Supplies> Ammo.
Like:

["VirtualReammoBox_camonet_F","VirtualReammoBox_F", ...]

 

Share this post


Link to post
Share on other sites
_yourArray = ("getNumber (_x/'scope') == 2 && configName _x isKindOf 'ReammoBox_F' " configClasses (configFile /"cfgVehicles")) apply {configName _x});

should work

  • Thanks 1

Share this post


Link to post
Share on other sites
  On 11/10/2021 at 12:49 PM, pierremgi said:
_yourArray = ("getNumber (_x/'scope') == 2 && configName _x isKindOf 'ReammoBox_F' " configClasses (configFile /"cfgVehicles")) apply {configName _x});

 should work

Thanks, it works like expected. Just one bracket is missing.

_yourArray = (("getNumber (_x/'scope') == 2 && configName _x isKindOf 'ReammoBox_F' " configClasses (configFile /"cfgVehicles")) apply {configName _x});


 

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

×