Jump to content
Sign in to follow this  
_qor

helling3r's removeWeaponCargo script only removes one item?

Recommended Posts

Hey,

 

I was very lucky when I found helling3r's script which handles reading and refilling of cargo space: https://dev.withsix.com/issues/68594

But it is not possible for me to remove multiple items at once:

_removeW = [_box, "AK_74", 5] call CBA_fnc_removeWeaponCargoGlobal;

Additionally, the simple syntax only removes ALL items:

_removeW = [_box, "AK_74"] call CBA_fnc_removeWeaponCargoGlobal;

Is there anything I could have done wrong with this? Apparently there are 3 files to download, of course I use the latest one...

Does this work for you?

Share this post


Link to post
Share on other sites

Why use special script for crates?

 

Here is what i use in my missions i make for my clan. I just put the code below to the init field of the box:

        

clearWeaponCargoGlobal this; 
clearMagazineCargoGlobal this;

this addMagazineCargoGlobal ["ACE_DM25",50];
this addMagazineCargoGlobal ["ACE_DM31",20];
this addMagazineCargoGlobal ["ACE_DM32",20];
this addMagazineCargoGlobal ["ACE_DM33",20];
this addMagazineCargoGlobal ["ACE_DM34",20];
this addMagazineCargoGlobal ["ACE_DM34",20];
this addMagazineCargoGlobal ["ACE_Flashbang",20];

this addMagazineCargoGlobal ["IR_Strobe_Target",20];
this addMagazineCargoGlobal ["IR_Strobe_Marker",20];
this addMagazineCargoGlobal ["IRStrobe",20];
 
this addMagazineCargoGlobal ["200Rnd_556x45_M249",50]; 
this addMagazineCargoGlobal ["100Rnd_762x54_PK",50];
this addMagazineCargoGlobal ["100Rnd_762x51_M240",50];

 
this addMagazineCargoGlobal ["5Rnd_762x51_M24",100];
this addMagazineCargoGlobal ["5Rnd_127x108_KSVK",50];
this addMagazineCargoGlobal ["10Rnd_762x54_SVD",50]; 
this addMagazineCargoGlobal ["10Rnd_127x99_m107",50];
  
this addMagazineCargoGlobal ["18Rnd_9x19_PhantomSD",100]; 
this addMagazineCargoGlobal ["ACE_16Rnd_9x19_CZ75",100];
this addMagazineCargoGlobal ["18Rnd_9x19_PhantomSD",100];
this addMagazineCargoGlobal ["17Rnd_9x19_glock17",100];

this addMagazineCargoGlobal ["20Rnd_9x19_EVO",50];
this addMagazineCargoGlobal ["20Rnd_9x19_EVOSD",50]; 
  
this addMagazineCargoGlobal ["ACE_Battery_Rangefinder",20];  
this addMagazineCargoGlobal ["PipeBomb",20];  
  
this addMagazineCargoGlobal ["ACE_Medkit",8];  
this addMagazineCargoGlobal ["ACE_Epinephrine",100];  
this addMagazineCargoGlobal ["ACE_LargeBandage",100];  
this addMagazineCargoGlobal ["ACE_Morphine",50];  
  
this addMagazineCargoGlobal ["ACE_30Rnd_556x45_S_Stanag",100];  
this addMagazineCargoGlobal ["30Rnd_556x45_StanagSD",50];  
this addMagazineCargoGlobal ["30Rnd_762x39_SA58",100];
this addMagazineCargoGlobal ["ACE_20Rnd_762x51_S_SCAR",100];
this addMagazineCargoGlobal ["1Rnd_HE_M203",50];
this addMagazineCargoGlobal ["1Rnd_SmokeRed_M203",10];

this addMagazineCargoGlobal ["ACE_PG7V_PGO7",10]; 
this addMagazineCargoGlobal ["ACE_PG7VR_PGO7",10]; 
this addMagazineCargoGlobal ["ACE_TBG7V",10];
this addMagazineCargoGlobal ["MAAWS_HEAT",30];

 
this addMagazineCargoGlobal ["HandGrenade_East",50];
this addMagazineCargoGlobal ["ACE_DM51",50];



