Jump to content

Sign in to follow this  
miraoister

Webbing and backpacks list

Recommended Posts

Is there a list of all available backpacks and webbing?

I'm looking for 1960-80s period...

Share this post


Link to post
Share on other sites

I'm not sure if Arma2 has done the config entries slightly different than Arma3 ...

_cfg = configfile >> "CfgVehicles"; // define the initial path
_bpList = [];// define an array

for "_i" from 0 to count _cfg - 1 do { // iterate through cfgVehicles 
if (isClass (_cfg select _i)) then {// if the item is a class then ...
	_className = configName (_cfg select _i); // Get the className of the item
	_scope = getNumber (_cfg >> _className >> "scope"); // Get the scope of the item, used to sort out base items
	_vehClass = getText (_cfg >> _className >> "vehicleClass"); // get the vehicle class (we're going for backpacks ... see below)

	if (_scope >= 2 && {_vehClass == "Backpacks"}) then { // If the item isn't a base class and the vehicle class text is "backpacks" then ...
		diag_log format ["%1", _className]; //Print the className to your rpt
		_bpList set [count _bpList, _className]; // Throw the classname into the array
	};
};
};

player sideChat format ["%1", _bpList]; // After the loop is done, print the array onto the screen

That will neatly print all of the class names to your rpt file as well as printing an array of the backpacks onto the screen for giggles.

Edited by Iceman77

Share this post


Link to post
Share on other sites

Jesus, that is complicated time to learn something new...

---------- Post added at 18:08 ---------- Previous post was at 17:41 ----------

  Iceman77 said:
I'm not sure if Arma2 has done the config entries slightly different than Arma3 ...

_cfg = configfile >> "CfgVehicles"; // define the initial path
_bpList = [];// define an array

for "_i" from 0 to count _cfg - 1 do { // iterate through cfgVehicles 
if (isClass (_cfg select _i)) then {// if the item is a class then ...
	_className = configName (_cfg select _i); // Get the className of the item
	_scope = getNumber (_cfg >> _className >> "scope"); // Get the scope of the item, used to sort out base items
	_vehClass = getText (_cfg >> _className >> "vehicleClass"); // get the vehicle class (we're going for backpacks ... see below)

	if (_scope >= 2 && {_vehClass == "Backpacks"}) then { // If the item isn't a base class and the vehicle class text is "backpacks" then ...
		diag_log format ["%1", _className]; //Print the className to your rpt
		_bpList set [count _bpList, _className]; // Throw the classname into the array
	};
};
};

player sideChat format ["%1", _bpList]; // After the loop is done, print the array onto the screen

That will neatly print all of the class names to your rpt file as well as printing an array of the backpacks onto the screen for giggles.

So what do I type, I know where to find the rpg file, but exactly what is the above, I'm guessing it's a config script that type into a console during the game?

Share this post


Link to post
Share on other sites

Place the code into your init.sqf. Hit preview. I'm not sure what you mean by 'rpg file', but the code serves no additional functionality other than printing a list of back pack classnames.

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  

×