mokeyii 10 Posted November 17, 2016 I'm trying to figure out how to restrict ammo in Virtual Arsenal. I'm not quite sure how to do so without complicating such a simple script.I was thinking something around this, but it doesn't seem proper. ["hgun_Pistol_heavy_01_F", "11Rnd_45ACP_Mag", 4], Here is a portion of my code... What would I do to NOT allow unlimited ammo/throwables. _crate = "Box_East_Ammo_F"; ["Open",_crate] call BIS_fnc_arsenal; [_crate,[true],true] call BIS_fnc_addVirtualMagazineCargo; [_crate,[true],true] call BIS_fnc_addVirtualBackpackCargo; [_crate,[ // Handguns "hgun_Pistol_heavy_01_F", "hgun_ACPC2_F", "hgun_P07_F", "hgun_P07_khk_F", "hgun_Pistol_01_F", "hgun_Rook40_F", "hgun_Pistol_Signal_F", "hgun_Pistol_heavy_02_F", // Rifles "srifle_DMR_04_F", "srifle_DMR_04_Tan_F", "arifle_AK12_F", "arifle_AK12_GL_F", "arifle_AKM_F", "arifle_AKM_FL_F", "arifle_AKS_F", "arifle_ARX_blk_F", "arifle_ARX_ghex_F", "arifle_ARX_hex_F", "arifle_CTAR_blk_F", "arifle_CTAR_GL_blk_F", "arifle_CTARS_blk_F", "arifle_MX_GL_khk_F", "arifle_MX_khk_F", "arifle_MX_SW_khk_F", "arifle_MXC_khk_F", "arifle_MXM_khk_F", "arifle_SPAR_01_blk_F", "arifle_SPAR_01_khk_F", "arifle_SPAR_01_snd_F", "arifle_SPAR_01_GL_blk_F", "arifle_SPAR_01_GL_khk_F", "arifle_SPAR_01_GL_snd_F", "arifle_SPAR_02_blk_F", "arifle_SPAR_02_khk_F", "arifle_SPAR_02_snd_F", "arifle_SPAR_03_blk_F", "arifle_SPAR_03_khk_F", "arifle_SPAR_03_snd_F", "srifle_DMR_05_hex_F", "srifle_GM6_F", "arifle_Katiba_F", "srifle_LRR_F", "srifle_DMR_02_sniper_F", "srifle_DMR_03_F", "srifle_DMR_06_olive_F", "srifle_EBR_F", "srifle_DMR_07_blk_F", "srifle_DMR_07_ghex_F", "srifle_DMR_07_hex_F", "srifle_GM6_ghex_F", "srifle_LRR_tna_F", "arifle_Mk20_plain_F", "LMG_Mk200_F", "arifle_Mk20C_plain_F", "arifle_MX_GL_F", "arifle_MX_F", "arifle_MX_SW_F", "arifle_MXC_F", "arifle_MXM_F", "MMG_01_tan_F", "hgun_PDW2000_F", "srifle_DMR_01_F", "arifle_SDAR_F", "MMG_02_sand_F", "SMG_02_F", "arifle_TRG20_F", "arifle_TRG21_F", "SMG_01_F", "SMG_05_F", "LMG_03_F", "LMG_Zafir_F", // Launchers "launch_RPG32_F", "launch_RPG7_F", // code continued, irrelevant to discussion. Share this post Link to post Share on other sites
mokeyii 10 Posted November 17, 2016 Tried: _crate = "Box_East_Ammo_F"; ["Open",_crate] call BIS_fnc_arsenal; [_crate,[ //Handgun Ammo ["9Rnd_45ACP_Mag", 3], ["16Rnd_9x21_Mag", 3], ["30Rnd_9x21_Mag", 3], ["6Rnd_45ACP_Cylinder", 3], //Sniper Rifle Ammo ["10Rnd_93x64_DMR_05_Mag", 2], ["10Rnd_338_Mag", 2], ["5Rnd_127x108_Mag", 3], ["7Rnd_408_Mag", 3], ["10Rnd_127x54_Mag", 2], ["10Rnd_50BW_Mag_F", 3], // DMR Ammo ["20Rnd_762x51_Mag", 3], ["10Rnd_762x54_Mag", 3], ["20Rnd_650x39_Cased_Mag_F", 3], ["20Rnd_762x51_Mag", 3], //Assault Rifle Ammo ["30Rnd_545x39_Mag_F", 3], ["30Rnd_65x39_caseless_mag", 3], ["30Rnd_65x39_caseless_green", 3], ["30Rnd_556x45_Stanag", 3], ["30Rnd_762x39_Mag_F", 3], ["30Rnd_580x42_Mag_F", 3], ["20Rnd_556x45_UW_mag", 2], // LMG Ammo ["200Rnd_65x39_cased_Box", 2], ["150Rnd_762x54_Box", 2], ["100Rnd_65x39_caseless_mag", 2], ["150Rnd_93x64_Mag", 2], ["130Rnd_338_Mag", 2], ["200Rnd_556x45_Box_F", 2], ["150Rnd_556x45_Drum_Mag_F", 2], // SMG Ammo ["30Rnd_9x21_Mag_SMG_02", 3], ["30Rnd_45ACP_Mag_SMG_01", 3], // Rocket Launcher Ammo ["RPG32_F", 1], ["RPG32_HE_F", 1], ["RPG7_F", 1], // Grenade Launcher Ammo ["1Rnd_HE_Grenade_shell", 3], ["UGL_FlareWhite_F", 3], ["UGL_FlareGreen_F", 3], ["UGL_FlareRed_F", 3], ["UGL_FlareYellow_F", 3], ["UGL_FlareCIR_F", 3], ["1Rnd_Smoke_Grenade_shell", 3], ["1Rnd_SmokeRed_Grenade_shell", 3], ["1Rnd_SmokeGreen_Grenade_shell", 3], ["1Rnd_SmokeYellow_Grenade_shell", 3], ["1Rnd_SmokePurple_Grenade_shell", 3], ["1Rnd_SmokeBlue_Grenade_shell", 3], ["1Rnd_SmokeOrange_Grenade_shell", 3], ["3Rnd_HE_Grenade_shell", 1], ["3Rnd_UGL_FlareWhite_F", 1], ["3Rnd_UGL_FlareGreen_F", 1], ["3Rnd_UGL_FlareRed_F", 1], ["3Rnd_UGL_FlareYellow_F", 1], ["3Rnd_UGL_FlareCIR_F", 1], ["3Rnd_Smoke_Grenade_shell", 1], ["3Rnd_SmokeRed_Grenade_shell", 1], ["3Rnd_SmokeGreen_Grenade_shell", 1], ["3Rnd_SmokeYellow_Grenade_shell", 1], ["3Rnd_SmokePurple_Grenade_shell", 1], ["3Rnd_SmokeBlue_Grenade_shell", 1], ["3Rnd_SmokeOrange_Grenade_shell", 1], //Throwables ["HandGrenade", 2], ["MiniGrenade", 3], ["SmokeShell", 3], ["SmokeShellYellow", 2], ["SmokeShellGreen", 3], ["SmokeShellRed", 3], ["SmokeShellPurple", 3], ["SmokeShellOrange", 3], ["SmokeShellBlue", 3], ["Chemlight_green", 5], ["Chemlight_red", 5], ["Chemlight_yellow", 5], ["Chemlight_blue", 5], ["B_IR_Grenade", 5], ["O_IR_Grenade", 5], ["I_IR_Grenade", 5], //Puttable Explosives ["IEDUrbanSmall_Remote_Mag", 2], ["IEDLandSmall_Remote_Mag", 2], ["SatchelCharge_Remote_Mag", 2], ["IEDUrbanBig_Remote_Mag", 1], ["IEDLandBig_Remote_Mag", 1], ["ATMine_Range_Mag", 2], ["ClaymoreDirectionalMine_Remote_Mag", 3], ["APERSMine_Range_Mag", 4], ["SLAMDirectionalMine_Wire_Mag", 4], ["APERSBoundingMine_Range_Mag", 4], ["APERSTripMine_Wire_Mag", 4] ],true] call BIS_fnc_addVirtualMagazineCargo; People can still load as much ammo as they want. Share this post Link to post Share on other sites
mokeyii 10 Posted November 18, 2016 wow... no answer.. I'm quite suprised Share this post Link to post Share on other sites
Tajin 349 Posted November 18, 2016 I'm quite suprised I'm not. What you want is near impossible to do with the default arsenal. Share this post Link to post Share on other sites
Guest Posted November 18, 2016 You can whitelist but you can't specify a number / quantity. And don't be 'surprise' people have a life. A workaround would be to handle the closing of the arsenal and delete extra mags Share this post Link to post Share on other sites