this addWeaponCargoGlobal ["CZ_75_P_07_DUTY",8];
this addWeaponCargoGlobal ["CZ_75_SP_01_PHANTOM_SD",8];
this addWeaponCargoGlobal ["glock17_EP1",8];

this addWeaponCargoGlobal ["CZ805_A1_ACR",4];
this addWeaponCargoGlobal ["CZ805_A2_ACR",4];  
this addWeaponCargoGlobal ["CZ805_A2_SD_ACR",4];
this addWeaponCargoGlobal ["CZ805_B_GL_ACR",2];
this addWeaponCargoGlobal ["CZ805_A1_GL_ACR",2]; 
this addWeaponCargoGlobal ["Sa58V_RCO_EP1",8];       
this addWeaponCargoGlobal ["Sa58V_CCO_EP1",8];
this addWeaponCargoGlobal ["Sa58P_EP1",8];
this addWeaponCargoGlobal ["Sa58V_EP1",8]; 

this addWeaponCargoGlobal ["Evo_ACR",8];
this addWeaponCargoGlobal ["Evo_mrad_ACR",8];
this addWeaponCargoGlobal ["evo_sd_ACR",8]; 
  
this addWeaponCargoGlobal ["M60A4_EP1",2];
this addWeaponCargoGlobal ["ACE_M249_PIP_ACOG",2];
this addWeaponCargoGlobal ["ACE_M240L_M145",2];
this addWeaponCargoGlobal ["BAF_L110A1_Aim",2];
this addWeaponCargoGlobal ["UK59_ACR",2];  
this addWeaponCargoGlobal ["CZ_750_S1_ACR",2]; 
this addWeaponCargoGlobal ["ksvk",1]; 
this addWeaponCargoGlobal ["ACE_SVD_Bipod",8]; 
this addWeaponCargoGlobal ["m107",1];
  
this addWeaponCargoGlobal ["RPG18",24];
this addWeaponCargoGlobal ["ACE_RPG7V_PGO7",2];
this addWeaponCargoGlobal ["MAAWS",2];
this addWeaponCargoGlobal ["ACE_Javelin_Direct",10];
this addWeaponCargoGlobal ["ACE_Javelin_CLU",1]; 


this addWeaponCargoGlobal ["ACE_Stretcher",8];  
this addWeaponCargoGlobal ["ACE_TacticalLadder_Pack",8];  
this addWeaponCargoGlobal ["ACE_WireCutter",8];
this addWeaponCargoGlobal ["Binocular",8];
this addWeaponCargoGlobal ["ACE_Kestrel4500",15]; 
this addWeaponCargoGlobal ["ACE_DAGR",15];
this addWeaponCargoGlobal ["ACE_Rangefinder_OD",8];  
this addWeaponCargoGlobal ["ACE_Earplugs",10];  
this addWeaponCargoGlobal ["ACE_KeyCuffs",8];  
this addWeaponCargoGlobal ["ACE_GlassesGasMask_S10",10];  
this addWeaponCargoGlobal ["ACE_MineMarkers_Light",8];
this addWeaponCargoGlobal ["ACE_Map_Tools",8];
this addWeaponCargoGlobal ["ACE_BackPack_ACR",24];
this addWeaponCargoGlobal ["ItemRadio",8];
this addWeaponCargoGlobal ["NVGoggles",8];
this addWeaponCargoGlobal ["ItemGPS",8];

this addWeaponCargoGlobal ["ItemMap",8];
this addWeaponCargoGlobal ["ACE_SpareBarrel",8];
this addWeaponCargoGlobal ["ACE_Minedetector_US",8];
this addweaponCargoGlobal ["ACE_MugLite",8];
this addWeaponCargoGlobal ["ACE_GlassesBalaklavaOlive",8];        
this addWeaponCargoGlobal ["ACE_GlassesGasMask_S10",8];         
this addWeaponCargoGlobal ["ACE_GlassesLHD_glasses",8];

Share this post


Link to post
Share on other sites

The content of the box will change very often while playing. So I cant use a code which adds a fix amount of weapons/magazines. It simply will not achieve the same effect as when I would remove a single weapon.

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  

×