Jump to content
Sign in to follow this  
Griffin64

Custom ammo crate contents?

Recommended Posts

Hi everyone, I'm new to ArmA 2 editing and have a question about custom ammo crates. I know there's some pre-made scripts on armaholic, but I have no idea how to create my own scripts for custom crates. ArmA Edit is outdated and there's no ArmA 2 weapons in it.

I can't seem to figure out how to put specific weapons and ammo in them.

Can someone please help me out with this?

Share this post


Link to post
Share on other sites

You can find the new weapon names here or here. With these names the old scripts should still work. ;)

Share this post


Link to post
Share on other sites
You can find the new weapon names here or here. With these names the old scripts should still work. ;)

Thanks :D

The thing is, I tried opening up a pre-made script from armaholic that contains all of the weapons and ammo. I then copy/pasted them into a new file to make a crate of my own, but it didn't work in the editor.

Here's what it looks like. I tried pasting the "[this] exec "BLUFOR.sqs" into the initialization line in the mission editor, but all that showed up in the crate was 2 different ammo types.

Custom crate script for Armed Assault

; Created with ArmA Edit - Version 1.3.4000

; HELP: Run this script from the INITIALIZATION box of the crate.

; CODE: [this] exec "BLUFOR.sqs"

; ****************************************************************

; Get the crate parameter given

_crate = _this select 0

; Remove the stock items from the crate

clearMagazineCargo _crate

clearWeaponCargo _crate

; Add the items to the crate

_this addWeaponCargo ["G36a",20];

_this addWeaponCargo ["G36C",20];

_this addWeaponCargo ["G36_C_SD_eotech",20];

_this addWeaponCargo ["G36K",20];

_this addWeaponCargo ["M16A4_ACG_GL",20];

_this addWeaponCargo ["M4A1_HWS_GL_camo",20];

_this addWeaponCargo ["M4A1_HWS_GL_SD_Camo",20];

_this addWeaponCargo ["MP5A5",20];

_this addWeaponCargo ["MP5SD",20];

_this addWeaponCargo ["M240",20];

_this addWeaponCargo ["M24",20];

_this addWeaponCargo ["Colt1911",20];

_this addWeaponCargo ["M9",20];

_this addWeaponCargo ["M136",20];

_this addWeaponCargo ["SMAW",20];

_this addWeaponCargo ["Binocular",20];

_this addWeaponCargo ["M9SD",20];

_this addWeaponCargo ["M8_carbine",20];

_this addWeaponCargo ["M8_carbineGL",20];

_this addWeaponCargo ["M8_compact",20];

_this addMagazineCargo ["30Rnd_556x45_G36",100];

_this addMagazineCargo ["30Rnd_556x45_G36SD",100];

_this addMagazineCargo ["30Rnd_556x45_Stanag",100];

_this addMagazineCargo ["30Rnd_556x45_StanagSD",100];

_this addMagazineCargo ["30Rnd_9x19_MP5",100];

_this addMagazineCargo ["30Rnd_9x19_MP5SD",100];

_this addMagazineCargo ["1Rnd_HE_M203",100];

_this addMagazineCargo ["1Rnd_Smoke_M203",100];

_this addMagazineCargo ["1Rnd_SmokeRed_M203",100];

_this addMagazineCargo ["1Rnd_SmokeGreen_M203",100];

_this addMagazineCargo ["1Rnd_SmokeYellow_M203",100];

_this addMagazineCargo ["100Rnd_762x51_M240",100];

_this addMagazineCargo ["5Rnd_762x51_M24",100];

_this addMagazineCargo ["7Rnd_45ACP_1911",100];

_this addMagazineCargo ["15Rnd_9x19_M9",100];

_this addMagazineCargo ["15Rnd_9x19_M9SD",100];

_this addMagazineCargo ["M136",20];

_this addMagazineCargo ["SMAW_HEAA",20];

_this addMagazineCargo ["SMAW_HEDP",20];

_this addMagazineCargo ["HandGrenade_West",50];

_this addMagazineCargo ["SmokeShell",50];

_this addMagazineCargo ["SmokeShellRed",50];

_this addMagazineCargo ["SmokeShellGreen",50];

_this addMagazineCargo ["SmokeShellYellow",50];

_this addMagazineCargo ["TimeBomb",50];

_this addMagazineCargo ["PipeBomb",50];

_this addMagazineCargo ["Mine",50];

Exit

*EDIT* I can't even open up the crates in-game. No icon or anything comes up in the action menu...

Edited by Griffin64

Share this post


Link to post
Share on other sites

I dont see what is wrong there but.. its gettin late :confused: .

_crate = _this select 0;

clearWeaponCargo _crate;
clearMagazineCargo _crate;

