Jump to content
Sign in to follow this  
Solarghost

Updated Ammo crate filler

Recommended Posts

A few more items added including the 7.62 AKM and the Golden Ak, along with the new Ace Map Tools

:)

Create a function.sqf file and cal the file 'ammo'

So that it will be called: ammo.sqf

Add this code:

/*
Run this script from the INIT line of an ammo crate:

Nul = [this] execVM "ammo.sqf";

//==================================================================
//	DO NOT EDIT THIS SECTION
*/	_wepset = [];
#define WEP(wep,num) _wepset = _wepset + [[##wep,##num]];
_magset = [];
#define MAG(mag,num) _magset = _magset + [[##mag,##num]];
//===================================================================

//WEAPONS//
WEP("ACE_GlassesSpectacles",10)
WEP("ACE_GlassesRoundGlasses",10)
WEP("ACE_GlassesSunglasses",10)
WEP("ACE_GlassesBlackSun",10)
WEP("ACE_GlassesBlueSun",10)
WEP("ACE_GlassesRedSun",10)
WEP("ACE_GlassesGreenSun",10)
WEP("ACE_GlassesLHD_glasses",10)
WEP("ACE_GlassesLHD_glasses",10)
WEP("ACE_GlassesTactical",10)
WEP("ACE_GlassesGasMask_US",10)
WEP("ACE_GlassesBalaklava",10)
WEP("ACE_Earplugs",100)
WEP("Laserdesignator",100)
WEP("ACE_Rangefinder_OD",100)
WEP("ACE_Spottingscope",100)
WEP("ACE_Wirecutter",100)
WEP("ACE_ParachuteRoundPack",10)
WEP("ACE_USP",100)
WEP("ACE_USPSD",100)
WEP("ACE_P226",100)
WEP("ACE_Kestrel4500",100)
WEP("ACE_ParachutePack",50)
WEP("M9",15)
WEP("M9SD",15)
WEP("Colt1911",15)
WEP("ACE_Glock17",15)
WEP("ACE_Glock18",15)
WEP("ACE_Flaregun",15)
WEP("M16A2",15)
WEP("M16A2GL",15)
WEP("M16A4",15)
WEP("M16A4_GL",15)
WEP("M16A4_ACG",15)
WEP("M16A4_ACG_GL",15)
WEP("ACE_M16A4_Iron",15)
WEP("M4A1",15)
WEP("ACE_M4A1_GL",15)
WEP("ACE_M4A1_GL_SD",15)
WEP("M4A1_HWS_GL",15)
WEP("M4A1_HWS_GL_camo",15)
WEP("M4A1_HWS_GL_SD_Camo",15)
WEP("M4A1_RCO_GL",15)
WEP("M4A1_Aim",15)
WEP("M4A1_Aim_camo",15)
WEP("M4A1_AIM_SD_camo",15)
WEP("ACE_SOC_M4A1_Aim",15)
WEP("ACE_SOC_M4A1_AIM_SD",15)
WEP("ACE_SOC_M4A1_GL",15)
WEP("ACE_SOC_M4A1",15)
WEP("ACE_SOC_M4A1_GL_SD",15)
WEP("ACE_SOC_M4A1_Eotech",15)
WEP("ACE_SOC_M4A1_GL_13",15)
WEP("ACE_SOC_M4A1_GL_EOTECH",15)
WEP("ACE_SOC_M4A1_SD_9",15)
WEP("ACE_SOC_M4A1_SHORTDOT",15)
WEP("ACE_SOC_M4A1_SHORTDOT_SD",15)
WEP("ACE_SOC_M4A1_RCO_GL",15)
WEP("ACE_SOC_M4A1_GL_AIMPOINT",15)
WEP("ACE_M4A1_ACOG",15)
WEP("ACE_M4A1_ACOG_SD",15)
WEP("ACE_M4A1_Aim_SD",15)
WEP("ACE_M4A1_Eotech",15)
WEP("ACE_FAL_Para",15)
WEP("ACE_SA58",15)
WEP("G36a",10)
WEP("G36c",10)
WEP("G36_C_SD_eotech",10)
WEP("G36k",10)
WEP("M1014",10)
WEP("MP5A5",10)
WEP("MP5SD",10)
WEP("ACE_MP5A4",10)
WEP("ACE_UMP45",10)
WEP("ACE_UMP45_SD",10)
WEP("M8_carbine",10)
WEP("M8_carbineGL",10)
WEP("M8_compact",10)
WEP("MG36",10)
WEP("Mk_48",10)
WEP("M240",10)
WEP("ACE_M240G_M145",10)
WEP("ACE_M60",10)
WEP("M249",10)
WEP("ACE_M249Para",10)
WEP("ACE_M249Para_M145",10)
WEP("M8_SAW",10)
WEP("M24",10)
WEP("DMR",10)
WEP("M107",10)
WEP("M40A3",10)
WEP("M4SPR",10)
WEP("ACE_M4SPR_SD",10)
WEP("M8_sharpshooter",10)
WEP("ACE_M109",10)
WEP("ACE_M110",10)
WEP("ACE_M110_SD",10)
WEP("ACE_TAC50",10)
WEP("ACE_TAC50_SD",10)
WEP("M136",10)
WEP("SMAW",10)
WEP("ACE_M32",10)
WEP("ACE_M79",10)
WEP("Binocular",10)
WEP("NVGoggles",10)
WEP("JAVELIN",10)
WEP("STINGER",10)
WEP("AK_107_kobra",10)
WEP("AK_107_GL_kobra",10)
WEP("AK_107_GL_pso",10)
WEP("AK_107_pso",10)
WEP("AK_74",10)
WEP("AK_74_GL",10)
WEP("ItemMap",10)
WEP("AK_47_M",10)
WEP("AKS_GOLD",10)
WEP("ACE_Map_Tools",100)


