Jump to content
Sign in to follow this  
legio4777

Question and community sharing (Massi Ammo Crate)

Recommended Posts

Hi,

Have the next problem that I dont know how to fix. I´d like to include an addaction to an personalized ammo crate box with the following syntax:

this addAction["<t color='#00ff00'>Weapons</t>", this execVM "AmmoBoxMasi.sqf"]; 

But doesnt work. Could someone help me. The sqf is executed but the word "Weapons" doesn´t appear nor even de colour.

----------------------------------------------------------------------------

Moreover I did for myself the following .sqf with the NATOSF Weapons by Massi. Weapons, Magazines, Items, Backpacks... This doesnt include Helmets, uniforms.... Please feel free to continue it if yo also can share it! Any enrichment will be appreciated it.

Ammobox initialization:

init_Handle = this execVM "nameofthesqf.sqf";

clearWeaponCargo _this;
clearMagazineCargo _this;
clearItemCargo _this;


_this addWeaponCargo ["arifle_mas_hk416",20];
_this addWeaponCargo ["arifle_mas_hk416_sd",20];
_this addWeaponCargo ["arifle_mas_hk416_gl",20];;
_this addWeaponCargo ["arifle_mas_hk416_m203",20];
_this addWeaponCargo ["arifle_mas_hk416_v",20];
_this addWeaponCargo ["arifle_mas_hk416_d",20];
_this addWeaponCargo ["arifle_mas_hk416_gl_v",20];
_this addWeaponCargo ["arifle_mas_hk416_m203_v",20];
_this addWeaponCargo ["arifle_mas_hk416_gl_d",20];
_this addWeaponCargo ["arifle_mas_hk416_m203_d",20];
_this addWeaponCargo ["arifle_mas_hk416_m203c",20];
_this addWeaponCargo ["arifle_mas_hk416c",20];
_this addWeaponCargo ["arifle_mas_hk417c",20];
_this addWeaponCargo ["arifle_mas_hk417c_sd",20];
_this addWeaponCargo ["arifle_mas_hk417_m203c",20];;
_this addWeaponCargo ["arifle_mas_hk417_m203c_sd",20];
_this addWeaponCargo ["arifle_mas_hk417c_v",20];
_this addWeaponCargo ["arifle_mas_hk417c_v_sd",20];
_this addWeaponCargo ["arifle_mas_hk417c_d",20];
_this addWeaponCargo ["arifle_mas_hk417c_d_sd",20];
_this addWeaponCargo ["arifle_mas_hk417_m203c_d",20];
_this addWeaponCargo ["arifle_mas_hk417_m203c_d_sd",20];
_this addWeaponCargo ["arifle_mas_m4",20];
_this addWeaponCargo ["arifle_mas_m4_sd",20];
_this addWeaponCargo ["arifle_mas_m4_gl",20];;
_this addWeaponCargo ["arifle_mas_m4_gl_sd",20];
_this addWeaponCargo ["arifle_mas_m4_m203",20];
_this addWeaponCargo ["arifle_mas_m4_m203_sd",20];
_this addWeaponCargo ["arifle_mas_m4_v",20];
_this addWeaponCargo ["arifle_mas_m4_v_sd",20];
_this addWeaponCargo ["arifle_mas_m4_gl_v",20];
_this addWeaponCargo ["arifle_mas_m4_gl_v_sd",20];
_this addWeaponCargo ["arifle_mas_m4_m203_v",20];
_this addWeaponCargo ["arifle_mas_m4_m203_v_sd",20];
_this addWeaponCargo ["arifle_mas_m4_d",20];
_this addWeaponCargo ["arifle_mas_m4_d_sd",20];
_this addWeaponCargo ["arifle_mas_m4_gl_d",20];
_this addWeaponCargo ["arifle_mas_m4_gl_d_sd",20];
_this addWeaponCargo ["arifle_mas_m4_m203_d",20];
_this addWeaponCargo ["arifle_mas_m4_m203_d_sd",20];
_this addWeaponCargo ["arifle_mas_m4c",20];
_this addWeaponCargo ["arifle_mas_m4c_sd",20];
_this addWeaponCargo ["arifle_mas_m4_m203c",20];
_this addWeaponCargo ["arifle_mas_m4_m203c_sd",20];
_this addWeaponCargo ["arifle_mas_m4c_v",20];
_this addWeaponCargo ["arifle_mas_m4c_d",20];
_this addWeaponCargo ["arifle_mas_m4c_v_sd",20];
_this addWeaponCargo ["arifle_mas_m4c_d_sd",20];
_this addWeaponCargo ["arifle_mas_m16",20];
_this addWeaponCargo ["arifle_mas_m16_sd",20];
_this addWeaponCargo ["arifle_mas_m16_gl",20];
_this addWeaponCargo ["arifle_mas_m16_gl_sd",20];
_this addWeaponCargo ["arifle_mas_m4c_d_sd",20];
_this addWeaponCargo ["arifle_mas_m16",20];
_this addWeaponCargo ["arifle_mas_m16_sd",20];
_this addWeaponCargo ["arifle_mas_m16_gl",20];
_this addWeaponCargo ["srifle_mas_hk417",20];
_this addWeaponCargo ["srifle_mas_hk417_sd",20];
_this addWeaponCargo ["srifle_mas_hk417_v",20];
_this addWeaponCargo ["srifle_mas_hk417_d",20];
_this addWeaponCargo ["srifle_mas_hk417_v_sd",20];
_this addWeaponCargo ["srifle_mas_hk417_d_sd",20];
_this addWeaponCargo ["srifle_mas_hk417_d",20];
_this addWeaponCargo ["srifle_mas_sr25",20];
_this addWeaponCargo ["srifle_mas_sr25_sd",20];
_this addWeaponCargo ["srifle_mas_sr25_v",20];
_this addWeaponCargo ["srifle_mas_sr25_d",20];
_this addWeaponCargo ["srifle_mas_ebr",20];
_this addWeaponCargo ["srifle_mas_ebr_sd",20];
_this addWeaponCargo ["srifle_mas_m24_v",20];
_this addWeaponCargo ["srifle_mas_m24_v_h",20];
_this addWeaponCargo ["srifle_mas_m24_d",20];
_this addWeaponCargo ["srifle_mas_m24_d_h",20];
_this addWeaponCargo ["srifle_mas_m24",20];
_this addWeaponCargo ["srifle_mas_m24_h",20];
_this addWeaponCargo ["srifle_mas_m107",20];
_this addWeaponCargo ["srifle_mas_m107_h",20];
_this addWeaponCargo ["srifle_mas_m107_sd",20];
_this addWeaponCargo ["srifle_mas_m107_v",20];
_this addWeaponCargo ["srifle_mas_m107_v_h",20];
_this addWeaponCargo ["srifle_mas_m107_v_sd",20];
_this addWeaponCargo ["srifle_mas_m107_d",20];
_this addWeaponCargo ["srifle_mas_m107_d_h",20];
_this addWeaponCargo ["srifle_mas_m107_d_sd",20];
_this addWeaponCargo ["srifle_DMR_01_MRCO_pointer_F",20];
_this addWeaponCargo ["srifle_DMR_01_ACO_F",20];
_this addWeaponCargo ["srifle_DMR_01_ARCO_pointer_F",20];
_this addWeaponCargo ["srifle_DMR_01_F",20];
_this addWeaponCargo ["srifle_DMR_01_SOS_F",20];
_this addWeaponCargo ["arifle_mas_g3",20];
_this addWeaponCargo ["arifle_mas_g3_h",20];
_this addWeaponCargo ["arifle_mas_g3_m203",20];
_this addWeaponCargo ["arifle_mas_g3s",20];
_this addWeaponCargo ["arifle_mas_mp5",20];
_this addWeaponCargo ["arifle_mas_mp5_sd",20];
_this addWeaponCargo ["arifle_mas_mp5_v",20];
_this addWeaponCargo ["arifle_mas_mp5_v_sd",20];
_this addWeaponCargo ["arifle_mas_mp5_d",20];
_this addWeaponCargo ["arifle_mas_mp5_d_sd",20];
_this addWeaponCargo ["arifle_mas_mp5sd",20];
_this addWeaponCargo ["arifle_mas_mp5sd_ds",20];
_this addWeaponCargo ["LMG_mas_Mk200_F",20];
_this addWeaponCargo ["LMG_mas_Mk200_F_sd",20];
_this addWeaponCargo ["LMG_mas_Mk200_F_h",20];
_this addWeaponCargo ["LMG_mas_M249_F",20];
_this addWeaponCargo ["LMG_mas_M249_F_h",20];
_this addWeaponCargo ["LMG_mas_M249_F_sd",20];
_this addWeaponCargo ["LMG_mas_M249_F_v",20];
_this addWeaponCargo ["LMG_mas_M249_F_v_h",20];
_this addWeaponCargo ["LMG_mas_M249_F_v_sd",20];
_this addWeaponCargo ["LMG_mas_M249_F_d",20];
_this addWeaponCargo ["LMG_mas_M249_F_d_h",20];
_this addWeaponCargo ["LMG_mas_M249_F_d_sd",20];
_this addWeaponCargo ["LMG_mas_M249a_F",20];
_this addWeaponCargo ["LMG_mas_Mk48_F",20];
_this addWeaponCargo ["LMG_mas_Mk48_F_v",20];
_this addWeaponCargo ["LMG_mas_Mk48_F_d",20];
_this addWeaponCargo ["LMG_mas_M240_F",20];
_this addWeaponCargo ["LMG_mas_M240_F_h",20];
_this addWeaponCargo ["LMG_mas_mg3_F",20];
_this addWeaponCargo ["LMG_mas_mg3_F_h",20];
_this addWeaponCargo ["hgun_mas_m9_F",20];
_this addWeaponCargo ["hgun_mas_bhp_F",20];
_this addWeaponCargo ["hgun_mas_glock_F",20];
_this addWeaponCargo ["hgun_mas_m9_F_sd",20];
_this addWeaponCargo ["hgun_mas_bhp_F_sd",20];
_this addWeaponCargo ["hgun_mas_glock_F_sd",20];
_this addWeaponCargo ["hgun_mas_acp_F",20];
_this addWeaponCargo ["hgun_mas_usp_F",20];
_this addWeaponCargo ["hgun_mas_glocksf_F",20];
_this addWeaponCargo ["hgun_mas_acp_F_sd",20];
_this addWeaponCargo ["hgun_mas_usp_F_sd",20];
_this addWeaponCargo ["hgun_mas_glocksf_F_sd",20];
_this addWeaponCargo ["hgun_mas_usp_l_F",20];
_this addWeaponCargo ["hgun_mas_usp_l_F_sd",20];
_this addWeaponCargo ["hgun_P07_snds_F",20];
_this addWeaponCargo ["hgun_Rook40_snds_F",20];
_this addWeaponCargo ["hgun_Pistol_heavy_01_snds_F",20];
_this addWeaponCargo ["hgun_Pistol_heavy_02_Yorris_F",20];
_this addWeaponCargo ["hgun_PDW2000_F",20];
_this addWeaponCargo ["launch_B_Titan_F",20];
_this addWeaponCargo ["launch_B_Titan_short_F",20];
_this addMagazineCargo ["11Rnd_45ACP_Mag",200];
_this addMagazineCargo ["6Rnd_45ACP_Cylinder",200];
_this addMagazineCargo ["Titan_AA",200];
_this addMagazineCargo ["Titan_AT",200];
_this addMagazineCargo ["Titan_AP",200];
_this addWeaponCargo ["launch_NLAW_F",20];
_this addWeaponCargo ["launch_RPG32_F",20];
_this addMagazineCargo ["30Rnd_mas_556x45_Stanag",200];
_this addMagazineCargo ["30Rnd_mas_556x45_T_Stanag",200];
_this addMagazineCargo ["30Rnd_556x45_Stanag_Tracer_Red",200];
_this addMagazineCargo ["30Rnd_556x45_Stanag_Tracer_Green",200];
_this addMagazineCargo ["30Rnd_556x45_Stanag_Tracer_Yellow",200];
_this addMagazineCargo ["20Rnd_556x45_UW_mag",200];
_this addMagazineCargo ["20Rnd_mas_762x51_Stanag",200];
_this addMagazineCargo ["20Rnd_mas_762x51_T_Stanag",200];
_this addMagazineCargo ["20Rnd_762x51_Mag",200];
_this addMagazineCargo ["10Rnd_762x51_Mag",200];
_this addMagazineCargo ["5Rnd_mas_127x99_Stanag",200];
_this addMagazineCargo ["5Rnd_mas_127x99_dem_Stanag",200];
_this addMagazineCargo ["5Rnd_mas_127x99_T_Stanag",200];
_this addMagazineCargo ["30Rnd_mas_9x21_Stanag",200];
_this addMagazineCargo ["30Rnd_mas_9x21d_Stanag",200];
_this addMagazineCargo ["30Rnd_9x21_Mag",200];
_this addMagazineCargo ["200Rnd_mas_556x45_Stanag",200];
_this addMagazineCargo ["200Rnd_mas_556x45_T_Stanag",200];
_this addMagazineCargo ["100Rnd_mas_762x51_Stanag",200];
_this addMagazineCargo ["100Rnd_mas_762x51_T_Stanag",200];
_this addMagazineCargo ["150Rnd_762x51_Box",200];
_this addMagazineCargo ["150Rnd_762x51_Box_Tracer",200];
_this addMagazineCargo ["17Rnd_mas_9x21_Mag",200];
_this addMagazineCargo ["16Rnd_9x21_Mag",200];
_this addMagazineCargo ["15Rnd_mas_9x21_Mag",200];
_this addMagazineCargo ["13Rnd_mas_9x21_Mag",200];
_this addMagazineCargo ["12Rnd_mas_45acp_Mag",200];
_this addMagazineCargo ["10Rnd_mas_45acp_Mag",200];
_this addMagazineCargo ["8Rnd_mas_45acp_Mag",200];
_this addMagazineCargo ["UGL_FlareCIR_F",200];
_this addMagazineCargo ["UGL_FlareGreen_F",200];
_this addMagazineCargo ["UGL_FlareRed_F",200];
_this addMagazineCargo ["UGL_FlareWhite_F",200];
_this addMagazineCargo ["UGL_FlareYellow_F",200];
_this addMagazineCargo ["1Rnd_HE_Grenade_shell",200];
_this addMagazineCargo ["1Rnd_Smoke_Grenade_shell",200];
_this addMagazineCargo ["1Rnd_SmokeGreen_Grenade_shell",200];
_this addMagazineCargo ["1Rnd_SmokeYellow_Grenade_shell",200];
_this addMagazineCargo ["1Rnd_SmokePurple_Grenade_shell",200];
_this addMagazineCargo ["1Rnd_SmokeBlue_Grenade_shell",200];
_this addMagazineCargo ["1Rnd_SmokeOrange_Grenade_shell",200];
_this addMagazineCargo ["16Rnd_9x21_Mag",200];
_this addMagazineCargo ["30Rnd_9x21_Mag",200];
_this addMagazineCargo ["NLAW_F",50];
_this addMagazineCargo ["RPG32_F",50];
_this addMagazineCargo ["SmokeShellRed",20];
_this addMagazineCargo ["SmokeShellGreen",20];
_this addMagazineCargo ["SmokeShellYellow",20];
_this addMagazineCargo ["SmokeShellPurple",20];
_this addMagazineCargo ["SmokeShellBlue",20];
_this addMagazineCargo ["SmokeShell",50];
_this addMagazineCargo ["HandGrenade",50];
_this addMagazineCargo ["MiniGrenade",50];
_this addMagazineCargo ["B_IR_Grenade",50];
_this addMagazineCargo ["I_IR_Grenade",50];
_this addMagazineCargo ["Chemlight_green",20];
_this addMagazineCargo ["Chemlight_red",20];
_this addMagazineCargo ["Chemlight_yellow",20];
_this addMagazineCargo ["Chemlight_blue",20];
_this addMagazineCargo ["DemoCharge_Remote_Mag",30];
_this addMagazineCargo ["SatchelCharge_Remote_Mag",30];
_this addMagazineCargo ["ATMine_Range_Mag",30];
_this addMagazineCargo ["APERSMine_Range_Mag",30];
_this addMagazineCargo ["APERSBoundingMine_Range_Mag",30];
_this addMagazineCargo ["SLAMDirectionalMine_Wire_Mag",30];
_this addMagazineCargo ["APERSTripMine_Wire_Mag",30];
_this addMagazineCargo ["ClaymoreDirectionalMine_Remote_Mag",30];
_this addWeaponCargo ["Binocular",30];
_this addWeaponCargo ["Rangefinder",30];
_this addWeaponCargo ["Laserdesignator",30];
_this addMagazineCargo ["Laserbatteries",20];
_this addItemCargo ["NVGoggles",30];
_this addWeaponCargo ["MineDetector",20];
_this addItemCargo ["FirstAidKit",100];
_this addItemCargo ["Medikit",30];
_this addItemCargo ["ToolKit",20];
_this addItemCargo ["ItemCompass",20];
_this addItemCargo ["ItemGPS",20];
_this addItemCargo ["ItemMap",20];
_this addItemCargo ["ItemRadio",20];
_this addItemCargo ["ItemWatch",20];
_this addItemCargo ["muzzle_mas_snds_M",20];
_this addItemCargo ["muzzle_mas_snds_C",20];
_this addItemCargo ["muzzle_mas_snds_LM",20];
_this addItemCargo ["muzzle_mas_snds_L",20];
_this addItemCargo ["muzzle_mas_snds_Mc",20];
_this addItemCargo ["muzzle_mas_snds_SM",20];
_this addItemCargo ["muzzle_mas_snds_SMc",20];
_this addItemCargo ["muzzle_mas_snds_SH",20];
_this addItemCargo ["muzzle_mas_snds_SHc",20];
_this addItemCargo ["muzzle_mas_snds_Mc",20];
_this addItemCargo ["muzzle_snds_H",20];
_this addItemCargo ["muzzle_snds_H",20];
_this addItemCargo ["muzzle_snds_L",20];
_this addItemCargo ["muzzle_snds_B",20];
_this addItemCargo ["muzzle_snds_H_MG",20];
_this addItemCargo ["optic_MRCO",20]; 
_this addItemCargo ["optic_Nightstalker",20];  
_this addItemCargo ["optic_DMS",20]; 
_this addItemCargo ["optic_NVS",20]; 
_this addItemCargo ["optic_SOS",20];  
_this addItemCargo ["optic_tws",20]; 
_this addItemCargo ["optic_Arco",20]; 
_this addItemCargo ["optic_Hamr",20];  
_this addItemCargo ["optic_Aco",20];  
_this addItemCargo ["optic_Holosight",20];
_this addItemCargo ["optic_LRPS",20];
_this addItemCargo ["acc_flashlight",20]; 
_this addItemCargo ["acc_pointer_IR",20];
_this addItemCargo ["optic_mas_zeiss",20]; 
_this addItemCargo ["optic_mas_zeiss_c",20];  
_this addItemCargo ["optic_mas_zeiss_eo",20];  
_this addItemCargo ["optic_mas_zeiss_eo_c",20]; 
_this addItemCargo ["optic_mas_acog",20]; 
_this addItemCargo ["optic_mas_acog_c",20];
_this addItemCargo ["optic_mas_acog_eo",20];
_this addItemCargo ["optic_mas_acog_eo_c",20];
_this addItemCargo ["optic_mas_acog_rd",20];
_this addItemCargo ["optic_mas_acog_rd_c",20];
_this addItemCargo ["optic_mas_handle",20];
_this addItemCargo ["optic_mas_aim",20];
_this addItemCargo ["optic_mas_aim_c",20];
_this addItemCargo ["optic_mas_pso",20];
_this addItemCargo ["optic_mas_pso_c",20];
_this addItemCargo ["optic_mas_pso_eo",20];
_this addItemCargo ["optic_mas_pso_eo_c",20];
_this addItemCargo ["optic_mas_pso_nv",20];
_this addItemCargo ["optic_mas_pso_nv_c",20];
_this addItemCargo ["optic_mas_pso_nv_eo",20];
_this addItemCargo ["optic_mas_pso_nv_eo_c",20];
_this addItemCargo ["optic_mas_term",20];
_this addbackpackcargo ["B_Bergen_mcamo",5]; 
_this addbackpackcargo ["B_Bergen_blk",5]; 
_this addbackpackcargo ["B_AssaultPack_khk",5];  
_this addbackpackcargo ["B_Carryall_cbr",5]; 
_this addbackpackcargo ["B_UAV_01_backpack_F",2];
_this addbackpackcargo ["B_BergenG",5];
_this addbackpackcargo ["G_Bergen",5];
_this addbackpackcargo ["B_BergenC_blu",5];
_this addbackpackcargo ["C_Bergen_blu",5];
_this addbackpackcargo ["C_Bergen_grn",5];
_this addbackpackcargo ["B_BergenC_grn",5]; 
_this addbackpackcargo ["B_BergenC_red",5];  
_this addbackpackcargo ["B_AssaultPack_khk",5];   
_this addbackpackcargo ["B_AssaultPack_dgtl",5];  
_this addbackpackcargo ["B_AssaultPack_rgr",5];  
_this addbackpackcargo ["B_AssaultPack_sgg",5]; 
_this addbackpackcargo ["B_AssaultPack_blk",5];    
_this addbackpackcargo ["B_AssaultPack_cbr",5];
_this addbackpackcargo ["B_TacticalPack_Base",5];     
_this addbackpackcargo ["B_TacticalPack_rgr",5];  
_this addbackpackcargo ["B_TacticalPack_oli",5]; 
_this addbackpackcargo ["B_TacticalPack_blk",5];     
_this addbackpackcargo ["B_TacticalPack_mcamo",5]; 
_this addbackpackcargo ["B_TacticalPack_ocamo",5];  
_this addbackpackcargo ["B_Kitbag_mcamo",5]; 
_this addbackpackcargo ["B_Kitbag_sgg",5];  
_this addbackpackcargo ["B_Kitbag_cbr",5];  
_this addbackpackcargo ["B_Kitbag_Base",5]; 
_this addbackpackcargo ["B_Kitbag_rgr_Exp",5];  
_this addbackpackcargo ["B_Kitbag_mcamo_Eng",5]; 
_this addbackpackcargo ["B_FieldPack_blk",5];    
_this addbackpackcargo ["B_FieldPack_ocamo",5]; 
_this addbackpackcargo ["B_FieldPack_cbr",5];    
_this addbackpackcargo ["B_Carryall_ocamo",5]; 
_this addbackpackcargo ["B_Carryall_oucamo",5];
_this addbackpackcargo ["B_Carryall_oli",5];
_this addbackpackcargo ["B_Carryall_mcamo",5];
_this addbackpackcargo ["B_Parachute",25]; 