_this addWeaponCargo ["G36a",20];
_this addWeaponCargo ["G36C",20];
_this addWeaponCargo ["G36_C_SD_eotech",20];
_this addWeaponCargo ["G36K",20];
_this addWeaponCargo ["M16A4_ACG_GL",20];
_this addWeaponCargo ["M4A1_HWS_GL_camo",20];
_this addWeaponCargo ["M4A1_HWS_GL_SD_Camo",20];
_this addWeaponCargo ["MP5A5",20];
_this addWeaponCargo ["MP5SD",20];
_this addWeaponCargo ["M240",20];
_this addWeaponCargo ["M24",20];
_this addWeaponCargo ["Colt1911",20];
_this addWeaponCargo ["M9",20];
_this addWeaponCargo ["M136",20];
_this addWeaponCargo ["SMAW",20];
_this addWeaponCargo ["Binocular",20];
_this addWeaponCargo ["M9SD",20];
_this addWeaponCargo ["M8_carbine",20];
_this addWeaponCargo ["M8_carbineGL",20];
_this addWeaponCargo ["M8_compact",20];
_this addMagazineCargo ["30Rnd_556x45_G36",100];
_this addMagazineCargo ["30Rnd_556x45_G36SD",100];
_this addMagazineCargo ["30Rnd_556x45_Stanag",100];
_this addMagazineCargo ["30Rnd_556x45_StanagSD",100];
_this addMagazineCargo ["30Rnd_9x19_MP5",100];
_this addMagazineCargo ["30Rnd_9x19_MP5SD",100];
_this addMagazineCargo ["1Rnd_HE_M203",100];
_this addMagazineCargo ["1Rnd_Smoke_M203",100];
_this addMagazineCargo ["1Rnd_SmokeRed_M203",100];
_this addMagazineCargo ["1Rnd_SmokeGreen_M203",100];
_this addMagazineCargo ["1Rnd_SmokeYellow_M203",100];
_this addMagazineCargo ["100Rnd_762x51_M240",100];
_this addMagazineCargo ["5Rnd_762x51_M24",100];
_this addMagazineCargo ["7Rnd_45ACP_1911",100];
_this addMagazineCargo ["15Rnd_9x19_M9",100];
_this addMagazineCargo ["15Rnd_9x19_M9SD",100];
_this addMagazineCargo ["M136",20];
_this addMagazineCargo ["SMAW_HEAA",20];
_this addMagazineCargo ["SMAW_HEDP",20];
_this addMagazineCargo ["HandGrenade_West",50];
_this addMagazineCargo ["SmokeShell",50];
_this addMagazineCargo ["SmokeShellRed",50];
_this addMagazineCargo ["SmokeShellGreen",50];
_this addMagazineCargo ["SmokeShellYellow",50];
_this addMagazineCargo ["TimeBomb",50];
_this addMagazineCargo ["PipeBomb",50];
_this addMagazineCargo ["Mine",50];

Save as crate.sqf and in the editor type in the crate's init box:

nul = [this] execVM "crate.sqf";

Share this post


Link to post
Share on other sites

Alrighty, how do you save it in .sqf format? I'm using version 1.3.4000 of arma edit and can only save these crates in .sqs format. I tried what you said and I still can only open crates and see two types of ammo in there, one of which I didn't even put into the crate.

Edited by Griffin64

Share this post


Link to post
Share on other sites

Paste that in new text file (notepad), then choose file/save as.. then in file name: crate.sqf and in save as type: all files and then just save, you should now have a crate.sqf file.

Share this post


Link to post
Share on other sites
Paste that in new text file (notepad), then choose file/save as.. then in file name: crate.sqf and in save as type: all files and then just save, you should now have a crate.sqf file.

Yup, still doesn't work. So here's exactly what I have.

I have a crate.sqf file in my mission's folder with the text as previously shown.

In the mission editor, I placed a US Vehicle Ammo crate. I then placed nul = [this] execVM "crate.sqf"; into the initialization line.

I then preview it to not be able to open up the crate, or even if I can, nothing appears in it.

Share this post


Link to post
Share on other sites

Running out of options there..

Try and use a diferent crate and put just 1 rifle in it (remove everything else from script).

Try using just this in the crate's init to see if it works, it should.

clearWeaponCargo this; clearMagazineCargo this; this addWeaponCargo ["AKS_GOLD",1];

It might be the type of crate, might be a typo... i dont know.

Share this post


Link to post
Share on other sites

Yeah I fixed it, had to use nul0 = [this] execVM "crate.sqf"; or something like that in the initialization line...weeeeird :/

Thanks very much for you help though!

Share this post


Link to post
Share on other sites
Yeah I fixed it, had to use nul0 = [this] execVM "crate.sqf"; or something like that in the initialization line...weeeeird :/

Thanks very much for you help though!

Are you sure you didnt do anything else ? I copy pasted the code in a file called crate.sqf and tried nul0 = [this] execVM "crate.sqf"; or even _nul0 = [this] execVM "crate.sqf"; and the crate is empty. If I put the AK_Gold in it, it works ( in the init line of the crate. )

--------- EDIT ----------

Meh....

nul0 = this execVM "crate.sqf";

No [ ] around this ...

Edited by The_Angry_Canadian

Share this post


Link to post
Share on other sites

I want to make a special crate (with special stuff) "buyable" with COIN, so I need a unique class for my new crate. Where and how can I add this class, and what's the syntax of it ?

Edited by McArcher

Share this post


Link to post
Share on other sites

Eh... why everything has to be so difficult when you want to do something very simple in Arma....? Many will disagree but...

I wanted to do custom crate, used given code, tried variations ''[this]'' & ''this'' tried ''nul'' & ''nul0'' and nothing seems to work... Used ACE crate -> US vehicle ammo (the biggest one) and tried to fill it with all the weapons but no go.... You know, like crates form Evolution and Domination?

Btw I tried with your class list not the ACE one but it should work anyways or...?

Also what confuses me, I wanted to see how they've done it in Evo and Domi so I unpacked those missions and I only was able to find Ammo markers on places where ammo boxes are in-game, so how the hell did they put those boxes there....? oO

Edited by Minoza

Share this post


Link to post
Share on other sites

crates (and the inventory of vehicles) are the biggest pain in Arma2 since OFP, where there was no JIP... I have made a simple system, that stores inventories of my crates in arrays, and JIP players init crates from this arrays. This works, but the drawback is that JIP players always see init's inventory of crates, even if someone has taken something out of this. (To make them show real contents, I need function to getWeaponCargo and so on, which are not present in Arma...)

Minoza, I think (but not sure) those crates are created dynamically ingame.

btw, when we'll have (if we will have) the functions to get contents of crates, I'll be able to change that arrays and JIPes players will see syncronized crates (I hope).

---------- Post added at 15:51 ---------- Previous post was at 15:21 ----------

