Jump to content
Sign in to follow this  
gc8

Removing items from arsenal

Recommended Posts

has anyone else got problems with the BIS_fnc_removeVirtualBackpackCargo command, I'm using simple script to first fill the arsenal and then remove just one item.

here's the code:

["AmmoboxInit",[ammobox,true]] call BIS_fnc_arsenal;
[ammobox,["B_Parachute"],true] call BIS_fnc_removeVirtualBackpackCargo;  // not working

But it doesn't work, the parachute is still in the arsenal. I also rechecked that I did not misspell the parachute's name.

anyone know what's wrong?

thx

Share this post


Link to post
Share on other sites

You initialized the ammobox with allowAll param, which automatically adds every weapon and item no matter what you whitelisted. If you want to customize the contents, don't use the param.

More info can be found on Biki.

Share this post


Link to post
Share on other sites
You initialized the ammobox with allowAll param, which automatically adds every weapon and item no matter what you whitelisted. If you want to customize the contents, don't use the param.

More info can be found on Biki.

Yes I understand this. But I was thinking that after the ammobox is full you could use BIS_fnc_removeVirtualBackpackCargo to remove single items. I guess it just doesn't work like that.

anyway thanks for the answer

Share this post


Link to post
Share on other sites

Looks like there is some bug in the arsenal because I'm running only single init line and when I open arsenal it gives this error :

image.jpg

all i have is this in init.sqf:

["AmmoboxInit",[ammobox,true]] call BIS_fnc_arsenal;

the arsenal it self seems to be working though and it has all the weapons

(and i still haven't got the BIS_fnc_removeVirtualBackpackCargo working. using wiki as reference)

Share this post


Link to post
Share on other sites

don't use both of them at the same time. I used the addvirtualbackpackcargo on my mission and it creates the addaction for you aswell you don't have to call it using the BIS_fnc_Arsenal option. so i would think that the same happensd with the remove option. just use the

[ammobox,["B_Parachute"],true] call BIS_fnc_removeVirtualBackpackCargo;

Share this post


Link to post
Share on other sites
don't use both of them at the same time. I used the addvirtualbackpackcargo on my mission and it creates the addaction for you aswell you don't have to call it using the BIS_fnc_Arsenal option. so i would think that the same happensd with the remove option. just use the

[ammobox,["B_Parachute"],true] call BIS_fnc_removeVirtualBackpackCargo;

I could use that approach but then I'd had to add every weapon in my self.

Share this post


Link to post
Share on other sites
configClasses is your friend here, use it with configName. That should help

yep they sure are. I was trying to find the arsenal code to see how BIS actually did it but without avail.

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  

×