Jump to content
Sign in to follow this  
kocrachon

Easy arsenal whitelisting?

Recommended Posts

Right now I have 1400 lines of Items, Gear, Weapons, and Ammo from the various mods that I run. Some items its easy to tell if its ammo or guns, some times its not easy to tell if its a helmet, vest, or what not.

So is there an easy way for me to whitelist a Virtual Aresenal box to just dump in this entire list of gear I want to white list? So far the only example of working white listing I have seen is this link, but I don't want to avoid figuring out whats what if possible.

http://forums.unitedoperations.net/index.php/topic/23613-virtual-arsenal-restricting-items/

Share this post


Link to post
Share on other sites

Have a arrays with all the gear/items/weapon classnames and then just use the functions your link mentions to add the each array of gear into the VA, I'm a bit confused by what your problem actually is?

_itemArray = ["item1", "item2", ...];
_weaponArray = ["wep1", "wep2", ...];

[_box, _itemArray, false, true] call BIS_fnc_addVirtualItemCargo;
[_box, _weaponArray, false, true] call BIS_fnc_addVirtualWeaponCargo;

Edited by JShock

Share this post


Link to post
Share on other sites

You don't need to sort items into different arrays. Just run the same array 4 times, works just fine.

Share this post


Link to post
Share on other sites
You don't need to sort items into different arrays. Just run the same array 4 times, works just fine.

In that case:

_gearAndStuffArray = ["item1", "wep1", "mag1", "pack1", ...];
[_box, _gearAndStuffArray, false, true] call BIS_fnc_addVirtualItemCargo;
[_box, _gearAndStuffArray, false, true] call BIS_fnc_addVirtualWeaponCargo; 
[_box, _gearAndStuffArray, false, true] call BIS_fnc_addVirtualMagazineCargo; 
[_box, _gearAndStuffArray, false, true] call BIS_fnc_addVirtualBackpackCargo;

Share this post


Link to post
Share on other sites

Not sure what I am doing wrong. Right now the key issue is the VAS system doesn't show up when I get near the ammo crate at the moment.

Here is what I am putting in the ammo box init

null = [this] execVM "gunsgunsguns.sqf"

Here is what is my my scripts.

http://pastebin.com/6qSq37NA

Share this post


Link to post
Share on other sites

Well make sure to change the "_box" variable that I used in my example with "_crate" which is what you used at the bottom with the add to cargo commands.

And reading up on the page for the Arsenal, for the AmmoboxInit, you may want to leave the condition argument out of the spawn of the function (as it's in the Dev Build only):

["AmmoboxInit", [_crate, false]] spawn BIS_fnc_arsenal;

Share this post


Link to post
Share on other sites
Well make sure to change the "_box" variable that I used in my example with "_crate" which is what you used at the bottom with the add to cargo commands.

And reading up on the page for the Arsenal, for the AmmoboxInit, you may want to leave the condition argument out of the spawn of the function (as it's in the Dev Build only):

["AmmoboxInit", [_crate, false]] spawn BIS_fnc_arsenal;

http://pastebin.com/MgbJN4eQ

Fixed it but still no luck :(

EDIT:

Found the issue. Had a [ typo in the middle of my gear. Combined with your fixes it worked great.

---------- Post added at 09:55 ---------- Previous post was at 08:38 ----------

Ugh, new issue. I can remove weapons but I cant seem to limit "attachments". One of the things I want to get rid of is the nightstalker...

Edited by Kocrachon

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  

×