//AMMO//
MAG("ACE_Rope_M_50",100)
MAG("ACE_Rope_M_60",100)
MAG("ACE_Rope_M_90",100)
MAG("ACE_Rope_M_120",100)
MAG("ACE_Sandbag_Magazine",100)
MAG("ACE_C4_M",10)
MAG("ACE_15Rnd_9x19_USP",50)
MAG("ACE_15Rnd_9x19_USPSD",50)
MAG("ACE_Battery_Rangefinder",50)
MAG("HandGrenade_West",50)
MAG("HandGrenade_Stone",50)
MAG("Smokeshell",50)
MAG("Smokeshellred",50)
MAG("Smokeshellgreen",50)
MAG("SmokeShellYellow",50)
MAG("SmokeShellOrange",50)
MAG("SmokeShellPurple",50)
MAG("ace_flashbang",50)
MAG("ace_m84",50)
MAG("ace_m7a3",50)
MAG("ace_m34",50)
MAG("ACE_IRStrobe",50)
MAG("ACE_M86PDM",50)
MAG("ACE_M2SLAM_M",50)
MAG("30Rnd_9x19_MP5",50)
MAG("30Rnd_9x19_MP5SD",50)
MAG("ACE_25Rnd_1143x23_B_UMP45",50)
MAG("7Rnd_45ACP_1911",50)
MAG("15Rnd_9x19_M9",50)
MAG("15Rnd_9x19_M9SD",50)
MAG("ACE_33Rnd_9x19_G18",50)
MAG("ACE_17Rnd_9x19_G17",50)
MAG("20Rnd_556x45_Stanag",50)
MAG("30Rnd_556x45_Stanag",50)
MAG("ACE_30Rnd_556x45_T_Stanag",50)
MAG("30Rnd_556x45_StanagSD",50)
MAG("ACE_20Rnd_762x51_B_FAL",50)
MAG("ACE_30Rnd_762x51_B_FAL",50)
MAG("30Rnd_556x45_G36",50)
MAG("200Rnd_556x45_M249",50)
MAG("ACE_200Rnd_556x45_T_M249",50)
MAG("100Rnd_556x45_BetaCMag",50)
MAG("8Rnd_B_Beneli_74Slug",50)
MAG("ACE_8Rnd_12Ga_Slug",500)
MAG("ACE_8Rnd_12Ga_Buck00",500)
MAG("ACE_9Rnd_12Ga_Slug",500)
MAG("ACE_9Rnd_12Ga_Buck00",500)
MAG("5Rnd_762x51_M24",50)
MAG("ACE_5Rnd_762x51_T_M24",50)
MAG("20Rnd_762x51_DMR",50)
MAG("ACE_20Rnd_762x51_T_DMR",50)
MAG("10Rnd_127x99_M107",30)
MAG("ACE_10Rnd_127x99_T_m107",3)
MAG("ACE_5Rnd_25x59_HEDP_Barrett",30)
MAG("ACE_20Rnd_762x51_SB_M110",50)
MAG("ACE_20Rnd_762x51_S_M110",50)
MAG("ACE_20Rnd_762x51_T_M110",50)
MAG("ACE_5Rnd_127x99_B_TAC50",30)
MAG("ACE_5Rnd_127x99_S_TAC50",30)
MAG("ACE_5Rnd_127x99_T_TAC50",30)
MAG("100Rnd_762x51_M240",50)
MAG("1Rnd_HE_M203",50)
MAG("ace_1rnd_cs_m203",50)
MAG("ACE_6Rnd_40mm_M32",50)
MAG("FlareWhite_M203",50)
MAG("FlareGreen_M203",50)
MAG("FlareRed_M203",50)
MAG("ACE_SSWhite_M203",50)
MAG("ACE_SSGreen_M203",50)
MAG("ACE_SSRed_M203",50)
MAG("ACE_SSYellow_M203",50)
MAG("1Rnd_SmokeRed_M203",50)
MAG("1Rnd_SmokeGreen_M203",50)
MAG("1Rnd_SmokeYellow_M203",50)
MAG("1Rnd_Smoke_M203",50)
MAG("ACE_SSWhite_FG",50)
MAG("ACE_SSRed_FG",50)
MAG("ACE_SSGreen_FG",50)
MAG("ACE_SSYellow_FG",50)
MAG("SMAW_HEAA",30)
MAG("SMAW_HEDP",30)
MAG("ACE_SMAW_Spotting",30)
MAG("Pipebomb",30)
MAG("Mine",30)
MAG("ACE_Claymore_M",30)
MAG("ACE_BBetty_M",30)
MAG("ACE_TripFlare_M",30)
MAG("Laserbatteries",20)
MAG("JAVELIN",10)
MAG("STINGER",20)
MAG("30Rnd_545x39_AK",50)
MAG("30Rnd_762x39_AK47",50)
MAG("FlareWhite_GP25",50)
MAG("FlareGreen_GP25",50)
MAG("FlareRed_GP25",50)
MAG("FlareYellow_GP25",50)
MAG("1Rnd_HE_GP25",50)
MAG("SmokeShellRed",50)
MAG("SmokeShellGreen",50)
MAG("SmokeShell",50)