I have just tried not to use arrays, to use simple setVehicleInit for crates, but it seems to work only for non-JIP-players. (added sideChat to check that it is executed). Here ( http://community.bistudio.com/wiki/setVehicleInit ) is said:

The statement will be sent to clients connecting after the command has been executed. Note that the statement will be executed automatically by JIP clients before Init.sqs or its SQF counterpart has been executed.

so... why it doesn't work even if I add processInitCommands into client's script at start for JIP ???

Share this post


Link to post
Share on other sites

Well, I would be happy with crates like in Evolution and Domination, it's just I have no idea how they got those crates there...

Basically, all I want is, take Evolution mission and make few changes so it can be played in ACE 2... One of the changes are ammo crates, I want to put one big box with all the stuff from ACE 2... So far, can't find a simple way to do that... or any way actually...

Share this post


Link to post
Share on other sites

There are two things that make Domination ammo crates a bit, special:

1) It has two "modes" of operation, as set by mission parameters when you start the mission.

2) All crates are local to player, in order to prevent the old bug where contents are not updated (shows stuff which you can't get). The big benefit for me, is that I can control precisely who gets what, and others can't even see what I put in there.

Do a file search on box or crate, and I'm sure something will turn up. It's not a simple copy & paste operation though to make it work, as the system is fairly complex.

Share this post


Link to post
Share on other sites
and others can't even see what I put in there.

for me it's the worst thing in Arma (crates' contents aren't global :( )

---------- Post added at 17:55 ---------- Previous post was at 17:54 ----------

BIS are so lazy to add some lines of code.... I've never seen such thing.....10 years and same bugs....

Share this post


Link to post
Share on other sites

LoL @ your signature McArcher, just noticed :D

So true... :(

Share this post


Link to post
Share on other sites

Anyways, I've been fiddling around with this stuff and I got ammo crate filled up with ACE stuff BUT... McArcher, now I understand why in Domi ammo crates aren't global lol... Mine are global and I have a problem beacuse of that...

WHAT I WANT IS:

In Domi, ammo crates are handled client side, and (if I recall correct) there's for example one M4 in box, each of 30 clients sees 1 M4 and can take it at same time... When they take it, 0 M4's are left in box, if they die and respawn, there will be 1 M4 in box again

WHAT I HAVE ATM IS:

Ammo crate with all the stuff, 20 pieces of each, every client (20 of them) sees 20 rifles (for example), client 1 takes one rifle, client 1 sees 19 rifles left, clients 2-20 sees 19 rifles left...

That would be fine if it wouldn't cause following problem; after death/respawn taken rifles aren't put back in the box, so, each rifle can be used 20 times...

Share this post


Link to post
Share on other sites

OFFTOPIC: How can I run second copy of my Arma2 to test 2 clients on dedicated server? It bans me though I set in server's config not to kick duplicates. Strange...

kickduplicate=0;

Share this post


Link to post
Share on other sites

OK, I've searched all around and I simply can't find what I'm looking for...

1. Ammo crates handled locally - can someone please explain it to me how to do this?

I'm working (for those who don't know) on ACE Evolution. So far I managed to fill up crate with all the stuff I want in it but I dunno how to make it handled locally... I found some code in Domination but I have no idea what to do with it?

2. I want to implement feature where artillery can be called only by artillery operator with radio in his inventory...

Please if someone could explain this to me, man I'm so stuck with this, I have no time to watch zilion of tutorials I'm working hard last 2 weeks trying to solve this problems...

I really want to recreate Evolution as similar to original in Arma 1 but with all the new stuff from ACE, without MHQs and teleporting, without ''T'' menu which interfferes with ACE keybinding anyways... (I would have it in action menu rather like in original). Man this mission used to be great but some folks IMO decided to screw it up with bunch of unneccessary stuff...

Please, explain this to me and I'll make one hell of a mission! Promise! :p

Share this post


Link to post
Share on other sites

Here's an updated script with all the ACE goodies. This will fill your ammo box with all the stuff from ACE (WEST only, I will make EAST and PLA sepparately). Enjoy! :D

You can find updated scripts below.

Edited by Minoza
typo

Share this post


Link to post
Share on other sites

OK, local ammo crates SOLVED!

Thanks to all bastards who knew how to do this and were too lazy to explain it to me but would rather direct me to erm... *go somewhere else... this is not topic for that*...

F*** you! Took me almost whole week to figure this out! But I did.

Share this post


Link to post
Share on other sites

Updated script again cause last ACE update made some changes. I've edited post above.

Share this post


Link to post
Share on other sites

So, here it is, as I promised, ammo fill scripts for all factions sepparatelly:

WEST:

//initialize unit
private ["_crate"];
_crate = _this select 0;

if(local _crate) then
{
//remove all weapons and magazines
clearWeaponCargo _crate;
clearMagazineCargo _crate;


  //weapons
    //west
      //rifles
        //m16
        _crate addWeaponCargo["M16A2",50];
        _crate addWeaponCargo["M16A2GL",50];
        _crate addWeaponCargo["ACE_M16A4_IRON",50];
        _crate addWeaponCargo["M16A4",50];
        _crate addWeaponCargo["M16A4_GL",50];
        _crate addWeaponCargo["M16A4_ACG",50];
        _crate addWeaponCargo["M16A4_ACG_GL",50];

        //m4
        _crate addWeaponCargo["M4A1",50];
        _crate addWeaponCargo["ACE_M4A1_GL",50];
        _crate addWeaponCargo["ACE_M4A1_GL_SD",50]; 
        _crate addWeaponCargo["M4A1_AIM",50];
        _crate addWeaponCargo["ACE_M4A1_AIM_SD",50];
        _crate addWeaponCargo["M4A1_AIM_CAMO",50];
        _crate addWeaponCargo["M4A1_AIM_SD_CAMO",50];
        _crate addWeaponCargo["ACE_M4A1_EOTECH",50];
        _crate addWeaponCargo["M4A1_HWS_GL",50];
        _crate addWeaponCargo["M4A1_HWS_GL_CAMO",50];
        _crate addWeaponCargo["M4A1_HWS_GL_SD_CAMO",50];
        _crate addWeaponCargo["ACE_M4A1_ACOG",50];
        _crate addWeaponCargo["ACE_M4A1_ACOG_SD",50];
        _crate addWeaponCargo["M4A1_RCO_GL",50];

        //m4socom
        _crate addWeaponCargo["ACE_SOC_M4A1_SD_9",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_AIM",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_AIM_SD",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_EOTECH",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_GL_AIMPOINT",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_RCO_GL",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_GL_13",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_GL_EOTECH",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_SHORTDOT",50];
        _crate addWeaponCargo["ACE_SOC_M4A1_SHORTDOT_SD",50];

        //other
        _crate addWeaponCargo["M8_CARBINE",50];
        _crate addWeaponCargo["M8_CARBINEGL",50];
        _crate addWeaponCargo["M8_COMPACT",50];
        _crate addWeaponCargo["G36A",50];
        _crate addWeaponCargo["G36K",50];
        _crate addWeaponCargo["G36C",50];
        _crate addWeaponCargo["G36_C_SD_EOTECH",50];
        _crate addWeaponCargo["ACE_HK416_D10",50];
        _crate addWeaponCargo["ACE_HK416_D10_SD",50];
        _crate addWeaponCargo["ACE_HK416_D14",50];
        _crate addWeaponCargo["ACE_HK416_D14_SD",50];

        //marksman rifles
        _crate addWeaponCargo["M4SPR",50];
        _crate addWeaponCargo["ACE_M4SPR_SD",50];
        _crate addWeaponCargo["M8_SHARPSHOOTER",50];
        _crate addWeaponCargo["ACE_M110",50];
        _crate addWeaponCargo["ACE_M110_SD",50];
        _crate addWeaponCargo["DMR",50];

        //sniper rifles
        _crate addWeaponCargo["M24",50];
        _crate addWeaponCargo["M40A3",50];
        _crate addWeaponCargo["ACE_TAC50",50];
        _crate addWeaponCargo["ACE_TAC50_SD",50];
        _crate addWeaponCargo["ACE_AS50",50];
        _crate addWeaponCargo["M107",50];
        _crate addWeaponCargo["ACE_M109",50];

        //machineguns
        _crate addWeaponCargo["M8_SAW",50];
        _crate addWeaponCargo["MG36",50];
        _crate addWeaponCargo["M249",50];
        _crate addWeaponCargo["ACE_M249PARA",50];
        _crate addWeaponCargo["ACE_M249PARA_M145",50];
        _crate addWeaponCargo["M240",50];
        _crate addWeaponCargo["ACE_M240G_M145",50];
        _crate addWeaponCargo["MK_48",50];
        _crate addWeaponCargo["ACE_M60",50];

        //submachineguns
        _crate addWeaponCargo["ACE_MP5A4",50];
        _crate addWeaponCargo["MP5A5",50];
        _crate addWeaponCargo["MP5SD",50];
        _crate addWeaponCargo["ACE_UMP45",50];
        _crate addWeaponCargo["ACE_UMP45_SD",50];

        //shotguns
        _crate addWeaponCargo["M1014",50];

        //pistols
        _crate addWeaponCargo["COLT1911",50];
        _crate addWeaponCargo["M9",50];
        _crate addWeaponCargo["M9SD",50];
        _crate addWeaponCargo["ACE_P226",50];
        _crate addWeaponCargo["ACE_USP",50];
        _crate addWeaponCargo["ACE_USPSD",50];
        _crate addWeaponCargo["ACE_GLOCK17",50];
        _crate addWeaponCargo["ACE_GLOCK18",50];
        _crate addWeaponCargo["ACE_FLAREGUN",50];

        //launchers
        _crate addWeaponCargo["ACE_M79",50];
        _crate addWeaponCargo["ACE_M79_CQB",50];
        _crate addWeaponCargo["ACE_M32",50];
        _crate addWeaponCargo["M136",50];
        _crate addWeaponCargo["ACE_M136_CSRS",50];
        _crate addWeaponCargo["SMAW",50];
        _crate addWeaponCargo["JAVELIN",50];
        _crate addWeaponCargo["STINGER",50];

        //crew-served
        _crate addWeaponCargo["ACE_M2HBPROXY",50];
        _crate addWeaponCargo["ACE_MK19MOD3PROXY",50];
        _crate addWeaponCargo["ACE_M3TRIPODPROXY",50];


  //magazines
    //west
      //rifles
      _crate addMagazineCargo["30RND_556X45_STANAG",50];
      _crate addMagazineCargo["ACE_30RND_556X45_T_STANAG",50];
      _crate addMagazineCargo["30RND_556X45_STANAGSD",50];
      _crate addMagazineCargo["30RND_556X45_G36",50];
      _crate addMagazineCargo["30RND_556X45_G36SD",50];

      //under-barrel grenade launchers
      _crate addMagazineCargo["1RND_HE_M203",50];
      _crate addMagazineCargo["ACE_1RND_CS_M203",50];
      _crate addMagazineCargo["ACE_HUNTIR_M203",50];
      _crate addMagazineCargo["FLAREWHITE_M203",50];
      _crate addMagazineCargo["FLAREGREEN_M203",50];
      _crate addMagazineCargo["FLARERED_M203",50];
      _crate addMagazineCargo["FLAREYELLOW_M203",50];
      _crate addMagazineCargo["ACE_SSWHITE_M203",50];
      _crate addMagazineCargo["ACE_SSGREEN_M203",50];
      _crate addMagazineCargo["ACE_SSRED_M203",50];
      _crate addMagazineCargo["ACE_SSYELLOW_M203",50];
      _crate addMagazineCargo["1RND_SMOKE_M203",50];
      _crate addMagazineCargo["1RND_SMOKEGREEN_M203",50];
      _crate addMagazineCargo["1RND_SMOKERED_M203",50];
      _crate addMagazineCargo["1RND_SMOKEYELLOW_M203",50];

      //marksman rifles
      _crate addMagazineCargo["20RND_556X45_STANAG",50];
      _crate addMagazineCargo["20RND_762X51_DMR",50];
      _crate addMagazineCargo["ACE_20RND_762X51_SB_M110",50];
      _crate addMagazineCargo["ACE_20RND_762X51_S_M110",50];
      _crate addMagazineCargo["ACE_20RND_762X51_T_M110",50];


      //sniper rifles
      _crate addMagazineCargo["5RND_762X51_M24",50];
      _crate addMagazineCargo["ACE_5RND_127X99_B_TAC50",50];
      _crate addMagazineCargo["ACE_5RND_127X99_S_TAC50",50];
      _crate addMagazineCargo["ACE_5RND_127X99_T_TAC50",50];
      _crate addMagazineCargo["10RND_127X99_M107",50];
      _crate addMagazineCargo["ACE_5RND_25X59_HEDP_BARRETT",50];

      //machineguns
      _crate addMagazineCargo["100RND_556X45_BETACMAG",50];
      _crate addMagazineCargo["200RND_556X45_M249",50];
      _crate addMagazineCargo["ACE_200RND_556X45_T_M249",50];
      _crate addMagazineCargo["100RND_762X51_M240",50];

      //submachineguns
      _crate addMagazineCargo["30RND_9X19_MP5",50];
      _crate addMagazineCargo["30RND_9X19_MP5SD",50];
      _crate addMagazineCargo["ACE_25RND_1143X23_B_UMP45",50];

      //shotguns
      _crate addMagazineCargo["8RND_B_BENELI_74SLUG",50];
      _crate addMagazineCargo["ACE_8RND_12GA_SLUG",50];
      _crate addMagazineCargo["ACE_8RND_12GA_BUCK00",50];

      //pistols
      _crate addMagazineCargo["7RND_45ACP_1911",50];
      _crate addMagazineCargo["15RND_9X19_M9",50];
      _crate addMagazineCargo["15RND_9X19_M9SD",50];
      _crate addMagazineCargo["ACE_15Rnd_9x19_USP",50];
      _crate addMagazineCargo["ACE_15RND_9X19_USPSD",50];
      _crate addMagazineCargo["ACE_17RND_9X19_G17",50];
      _crate addMagazineCargo["ACE_33RND_9X19_G18",50];

      //launchers
      _crate addMagazineCargo["ACE_40MM_BUCK_M79",50];
      _crate addMagazineCargo["ACE_6RND_40MM_M32",50];
      _crate addMagazineCargo["ACE_6RND_CS_M32",50];
      _crate addMagazineCargo["SMAW_HEAA",50];
      _crate addMagazineCargo["SMAW_HEDP",50];
      _crate addMagazineCargo["ACE_SMAW_SPOTTING",50];
      _crate addMagazineCargo["JAVELIN",50];
      _crate addMagazineCargo["STINGER",50];

      //crew-served
      _crate addMagazineCargo["ACE_M2_CSWDM",50];
      _crate addMagazineCargo["ACE_MK19_CSWDM",50];


  //ordnance
    //west
      //grenades
      _crate addMagazineCargo["HANDGRENADE_WEST",50];
      _crate addMagazineCargo["SMOKESHELL",50];
      _crate addMagazineCargo["SMOKESHELLGREEN",50];
      _crate addMagazineCargo["SMOKESHELLRED",50];
      _crate addMagazineCargo["SMOKESHELLYELLOW",50];
      _crate addMagazineCargo["SMOKESHELLPURPLE",50];
      _crate addMagazineCargo["SMOKESHELLBLUE",50];
      _crate addMagazineCargo["SMOKESHELLORANGE",50];
      _crate addMagazineCargo["ACE_M7A3",50];
      _crate addMagazineCargo["ACE_M84",50];
      _crate addMagazineCargo["ACE_M34",50];

      //mines
      _crate addMagazineCargo["MINE",50];
      _crate addMagazineCargo["PIPEBOMB",50];
      _crate addMagazineCargo["ACE_C4_M",50];
      _crate addMagazineCargo["ACE_BBETTY_M",50];
      _crate addMagazineCargo["ACE_CLAYMORE_M",50];
      _crate addMagazineCargo["ACE_M2SLAM_M",50];
      _crate addMagazineCargo["ACE_M4SLAM_M",50];
      _crate addMagazineCargo["ACE_TRIPFLARE_M",50];
      _crate addMagazineCargo["ACE_M86PDM",50];


  //goggles|masks
    //west
    _crate addWeaponCargo["ACE_GLASSESSPECTACLES",50];
    _crate addWeaponCargo["ACE_GLASSESROUNDGLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESSUNGLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESBLACKSUN",50];
    _crate addWeaponCargo["ACE_GLASSESBLUESUN",50];
    _crate addWeaponCargo["ACE_GLASSESREDSUN",50];
    _crate addWeaponCargo["ACE_GLASSESGREENSUN",50];
    _crate addWeaponCargo["ACE_GLASSESLHD_GLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESTACTICAL",50];
    _crate addWeaponCargo["ACE_EARPLUGS",50];
    _crate addWeaponCargo["ACE_GLASSESGASMASK_US",50];
    _crate addWeaponCargo["ACE_GLASSESBALAKLAVA",50];


  //tools
    //weapons
    _crate addWeaponCargo["BINOCULAR",50];
    _crate addWeaponCargo["NVGOGGLES",50];
    _crate addWeaponCargo["LASERDESIGNATOR",50];
    _crate addWeaponCargo["ACE_RANGEFINDER_OD",50];
    _crate addWeaponCargo["ACE_SPOTTINGSCOPE",50];
    _crate addWeaponCargo["ACE_KESTREL4500",50];
    _crate addWeaponCargo["ACE_HUNTIR_MONITOR",50];
    _crate addWeaponCargo["ACE_WIRECUTTER",50];
    _crate addWeaponCargo["ACE_PARACHUTEPACK",50];
    _crate addWeaponCargo["ACE_PARACHUTEROUNDPACK",50];

    //magazines
    _crate addMagazineCargo["LASERBATTERIES",50];
    _crate addMagazineCargo["ACE_BATTERY_RANGEFINDER",50];
    _crate addMagazineCargo["ACE_IRSTROBE",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_W",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_R",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_Y",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_G",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_B",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_IR",50];
    _crate addMagazineCargo["ACE_SANDBAG_MAGAZINE",50];
};

EAST:

//initialize unit
private ["_crate"];
_crate = _this select 0;

if(local _crate) then
{
//remove all weapons and magazines
clearWeaponCargo _crate;
clearMagazineCargo _crate;


  //weapons
    //east
      //rifles
        //ak-47
        _crate addWeaponCargo["AK_47_M",50];
        _crate addWeaponCargo["AK_47_S",50];
        _crate addWeaponCargo["AKS_GOLD",50];

        //ak-74
        _crate addWeaponCargo["AK_74",50];
        _crate addWeaponCargo["AK_74_GL",50];
        _crate addWeaponCargo["AKS_74_KOBRA",50];
        _crate addWeaponCargo["AKS_74_PSO",50];
        _crate addWeaponCargo["AKS_74_U",50];
        _crate addWeaponCargo["AKS_74_UN_KOBRA",50];

        //ak-107
        _crate addWeaponCargo["AK_107_KOBRA",50];
        _crate addWeaponCargo["AK_107_GL_KOBRA",50];
        _crate addWeaponCargo["AK_107_PSO",50];
        _crate addWeaponCargo["AK_107_GL_PSO",50];

        //groza
        _crate addWeaponCargo["ACE_OC14",50];
        _crate addWeaponCargo["ACE_OC14SP",50];
        _crate addWeaponCargo["ACE_OC14GL",50];
        _crate addWeaponCargo["ACE_OC14GLSP",50];
        _crate addWeaponCargo["ACE_OC14SD",50];
        _crate addWeaponCargo["ACE_OC14SDSP",50];
        _crate addWeaponCargo["ACE_GR1",50];
        _crate addWeaponCargo["ACE_GR1SP",50];
        _crate addWeaponCargo["ACE_GR1SD",50];
        _crate addWeaponCargo["ACE_GR1SDSP",50];

        //other
        _crate addWeaponCargo["ACE_SKS",50];
        _crate addWeaponCargo["ACE_SA58",50];
        _crate addWeaponCargo["ACE_FAL_PARA",50];

        //sniper rifles
        _crate addWeaponCargo["HUNTINGRIFLE",50];
        _crate addWeaponCargo["VSS_VINTOREZ",50];
        _crate addWeaponCargo["SVD",50];
        _crate addWeaponCargo["SVD_CAMO",50];
        _crate addWeaponCargo["KSVK",50];

        //machineguns
        _crate addWeaponCargo["RPK_74",50];
        _crate addWeaponCargo["PK",50];
        _crate addWeaponCargo["PECHENEG",50];

        //submachineguns
        _crate addWeaponCargo["BIZON",50];
        _crate addWeaponCargo["BIZON_SILENCED",50];

        //shotguns
        _crate addWeaponCargo["SAIGA12K",50];

        //pistols
        _crate addWeaponCargo["ACE_TT",50];
        _crate addWeaponCargo["MAKAROV",50];
        _crate addWeaponCargo["MAKAROVSD",50];
        _crate addWeaponCargo["ACE_SCORPION",50];

        //launchers
        _crate addWeaponCargo["RPG7V",50];
        _crate addWeaponCargo["RPG18",50];
        _crate addWeaponCargo["ACE_RPG22",50];
        _crate addWeaponCargo["ACE_RPG27",50];
        _crate addWeaponCargo["ACE_RPG29",50];
        _crate addWeaponCargo["METISLAUNCHER",50];
        _crate addWeaponCargo["STRELA",50];
        _crate addWeaponCargo["IGLA",50];

        //crew-served
        _crate addWeaponCargo["ACE_DSHKMPROXY",50];
        _crate addWeaponCargo["ACE_KORDPROXY",50];
        _crate addWeaponCargo["ACE_AGS30PROXY",50];
        _crate addWeaponCargo["ACE_AGS30TRIPODPROXY",50];
        _crate addWeaponCargo["ACE_KONKURSTRIPODPROXY",50];
        _crate addWeaponCargo["ACE_6T7TRIPODPROXY",50];


  //magazines
    //east
      //rifles
      _crate addMagazineCargo["30RND_762X39_AK47",50];
      _crate addMagazineCargo["ACE_30RND_762X39_SD_AK47",50];
      _crate addMagazineCargo["ACE_30RND_762X39_S_AK47",50];
      _crate addMagazineCargo["30RND_545X39_AK",50];
      _crate addMagazineCargo["30RND_545X39_AKSD",50];
      _crate addMagazineCargo["ACE_20RND_9X39_B_OC14",50];
      _crate addMagazineCargo["ACE_20RND_9X39_S_OC14",50];
      _crate addMagazineCargo["ACE_20RND_762X51_B_FAL",50];
      _crate addMagazineCargo["ACE_30RND_762X51_B_FAL",50];
      _crate addMagazineCargo["ACE_10RND_762X39_B_SKS",50];

      //under-barrel grenade launchers
      _crate addMagazineCargo["1RND_HE_GP25",50];
      _crate addMagazineCargo["ACE_1RND_CS_GP25",50];
      _crate addMagazineCargo["FLAREWHITE_GP25",50];
      _crate addMagazineCargo["FLAREGREEN_GP25",50];
      _crate addMagazineCargo["FLARERED_GP25",50];
      _crate addMagazineCargo["FLAREYELLOW_GP25",50];
      _crate addMagazineCargo["ACE_SSWHITE_GP25",50];
      _crate addMagazineCargo["ACE_SSGREEN_GP25",50];
      _crate addMagazineCargo["ACE_SSRED_GP25",50];
      _crate addMagazineCargo["ACE_SSYELLOW_GP25",50];
      _crate addMagazineCargo["1RND_SMOKE_GP25",50];
      _crate addMagazineCargo["1RND_SMOKEGREEN_GP25",50];
      _crate addMagazineCargo["1RND_SMOKERED_GP25",50];
      _crate addMagazineCargo["1RND_SMOKEYELLOW_GP25",50];

      //sniper rifles
      _crate addMagazineCargo["5X_22_LR_17_HMR",50];
      _crate addMagazineCargo["10RND_9X39_SP5_VSS",50];
      _crate addMagazineCargo["20RND_9X39_SP5_VSS",50];
      _crate addMagazineCargo["10RND_762X54_SVD",50];
      _crate addMagazineCargo["5RND_127X108_KSVK",50];

      //machineguns
      _crate addMagazineCargo["75RND_545X39_RPK",50];
      _crate addMagazineCargo["100RND_762X54_PK",50];

      //submachineguns
      _crate addMagazineCargo["64RND_9X19_BIZON",50];
      _crate addMagazineCargo["64RND_9X19_SD_BIZON",50];

      //shotguns
      _crate addMagazineCargo["8RND_B_SAIGA12_74SLUG",50];

      //pistols
      _crate addMagazineCargo["8RND_9X18_MAKAROV",50];
      _crate addMagazineCargo["8RND_9X18_MAKAROVSD",50];
      _crate addMagazineCargo["ACE_8RND_762X25_B_TOKAREV",50];
      _crate addMagazineCargo["ACE_20RND_765X17_VZ61",50];

      //launchers
      _crate addMagazineCargo["PG7V",50];
      _crate addMagazineCargo["PG7VL",50];
      _crate addMagazineCargo["PG7VR",50];
      _crate addMagazineCargo["OG7",50];
      _crate addMagazineCargo["ACE_RPG29_PG29",50];
      _crate addMagazineCargo["ACE_RPG29_TBG29",50];
      _crate addMagazineCargo["AT13",50];
      _crate addMagazineCargo["STRELA",50];
      _crate addMagazineCargo["IGLA",50];

      //crew-served
      _crate addMagazineCargo["ACE_DSHKM_CSWDM",50];
      _crate addMagazineCargo["ACE_KONKURS_CSWDM",50];
      _crte addMagazineCargo["ACE_KORD_CSWDM",50];
      _crate addMagazineCargo["ACE_AGS30_CSWDM",50];


  //ordnance
    //east
      //grenades
      _crate addMagazineCargo["SMOKESHELL",50];
      _crate addMagazineCargo["SMOKESHELLGREEN",50];
      _crate addMagazineCargo["SMOKESHELLRED",50];
      _crate addMagazineCargo["SMOKESHELLYELLOW",50];
      _crate addMagazineCargo["SMOKESHELLPURPLE",50];
      _crate addMagazineCargo["SMOKESHELLBLUE",50];
      _crate addMagazineCargo["SMOKESHELLORANGE",50];

      //mines
      _crate addMagazineCargo["MINEE",50];
      _crate addMagazineCargo["ACE_POMZ_M",50];


  //goggles|masks
    //west
    _crate addWeaponCargo["ACE_GLASSESSPECTACLES",50];
    _crate addWeaponCargo["ACE_GLASSESROUNDGLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESSUNGLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESBLACKSUN",50];
    _crate addWeaponCargo["ACE_GLASSESBLUESUN",50];
    _crate addWeaponCargo["ACE_GLASSESREDSUN",50];
    _crate addWeaponCargo["ACE_GLASSESGREENSUN",50];
    _crate addWeaponCargo["ACE_GLASSESLHD_GLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESTACTICAL",50];
    _crate addWeaponCargo["ACE_EARPLUGS",50];
    _crate addWeaponCargo["ACE_GLASSESGASMASK_RU",50];
    _crate addWeaponCargo["ACE_GLASSESBALAKLAVA",50];


  //tools
    //weapons
    _crate addWeaponCargo["BINOCULAR",50];
    _crate addWeaponCargo["NVGOGGLES",50];
    _crate addWeaponCargo["LASERDESIGNATOR",50];
    _crate addWeaponCargo["ACE_RANGEFINDER_OD",50];
    _crate addWeaponCargo["ACE_SPOTTINGSCOPE",50];
    _crate addWeaponCargo["ACE_KESTREL4500",50];
    _crate addWeaponCargo["ACE_HUNTIR_MONITOR",50];
    _crate addWeaponCargo["ACE_WIRECUTTER",50];
    _crate addWeaponCargo["ACE_PARACHUTEPACK",50];
    _crate addWeaponCargo["ACE_PARACHUTEROUNDPACK",50];

    //magazines
    _crate addMagazineCargo["LASERBATTERIES",50];
    _crate addMagazineCargo["ACE_BATTERY_RANGEFINDER",50];
    _crate addMagazineCargo["ACE_IRSTROBE",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_W",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_R",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_Y",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_G",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_B",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_IR",50];
    _crate addMagazineCargo["ACE_SANDBAG_MAGAZINE",50];
};

PLA:

//initialize unit
private ["_crate"];
_crate = _this select 0;

if(local _crate) then
{
//remove all weapons and magazines
clearWeaponCargo _crate;
clearMagazineCargo _crate;


  //weapons
    //pla
      //rifles
      _crate addWeaponCargo["QBZ95",50];
      _crate addWeaponCargo["QBZ95_GL",50];
      _crate addWeaponCargo["QBZ95_SD",50];
      _crate addWeaponCargo["QBZ95_SP",50];
      _crate addWeaponCargo["QBZ95_TI",50];
      _crate addWeaponCargo["QBZ03",50];
      _crate addWeaponCargo["QBZ03_SP",50];
      _crate addWeaponCargo["QBZ03_TI",50];
      _crate addWeaponCargo["QBZ81",50];

      //sniper rifles
      _crate addWeaponCargo["QBU88",50];
      _crate addWeaponCargo["M99",50];

      //machineguns
      _crate addWeaponCargo["QBB95",50];
      _crate addWeaponCargo["QJY88",50];

      //submachineguns
      _crate addWeaponCargo["QCQ05",50];

      //pistols
      _crate addWeaponCargo["QSZ92",50];
      _crate addWeaponCargo["QSZ92_LS",50];
      _crate addWeaponCargo["QSW06",50];

      //launchers
      _crate addWeaponCargo["PF89B",50];
      _crate addWeaponCargo["PF98",50];
      _crate addWeaponCargo["HN5B",50];


  //magazines
    //pla
      //rifles
      _crate addMagazineCargo["30RND_580X42_QBZ",50];
      _crate addMagazineCargo["30RND_580X42_QBZSD",50];
      _crate addMagazineCargo["30RND_762X39_T81",50];

      //under-barrel grenade launchers
      _crate addMagazineCargo["1RND_HE_QLG91",50];
      _crate addMagazineCargo["FLAREWHITE_QLG91",50];
      _crate addMagazineCargo["FLAREGREEN_QLG91",50];
      _crate addMagazineCargo["FLARERED_QLG91",50];
      _crate addMagazineCargo["FLAREYELLOW_QLG91",50];
      _crate addMagazineCargo["1RND_SMOKE_QLG91",50];
      _crate addMagazineCargo["1RND_SMOKEGREEN_QLG91",50];
      _crate addMagazineCargo["1RND_SMOKERED_QLG91",50];
      _crate addMagazineCargo["1RND_SMOKEYELLOW_QLG91",50];

      //sniper rifles
      _crate addMagazineCargo["10RND_580X42_QBU",50];
      _crate addMagazineCargo["5RND_127X108_M99",50];

      //machineguns
      _crate addMagazineCargo["75RND_580X42_QBB",50];
      _crate addMagazineCargo["200RND_580X42_QJY",50];

      //submachineguns
      _crate addMagazineCargo["50RND_580X21_QCQ",50];
      _crate addMagazineCargo["50RND_580X21_QCW",50];

      //pistols
      _crate addMagazineCargo["20RND_580X21_QSZ",50];
      _crate addMagazineCargo["20RND_580X21_QSW",50];

      //launchers
      _crate addMagazineCargo["PF89B_RKT",50];
      _crate addMagazineCargo["PF98HE_RKT",50];
      _crate addMagazineCargo["PF98HEAT_RKT",50];


  //ordnance
    //pla
      //grenades
      _crate addMagazineCargo["HANDGRENADE_PLA",50];
      _crate addMagazineCargo["SMOKESHELL",50];
      _crate addMagazineCargo["SMOKESHELLGREEN",50];
      _crate addMagazineCargo["SMOKESHELLRED",50];
      _crate addMagazineCargo["SMOKESHELLYELLOW",50];
      _crate addMagazineCargo["SMOKESHELLPURPLE",50];
      _crate addMagazineCargo["SMOKESHELLBLUE",50];
      _crate addMagazineCargo["SMOKESHELLORANGE",50];


  //goggles|masks
    //west
    _crate addWeaponCargo["ACE_GLASSESSPECTACLES",50];
    _crate addWeaponCargo["ACE_GLASSESROUNDGLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESSUNGLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESBLACKSUN",50];
    _crate addWeaponCargo["ACE_GLASSESBLUESUN",50];
    _crate addWeaponCargo["ACE_GLASSESREDSUN",50];
    _crate addWeaponCargo["ACE_GLASSESGREENSUN",50];
    _crate addWeaponCargo["ACE_GLASSESLHD_GLASSES",50];
    _crate addWeaponCargo["ACE_GLASSESTACTICAL",50];
    _crate addWeaponCargo["ACE_EARPLUGS",50];
    _crate addWeaponCargo["ACE_GLASSESGASMASK_US",50];
    _crate addWeaponCargo["ACE_GLASSESBALAKLAVA",50];


  //tools
    //weapons
    _crate addWeaponCargo["BINOCULAR",50];
    _crate addWeaponCargo["NVGOGGLES",50];
    _crate addWeaponCargo["LASERDESIGNATOR",50];
    _crate addWeaponCargo["ACE_RANGEFINDER_OD",50];
    _crate addWeaponCargo["ACE_SPOTTINGSCOPE",50];
    _crate addWeaponCargo["ACE_KESTREL4500",50];
    _crate addWeaponCargo["ACE_HUNTIR_MONITOR",50];
    _crate addWeaponCargo["ACE_WIRECUTTER",50];
    _crate addWeaponCargo["ACE_PARACHUTEPACK",50];
    _crate addWeaponCargo["ACE_PARACHUTEROUNDPACK",50];

    //magazines
    _crate addMagazineCargo["LASERBATTERIES",50];
    _crate addMagazineCargo["ACE_BATTERY_RANGEFINDER",50];
    _crate addMagazineCargo["ACE_IRSTROBE",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_W",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_R",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_Y",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_G",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_B",50];
    _crate addMagazineCargo["ACE_KNICKLICHT_IR",50];
    _crate addMagazineCargo["ACE_SANDBAG_MAGAZINE",50];
};

You can add "sleep time;" parameter if you want to delay re-execution of the script for some time.

Some of the stuff is shared between factions to maintain the balance. I will keep scripts updated.

Please let me know if I forgot anything.

Edited by Minoza

Share this post


Link to post
Share on other sites

Hey, Minoza how do I use that west ammo crtae for my mission? Thanks I'm having hard time with looking for an all ace crate.

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  

×