Edited by legio4777

Share this post


Link to post
Share on other sites

("<t color=""#00FF00"">" + ("Weapons") + "</t>")

Edited by Mariodu62

Share this post


Link to post
Share on other sites
("<t color=""#00FF00"">" + ("Weapons") + "</t>")

Hi... Doesn´t work...

Any other idea?

Share this post


Link to post
Share on other sites

gun = this addaction [("<t color="#00FF00"">" + ("Weapons") +"</t>"),"AmmoBoxMasi.sqf","",5,false,true,"","];

Share this post


Link to post
Share on other sites
this addAction["<t color='#00ff00'>Weapons</t>", "this execVM 'AmmoBoxMasi.sqf'"];

Share this post


Link to post
Share on other sites

Hi Guys, I dont know but for any reason doesn´t read the .sqf. The addaction works but doesn t execute the sqf file.

Could someone give other idea about what could happen?

Share this post


Link to post
Share on other sites
this addAction["<t color='#00ff00'>Weapons</t>", "AmmoBoxMasi.sqf"];

If you need to access the ammobox in the script put this code in at the top

_box = _this select 1;

Share this post


Link to post
Share on other sites

So it isn't acually executing? What did u wanna make? I take it an ammobox that fills it witg this becausw I just noyiced you didn't createVehicle for the box?

Share this post


Link to post
Share on other sites
this addAction["<t color='#00ff00'>Weapons</t>", "AmmoBoxMasi.sqf"];

If you need to access the ammobox in the script put this code in at the top

_box = _this select 1;

I´ve put the code you propose me at the top of the sqf, and it continue without working.... executes the addaction but not the sqf...

---------- Post added at 14:03 ---------- Previous post was at 14:01 ----------

So it isn't acually executing? What did u wanna make? I take it an ammobox that fills it witg this becausw I just noyiced you didn't createVehicle for the box?

If you mean a box at the editor yes.... there is a supply box where I have included de addaction code with the sqf script reference...

What do you mean with "createVehicle for the box"?

---------- Post added at 14:19 ---------- Previous post was at 14:03 ----------

I´ve created a mission if someone could check.

https://www.dropbox.com/s/bdc8bff6vmtoa8z/caja.Altis.zip

Share this post


Link to post
Share on other sites

just curious why go thru all the addaction and individual script per person to put weapons in a crate? why not just use the global versions of add/remove weapons commands and just put them in the crate from the start for everybody?

clearWeaponCargoGlobal 
clearMagazineCargoGlobal 
clearItemCargoGlobal  
clearBackpackCargoGlobal  
addWeaponCargoGlobal

Share this post


Link to post
Share on other sites
Hey Fusion,

What do you mean by "deckare"?

Delcare gimme a minute I'll make up a script

Share this post


Link to post
Share on other sites
Delcare gimme a minute I'll make up a script

Ok thanks... Yesterday I put a dropbox mission example... if that could help you

Share this post


Link to post
Share on other sites

your issue is in the very 1st line

_box = _this select 1;

clearWeaponCargo _this;
clearMagazineCargo _this;
clearItemCargo _this;

2 issues,

1st is your first line - it should be

_box = _this select 0;

2nd - you told it that the object its suppose to work with is named _box but after that you refer to it as _this

it should be refered to as _box all the way down not _this.

Share this post


Link to post
Share on other sites

And your script isn't executing fully..

You should always test your scripts with a

 hint format["TEST", "PLAIN"];

I don't get the hint when I execute.

Found out why. addACtion should be

wep = this addAction ["Weapons", {execVM"AmmoCrates.sqf";}];

Also got it to work, but check your classes for the weapons

http://gyazo.com/71f3873bad68d6e522e1ccecc0a63967

Unless you are doing this with and addon :P im reg arma 3

_box = _this select 0;

clearWeaponCargo _this;
clearMagazineCargo _this;
clearItemCargo _this;


box addWeaponCargo ["arifle_mas_hk416",20];
box addWeaponCargo ["arifle_mas_hk416_sd",20];
box addWeaponCargo ["arifle_mas_hk416_gl",20];;
box addWeaponCargo ["arifle_mas_hk416_m203",20];
box addWeaponCargo ["arifle_mas_hk416_v",20];
box addWeaponCargo ["arifle_mas_hk416_d",20];
box addWeaponCargo ["arifle_mas_hk416_gl_v",20];
box addWeaponCargo ["arifle_mas_hk416_m203_v",20];
box addWeaponCargo ["arifle_mas_hk416_gl_d",20];
box addWeaponCargo ["arifle_mas_hk416_m203_d",20];
box addWeaponCargo ["arifle_mas_hk416_m203c",20];
box addWeaponCargo ["arifle_mas_hk416c",20];
box addWeaponCargo ["arifle_mas_hk417c",20];
box addWeaponCargo ["arifle_mas_hk417c_sd",20];
box addWeaponCargo ["arifle_mas_hk417_m203c",20];;
box addWeaponCargo ["arifle_mas_hk417_m203c_sd",20];
box addWeaponCargo ["arifle_mas_hk417c_v",20];
box addWeaponCargo ["arifle_mas_hk417c_v_sd",20];
box addWeaponCargo ["arifle_mas_hk417c_d",20];
box addWeaponCargo ["arifle_mas_hk417c_d_sd",20];
box addWeaponCargo ["arifle_mas_hk417_m203c_d",20];
box addWeaponCargo ["arifle_mas_hk417_m203c_d_sd",20];
box addWeaponCargo ["arifle_mas_m4",20];
box addWeaponCargo ["arifle_mas_m4_sd",20];
box addWeaponCargo ["arifle_mas_m4_gl",20];;
box addWeaponCargo ["arifle_mas_m4_gl_sd",20];
box addWeaponCargo ["arifle_mas_m4_m203",20];
box addWeaponCargo ["arifle_mas_m4_m203_sd",20];
box addWeaponCargo ["arifle_mas_m4_v",20];
box addWeaponCargo ["arifle_mas_m4_v_sd",20];
box addWeaponCargo ["arifle_mas_m4_gl_v",20];
box addWeaponCargo ["arifle_mas_m4_gl_v_sd",20];
box addWeaponCargo ["arifle_mas_m4_m203_v",20];
box addWeaponCargo ["arifle_mas_m4_m203_v_sd",20];
box addWeaponCargo ["arifle_mas_m4_d",20];
box addWeaponCargo ["arifle_mas_m4_d_sd",20];
box addWeaponCargo ["arifle_mas_m4_gl_d",20];
box addWeaponCargo ["arifle_mas_m4_gl_d_sd",20];
box addWeaponCargo ["arifle_mas_m4_m203_d",20];
box addWeaponCargo ["arifle_mas_m4_m203_d_sd",20];
box addWeaponCargo ["arifle_mas_m4c",20];
box addWeaponCargo ["arifle_mas_m4c_sd",20];
box addWeaponCargo ["arifle_mas_m4_m203c",20];
box addWeaponCargo ["arifle_mas_m4_m203c_sd",20];
box addWeaponCargo ["arifle_mas_m4c_v",20];
box addWeaponCargo ["arifle_mas_m4c_d",20];
box addWeaponCargo ["arifle_mas_m4c_v_sd",20];
box addWeaponCargo ["arifle_mas_m4c_d_sd",20];
box addWeaponCargo ["arifle_mas_m16",20];
box addWeaponCargo ["arifle_mas_m16_sd",20];
box addWeaponCargo ["arifle_mas_m16_gl",20];
box addWeaponCargo ["arifle_mas_m16_gl_sd",20];
box addWeaponCargo ["arifle_mas_m4c_d_sd",20];
box addWeaponCargo ["arifle_mas_m16",20];
box addWeaponCargo ["arifle_mas_m16_sd",20];
box addWeaponCargo ["arifle_mas_m16_gl",20];
box addWeaponCargo ["srifle_mas_hk417",20];
box addWeaponCargo ["srifle_mas_hk417_sd",20];
box addWeaponCargo ["srifle_mas_hk417_v",20];
box addWeaponCargo ["srifle_mas_hk417_d",20];
box addWeaponCargo ["srifle_mas_hk417_v_sd",20];
box addWeaponCargo ["srifle_mas_hk417_d_sd",20];
box addWeaponCargo ["srifle_mas_hk417_d",20];
box addWeaponCargo ["srifle_mas_sr25",20];
box addWeaponCargo ["srifle_mas_sr25_sd",20];
box addWeaponCargo ["srifle_mas_sr25_v",20];
box addWeaponCargo ["srifle_mas_sr25_d",20];
box addWeaponCargo ["srifle_mas_ebr",20];
box addWeaponCargo ["srifle_mas_ebr_sd",20];
box addWeaponCargo ["srifle_mas_m24_v",20];
box addWeaponCargo ["srifle_mas_m24_v_h",20];
box addWeaponCargo ["srifle_mas_m24_d",20];
box addWeaponCargo ["srifle_mas_m24_d_h",20];
box addWeaponCargo ["srifle_mas_m24",20];
box addWeaponCargo ["srifle_mas_m24_h",20];
box addWeaponCargo ["srifle_mas_m107",20];
box addWeaponCargo ["srifle_mas_m107_h",20];
box addWeaponCargo ["srifle_mas_m107_sd",20];
box addWeaponCargo ["srifle_mas_m107_v",20];
box addWeaponCargo ["srifle_mas_m107_v_h",20];
box addWeaponCargo ["srifle_mas_m107_v_sd",20];
box addWeaponCargo ["srifle_mas_m107_d",20];
box addWeaponCargo ["srifle_mas_m107_d_h",20];
box addWeaponCargo ["srifle_mas_m107_d_sd",20];
box addWeaponCargo ["srifle_DMR_01_MRCO_pointer_F",20];
box addWeaponCargo ["srifle_DMR_01_ACO_F",20];
box addWeaponCargo ["srifle_DMR_01_ARCO_pointer_F",20];
box addWeaponCargo ["srifle_DMR_01_F",20];
box addWeaponCargo ["srifle_DMR_01_SOS_F",20];
box addWeaponCargo ["arifle_mas_g3",20];
box addWeaponCargo ["arifle_mas_g3_h",20];
box addWeaponCargo ["arifle_mas_g3_m203",20];
box addWeaponCargo ["arifle_mas_g3s",20];
box addWeaponCargo ["arifle_mas_mp5",20];
box addWeaponCargo ["arifle_mas_mp5_sd",20];
box addWeaponCargo ["arifle_mas_mp5_v",20];
box addWeaponCargo ["arifle_mas_mp5_v_sd",20];
box addWeaponCargo ["arifle_mas_mp5_d",20];
box addWeaponCargo ["arifle_mas_mp5_d_sd",20];
box addWeaponCargo ["arifle_mas_mp5sd",20];
box addWeaponCargo ["arifle_mas_mp5sd_ds",20];
box addWeaponCargo ["LMG_mas_Mk200_F",20];
box addWeaponCargo ["LMG_mas_Mk200_F_sd",20];
box addWeaponCargo ["LMG_mas_Mk200_F_h",20];
box addWeaponCargo ["LMG_mas_M249_F",20];
box addWeaponCargo ["LMG_mas_M249_F_h",20];
box addWeaponCargo ["LMG_mas_M249_F_sd",20];
box addWeaponCargo ["LMG_mas_M249_F_v",20];
box addWeaponCargo ["LMG_mas_M249_F_v_h",20];
box addWeaponCargo ["LMG_mas_M249_F_v_sd",20];
box addWeaponCargo ["LMG_mas_M249_F_d",20];
box addWeaponCargo ["LMG_mas_M249_F_d_h",20];
box addWeaponCargo ["LMG_mas_M249_F_d_sd",20];
box addWeaponCargo ["LMG_mas_M249a_F",20];
box addWeaponCargo ["LMG_mas_Mk48_F",20];
box addWeaponCargo ["LMG_mas_Mk48_F_v",20];
box addWeaponCargo ["LMG_mas_Mk48_F_d",20];
box addWeaponCargo ["LMG_mas_M240_F",20];
box addWeaponCargo ["LMG_mas_M240_F_h",20];
box addWeaponCargo ["LMG_mas_mg3_F",20];
box addWeaponCargo ["LMG_mas_mg3_F_h",20];
box addWeaponCargo ["hgun_mas_m9_F",20];
box addWeaponCargo ["hgun_mas_bhp_F",20];
box addWeaponCargo ["hgun_mas_glock_F",20];
box addWeaponCargo ["hgun_mas_m9_F_sd",20];
box addWeaponCargo ["hgun_mas_bhp_F_sd",20];
box addWeaponCargo ["hgun_mas_glock_F_sd",20];
box addWeaponCargo ["hgun_mas_acp_F",20];
box addWeaponCargo ["hgun_mas_usp_F",20];
box addWeaponCargo ["hgun_mas_glocksf_F",20];
box addWeaponCargo ["hgun_mas_acp_F_sd",20];
box addWeaponCargo ["hgun_mas_usp_F_sd",20];
box addWeaponCargo ["hgun_mas_glocksf_F_sd",20];
box addWeaponCargo ["hgun_mas_usp_l_F",20];
box addWeaponCargo ["hgun_mas_usp_l_F_sd",20];
box addWeaponCargo ["hgun_P07_snds_F",20];
box addWeaponCargo ["hgun_Rook40_snds_F",20];
box addWeaponCargo ["hgun_Pistol_heavy_01_snds_F",20];
box addWeaponCargo ["hgun_Pistol_heavy_02_Yorris_F",20];
box addWeaponCargo ["hgun_PDW2000_F",20];
box addWeaponCargo ["launch_B_Titan_F",20];
box addWeaponCargo ["launch_B_Titan_short_F",20];
box addMagazineCargo ["11Rnd_45ACP_Mag",200];
box addMagazineCargo ["6Rnd_45ACP_Cylinder",200];
box addMagazineCargo ["Titan_AA",200];
box addMagazineCargo ["Titan_AT",200];
box addMagazineCargo ["Titan_AP",200];
box addWeaponCargo ["launch_NLAW_F",20];
box addWeaponCargo ["launch_RPG32_F",20];
box addMagazineCargo ["30Rnd_mas_556x45_Stanag",200];
box addMagazineCargo ["30Rnd_mas_556x45_T_Stanag",200];
box addMagazineCargo ["30Rnd_556x45_Stanag_Tracer_Red",200];
box addMagazineCargo ["30Rnd_556x45_Stanag_Tracer_Green",200];
box addMagazineCargo ["30Rnd_556x45_Stanag_Tracer_Yellow",200];
box addMagazineCargo ["20Rnd_556x45_UW_mag",200];
box addMagazineCargo ["20Rnd_mas_762x51_Stanag",200];
box addMagazineCargo ["20Rnd_mas_762x51_T_Stanag",200];
box addMagazineCargo ["20Rnd_762x51_Mag",200];
box addMagazineCargo ["10Rnd_762x51_Mag",200];
box addMagazineCargo ["5Rnd_mas_127x99_Stanag",200];
box addMagazineCargo ["5Rnd_mas_127x99_dem_Stanag",200];
box addMagazineCargo ["5Rnd_mas_127x99_T_Stanag",200];
box addMagazineCargo ["30Rnd_mas_9x21_Stanag",200];
box addMagazineCargo ["30Rnd_mas_9x21d_Stanag",200];
box addMagazineCargo ["30Rnd_9x21_Mag",200];
box addMagazineCargo ["200Rnd_mas_556x45_Stanag",200];
box addMagazineCargo ["200Rnd_mas_556x45_T_Stanag",200];
box addMagazineCargo ["100Rnd_mas_762x51_Stanag",200];
box addMagazineCargo ["100Rnd_mas_762x51_T_Stanag",200];
box addMagazineCargo ["150Rnd_762x51_Box",200];
box addMagazineCargo ["150Rnd_762x51_Box_Tracer",200];
box addMagazineCargo ["17Rnd_mas_9x21_Mag",200];
box addMagazineCargo ["16Rnd_9x21_Mag",200];
box addMagazineCargo ["15Rnd_mas_9x21_Mag",200];
box addMagazineCargo ["13Rnd_mas_9x21_Mag",200];
box addMagazineCargo ["12Rnd_mas_45acp_Mag",200];
box addMagazineCargo ["10Rnd_mas_45acp_Mag",200];
box addMagazineCargo ["8Rnd_mas_45acp_Mag",200];
box addMagazineCargo ["UGL_FlareCIR_F",200];
box addMagazineCargo ["UGL_FlareGreen_F",200];
box addMagazineCargo ["UGL_FlareRed_F",200];
box addMagazineCargo ["UGL_FlareWhite_F",200];
box addMagazineCargo ["UGL_FlareYellow_F",200];
box addMagazineCargo ["1Rnd_HE_Grenade_shell",200];
box addMagazineCargo ["1Rnd_Smoke_Grenade_shell",200];
box addMagazineCargo ["1Rnd_SmokeGreen_Grenade_shell",200];
box addMagazineCargo ["1Rnd_SmokeYellow_Grenade_shell",200];
box addMagazineCargo ["1Rnd_SmokePurple_Grenade_shell",200];
box addMagazineCargo ["1Rnd_SmokeBlue_Grenade_shell",200];
box addMagazineCargo ["1Rnd_SmokeOrange_Grenade_shell",200];
box addMagazineCargo ["16Rnd_9x21_Mag",200];
box addMagazineCargo ["30Rnd_9x21_Mag",200];
box addMagazineCargo ["NLAW_F",50];
box addMagazineCargo ["RPG32_F",50];
box addMagazineCargo ["SmokeShellRed",20];
box addMagazineCargo ["SmokeShellGreen",20];
box addMagazineCargo ["SmokeShellYellow",20];
box addMagazineCargo ["SmokeShellPurple",20];
box addMagazineCargo ["SmokeShellBlue",20];
box addMagazineCargo ["SmokeShell",50];
box addMagazineCargo ["HandGrenade",50];
box addMagazineCargo ["MiniGrenade",50];
box addMagazineCargo ["B_IR_Grenade",50];
box addMagazineCargo ["I_IR_Grenade",50];
box addMagazineCargo ["Chemlight_green",20];
box addMagazineCargo ["Chemlight_red",20];
box addMagazineCargo ["Chemlight_yellow",20];
box addMagazineCargo ["Chemlight_blue",20];
box addMagazineCargo ["DemoCharge_Remote_Mag",30];
box addMagazineCargo ["SatchelCharge_Remote_Mag",30];
box addMagazineCargo ["ATMine_Range_Mag",30];
box addMagazineCargo ["APERSMine_Range_Mag",30];
box addMagazineCargo ["APERSBoundingMine_Range_Mag",30];
box addMagazineCargo ["SLAMDirectionalMine_Wire_Mag",30];
box addMagazineCargo ["APERSTripMine_Wire_Mag",30];
box addMagazineCargo ["ClaymoreDirectionalMine_Remote_Mag",30];
box addWeaponCargo ["Binocular",30];
box addWeaponCargo ["Rangefinder",30];
box addWeaponCargo ["Laserdesignator",30];
box addMagazineCargo ["Laserbatteries",20];
box addItemCargo ["NVGoggles",30];
box addWeaponCargo ["MineDetector",20];
box addItemCargo ["FirstAidKit",100];
box addItemCargo ["Medikit",30];
box addItemCargo ["ToolKit",20];
box addItemCargo ["ItemCompass",20];
box addItemCargo ["ItemGPS",20];
box addItemCargo ["ItemMap",20];
box additemCargo ["G_Combat",20];
box addItemCargo ["ItemWatch",20];
box addItemCargo ["muzzle_mas_snds_M",20];
box addItemCargo ["muzzle_mas_snds_C",20];
box addItemCargo ["muzzle_mas_snds_LM",20];
box addItemCargo ["muzzle_mas_snds_L",20];
box addItemCargo ["muzzle_mas_snds_Mc",20];
box addItemCargo ["muzzle_mas_snds_SM",20];
box addItemCargo ["muzzle_mas_snds_SMc",20];
box addItemCargo ["muzzle_mas_snds_SH",20];
box addItemCargo ["muzzle_mas_snds_SHc",20];
box addItemCargo ["muzzle_mas_snds_Mc",20];
box addItemCargo ["muzzle_snds_H",20];
box addItemCargo ["muzzle_snds_H",20];
box addItemCargo ["muzzle_snds_L",20];
box addItemCargo ["muzzle_snds_B",20];
box addItemCargo ["muzzle_snds_H_MG",20];
box addItemCargo ["optic_MRCO",20]; 
box addItemCargo ["optic_Nightstalker",20];  
box addItemCargo ["optic_DMS",20]; 
box addItemCargo ["optic_NVS",20]; 
box addItemCargo ["optic_SOS",20];  
box addItemCargo ["optic_tws",20]; 
box addItemCargo ["optic_Arco",20]; 
box addItemCargo ["optic_Hamr",20];  
box addItemCargo ["optic_Aco",20];  
box addItemCargo ["optic_Holosight",20];
box addItemCargo ["optic_LRPS",20];
box addItemCargo ["acc_flashlight",20]; 
box addItemCargo ["acc_pointer_IR",20];
box addItemCargo ["optic_mas_zeiss",20]; 
box addItemCargo ["optic_mas_zeiss_c",20];  
box addItemCargo ["optic_mas_zeiss_eo",20];  
box addItemCargo ["optic_mas_zeiss_eo_c",20]; 
box addItemCargo ["optic_mas_acog",20]; 
box addItemCargo ["optic_mas_acog_c",20];
box addItemCargo ["optic_mas_acog_eo",20];
box addItemCargo ["optic_mas_acog_eo_c",20];
box addItemCargo ["optic_mas_acog_rd",20];
box addItemCargo ["optic_mas_acog_rd_c",20];
box addItemCargo ["optic_mas_handle",20];
box addItemCargo ["optic_mas_aim",20];
box addItemCargo ["optic_mas_aim_c",20];
box addItemCargo ["optic_mas_pso",20];
box addItemCargo ["optic_mas_pso_c",20];
box addItemCargo ["optic_mas_pso_eo",20];
box addItemCargo ["optic_mas_pso_eo_c",20];
box addItemCargo ["optic_mas_pso_nv",20];
box addItemCargo ["optic_mas_pso_nv_c",20];
box addItemCargo ["optic_mas_pso_nv_eo",20];
box addItemCargo ["optic_mas_pso_nv_eo_c",20];
box addItemCargo ["optic_mas_term",20];
box addbackpackcargo ["B_Bergen_mcamo",5]; 
box addbackpackcargo ["B_Bergen_blk",5]; 
box addbackpackcargo ["B_AssaultPack_khk",5];  
box addbackpackcargo ["B_Carryall_cbr",5]; 
box addbackpackcargo ["B_UAV_01_backpack_F",2];
box addbackpackcargo ["B_BergenG",5];
box addbackpackcargo ["G_Bergen",5];
box addbackpackcargo ["B_BergenC_blu",5];
box addbackpackcargo ["C_Bergen_blu",5];
box addbackpackcargo ["C_Bergen_grn",5];
box addbackpackcargo ["B_BergenC_grn",5]; 
box addbackpackcargo ["B_BergenC_red",5];  
box addbackpackcargo ["B_AssaultPack_khk",5];   
box addbackpackcargo ["B_AssaultPack_dgtl",5];  
box addbackpackcargo ["B_AssaultPack_rgr",5];  
box addbackpackcargo ["B_AssaultPack_sgg",5]; 
box addbackpackcargo ["B_AssaultPack_blk",5];    
box addbackpackcargo ["B_AssaultPack_cbr",5];
box addbackpackcargo ["B_TacticalPack_Base",5];     
box addbackpackcargo ["B_TacticalPack_rgr",5];  
box addbackpackcargo ["B_TacticalPack_oli",5]; 
box addbackpackcargo ["B_TacticalPack_blk",5];     
box addbackpackcargo ["B_TacticalPack_mcamo",5]; 
box addbackpackcargo ["B_TacticalPack_ocamo",5];  
box addbackpackcargo ["B_Kitbag_mcamo",5]; 
box addbackpackcargo ["B_Kitbag_sgg",5];  
box addbackpackcargo ["B_Kitbag_cbr",5];  
box addbackpackcargo ["B_Kitbag_Base",5]; 
box addbackpackcargo ["B_Kitbag_rgr_Exp",5];  
box addbackpackcargo ["B_Kitbag_mcamo_Eng",5]; 
box addbackpackcargo ["B_FieldPack_blk",5];    
box addbackpackcargo ["B_FieldPack_ocamo",5]; 
box addbackpackcargo ["B_FieldPack_cbr",5];    
box addbackpackcargo ["B_Carryall_ocamo",5]; 
box addbackpackcargo ["B_Carryall_oucamo",5];
box addbackpackcargo ["B_Carryall_oli",5];
box addbackpackcargo ["B_Carryall_mcamo",5];
box addbackpackcargo ["B_Parachute",25]; 

hint format ["TEST", "PLAIN"];

There you go !

Edited by Fusion13

Share this post


Link to post
Share on other sites

Hi Fusion & Nimrod,

It is reading the script but not the content. I don´t know why but for some reason is not working. I´ve also simplyfied the box content for the testing, putting some stuf from the addon and some from regular Arma.

I´ve tried this, in both it is reading the .sqf (thanks to the hint test) but as I comment not the content.

_box = _this select 0;

clearWeaponCargo _this;
clearMagazineCargo _this;
clearItemCargo _this;

_box addWeaponCargo ["arifle_mas_hk416",20];
_box addWeaponCargo ["launch_RPG32_F",20];
_box addWeaponCargo ["Binocular",30];
_box addWeaponCargo ["Rangefinder",30]; 
_box addItemCargo ["acc_pointer_IR",20];
_box addbackpackcargo ["B_Bergen_mcamo",5]; 

hint format ["TEST", "PLAIN"]; 

And this

_box = _this select 0;

clearWeaponCargo _this;
clearMagazineCargo _this;
clearItemCargo _this;

box addWeaponCargo ["arifle_mas_hk416",20];
box addWeaponCargo ["launch_RPG32_F",20];
box addWeaponCargo ["Binocular",30];
box addWeaponCargo ["Rangefinder",30]; 
box addItemCargo ["acc_pointer_IR",20];
box addbackpackcargo ["B_Bergen_mcamo",5]; 

hint format ["TEST", "PLAIN"]; 

And this is in the init of the ammo box:

wep = this addAction ["Weapons", {execVM"AmmoCrates.sqf";}];

Here you have the test misison I´ve created to you to have a look if you could check it.

https://www.dropbox.com/s/bdc8bff6vmtoa8z/caja.Altis.zip

Let me know waht you think.

Now is becaming a proud question to make it works...:confused: :p :)

---------- Post added at 14:15 ---------- Previous post was at 14:01 ----------

I´ve also made another test, without the addon. And, again reads the .sqf (test hint appears) but not the content... :(

Share this post


Link to post
Share on other sites
Hi Fusion & Nimrod,

It is reading the script but not the content. I don´t know why but for some reason is not working. I´ve also simplyfied the box content for the testing, putting some stuf from the addon and some from regular Arma.

I´ve tried this, in both it is reading the .sqf (thanks to the hint test) but as I comment not the content.

_box = _this select 0;

clearWeaponCargo _this;
clearMagazineCargo _this;
clearItemCargo _this;

_box addWeaponCargo ["arifle_mas_hk416",20];
_box addWeaponCargo ["launch_RPG32_F",20];
_box addWeaponCargo ["Binocular",30];
_box addWeaponCargo ["Rangefinder",30]; 
_box addItemCargo ["acc_pointer_IR",20];
_box addbackpackcargo ["B_Bergen_mcamo",5]; 

hint format ["TEST", "PLAIN"]; 

And this

_box = _this select 0;

clearWeaponCargo _this;
clearMagazineCargo _this;
clearItemCargo _this;

box addWeaponCargo ["arifle_mas_hk416",20];
box addWeaponCargo ["launch_RPG32_F",20];
box addWeaponCargo ["Binocular",30];
box addWeaponCargo ["Rangefinder",30]; 
box addItemCargo ["acc_pointer_IR",20];
box addbackpackcargo ["B_Bergen_mcamo",5]; 

hint format ["TEST", "PLAIN"]; 

And this is in the init of the ammo box:

wep = this addAction ["Weapons", {execVM"AmmoCrates.sqf";}];

Here you have the test misison I´ve created to you to have a look if you could check it.

https://www.dropbox.com/s/bdc8bff6vmtoa8z/caja.Altis.zip

Let me know waht you think.

Now is becaming a proud question to make it works...:confused: :p :)

---------- Post added at 14:15 ---------- Previous post was at 14:01 ----------

I´ve also made another test, without the addon. And, again reads the .sqf (test hint appears) but not the content... :(

here is an example of a scope crate, its just an ammo box that's emptied out from the script then filled with 50 scopes of every type. for what you are trying to do with the addaction is really not needed. even an empty crate still shows the inventory action so you can see inside the empty crate if you wanted.

/*
to use on ammo crate in editor place this execution line in the ammobox init line in editor and use: _n = [this] execVM "scopeCrate.sqf";    
            // since it's placed directly in the ammobox init line it knows that  [this]  referes to the object its in.
            you can name the crate as well.   (if I name the box: wepcrate1)  use: _n = [wepcrate1] execVM "scopeCrate.sqf";  
to use in a script simply name your ammobox in the editor then use name of box to call script:  [wepcrate1] execVM "scopeCrate.sqf";
*/

wepItems = 
[
"acc_pointer_IR",
"acc_flashlight",
"optic_Aco",
"optic_ACO_grn",
"optic_ACO_grn_smg",
"optic_Aco_smg",
"optic_Arco",
"optic_Hamr",
"optic_Holosight",
"optic_Holosight_smg",
"optic_MRCO",
"optic_SOS",
"optic_Nightstalker",
"optic_NVS",
"optic_tws",
"optic_tws_mg",
"optic_DMS",
"optic_Yorris",
"optic_LRPS"
];

_crate = _this select 0;

clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
clearItemCargoGlobal  _crate;
clearBackpackCargoGlobal  _crate;

{_crate addItemCargoGlobal [_x,50];} foreach wepItems;

notice I refered to the ammo box as _crate (_crate = _this select 0) then everything ammobox related after that is refered to as _crate in the script. now the only other difference in your script compared to mine is I decided to use an array to put in the classnames of the objects,weapons,mags whatever. this was done so you don't have to keep writing the same command over and over again. I also use global versions of the commands to add them to the crate for everyone to see and use from the start. addactions are local effect only and only the person using the script will see your weps being that your only using the local effect command versions as well.

Share this post


Link to post
Share on other sites

Thanks @Fusion

@Nimrod, yes I know by using just the classic execVM .sqf at the init of the box works with the word "inventory".... My sript works perfectly with it. The idea was to use the addaction command. I´ll forget it.

By the way I like your script to fill the ammo boxes so I´ll use it....

:p :D

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  

×