// DO NOT EDIT BELOW THIS LINE

if((typeName _this) == "ARRAY") then {
{
	_crate = _x;
	clearMagazineCargo _crate;
	clearWeaponCargo _crate;
	{_crate addWeaponCargo [_x select 0, _x select 1]} forEach _wepset;
	{_crate addMagazineCargo [_x select 0, _x select 1]} forEach _magset;
} forEach _this;
} else {
clearMagazineCargo _this;
clearWeaponCargo _this;
{_this addWeaponCargo [_x select 0, _x select 1]} forEach _wepset;
{_this addMagazineCargo [_x select 0, _x select 1]} forEach _magset;
};

UPDATED, NOW WORKS

Edited by Solarghost
Moved on request

Share this post


Link to post
Share on other sites

Thanks, this is great! However, for those off-times when I don't make maps in ACE2, does anyone know where I can get a Vanilla crate-filler?

Good work!

Share this post


Link to post
Share on other sites
Thanks, this is great! However, for those off-times when I don't make maps in ACE2, does anyone know where I can get a Vanilla crate-filler?

Good work!

There's one around here made by Armatec or someone else. Can't remember but a search for "ammo script" or something like that. I think ArmAholic.com has it for DL as well.

http://forums.bistudio.com/search.php?searchid=686874

http://www.armaholic.com/page.php?id=5846

http://www.armaholic.com/page.php?id=5843

Edited by Manzilla

Share this post


Link to post
Share on other sites

I just can not get this to work. It's crazy, everything is set up right as well. Will you post an example mission so I can just merge it, to see if I can get it to work that way.

Thanks.

Share this post


Link to post
Share on other sites
There's one around here made by Armatec or someone else. Can't remember but a search for "ammo script" or something like that. I think ArmAholic.com has it for DL as well.

Thanks!

Share this post


Link to post
Share on other sites
I just can not get this to work. It's crazy, everything is set up right as well. Will you post an example mission so I can just merge it, to see if I can get it to work that way.

Thanks.

I think that's because It's wrong I will edit the original post and put the correct script.

Cheers

Share this post


Link to post
Share on other sites
I think that's because It's wrong I will edit the original post and put the correct script.

Cheers

Thanks bud. I was afraid I was going crazy! ;)

Share this post


Link to post
Share on other sites
Thanks bud. I was afraid I was going crazy! ;)

All good bruv, the new map tools are included as well.

:p

Share this post


Link to post
Share on other sites

Argh I can't get this to work. It just seems to clear the ammo boxes not add stuff. Can some one give me a step by step guide if its no bother? I got the old one to work but I don't know what I'm doing wrong. I am using arma edit by the way if that is the problem.

Never mind I got it working, Thanks very much for this script. Although I can't seem to use in in the empty ammo crates.

Edited by bezzzy

Share this post


Link to post
Share on other sites

I wouldn't use ArmA edit for this, all you have to do is:

1. Make a text document in the folder of the mission you are working on. Copy and paste the script provided higher on the page. Then, save that as "ammo.sqf" (with quotes) in the directory you made the text document in originally(this should be your mission folder). Then, in the "init" field of your ammo box, or helicopter, type in:

Nul = this execVM "ammo.sqf";

Hope it helps.

Share this post


Link to post
Share on other sites
I wouldn't use ArmA edit for this, all you have to do is:

1. Make a text document in the folder of the mission you are working on. Copy and paste the script provided higher on the page. Then, save that as "ammo.sqf" (with quotes) in the directory you made the text document in originally(this should be your mission folder). Then, in the "init" field of your ammo box, or helicopter, type in:

Hope it helps.

Yeah thank you for responding. I left out the Nul = :eek:.

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  

×