Jump to content
LoOni3r

array with all CfgWeapons Items

Recommended Posts

Hello,

 

i need a array with all CfgWeapons Items.

 

can someone give me this array?

or tell me how I can read this

 

for all other classes I have this one here:

TAG_fnc_sortConfig = { 
	params[ "_config", "_type", [ "_subType", "" ] ]; 

	( "getNumber( _x >> 'scope' ) isEqualTo 2"configClasses( configFile >> _config ) select {
		configName _x call BIS_fnc_itemType params[ "_itemType", "_itemSubType" ];
		_type == _itemType && {
			( _subType isEqualType "" && { _subType == "" || { _subType == _itemSubType }} ) ||
			( _subType isEqualType [] && { { _x == _itemSubType }count _subType > 0 } )
		} 
	}) apply { configName _x }; 
}; 
 

{ 
	_x params[ "_var", "_parameters" ]; 
  
	missionNamespace setVariable [ _var, _parameters call TAG_fnc_sortConfig ]; 
}forEach [
	//[ Global Var, [ Config, Type, SubType/s ] ]
	[ "TAG_vests", [ "CfgWeapons", "Equipment", "Vest" ] ],  
	[ "TAG_uniforms", [ "CfgWeapons", "Equipment", "Uniform" ] ],  
	[ "TAG_helmets", [ "CfgWeapons", "Equipment", "Headgear" ] ],  
	[ "TAG_backPacks", [ "CfgVehicles", "Equipment", "Backpack" ] ],  
	[ "TAG_glasses", [ "CfgGlasses", "Equipment", "Glasses" ] ],
	[ "TAG_primaryWeapons", [ "CfgWeapons", "Weapon", [ "AssaultRifle", "MachineGun", "Rifle", "SubmachineGun", "SniperRifle" ] ] ],
	[ "TAG_secondaryWeapons", [ "CfgWeapons", "Weapon", [ "Launcher", "MissileLauncher", "RocketLauncher" ] ] ], 
	[ "TAG_handguns", [ "CfgWeapons", "Weapon", "Handgun" ] ],
	[ "TAG_items", [ "CfgWeapons", "Items", "WeaponSlotsInfo" ] ]
];

copyToClipboard str TAG_items;

unfortunately I can not get any items

 

thanks

  • Like 1

Share this post


Link to post
Share on other sites

Execute this:

("true" configClasses (configFile >> "CfgWeapons")) apply {configName _x};

  • Haha 1

Share this post


Link to post
Share on other sites

thx

 

("true" configClasses (configFile >> "CfgWeapons" >> "Items")) apply {configName _x}; 

does not work, do I have a thinking error?

Share this post


Link to post
Share on other sites
[ "TAG_items", [ "CfgWeapons", "Item", [ "AccessoryMuzzle", "AccessoryPointer", "AccessorySights", "AccessoryBipod" ] ] ]

See the top of BIS_fnc_itemType in the functions viewer for accepted type / sub-types.

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

×