Jump to content
Sign in to follow this  
bodybag

Text to ammobox

Recommended Posts

Hi guys!

I'm making a guns'n'ammo box to one of my missions and wounder if anyone of you know how to add text to it. The idea was to seperate'em all with a line and text, like in A.C.E ammo boxes. This is the same type of sqs I use.. .

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; 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

_crate addweaponcargo ["M9",50]

_crate addweaponcargo ["M9SD",50]

_crate addweaponcargo ["M16A2",50]

_crate addweaponcargo ["M16A2GL",50]

_crate addweaponcargo ["M4",50]

_crate addweaponcargo ["M4A1SD",50]

_crate addweaponcargo ["M4GL",50]

_crate addweaponcargo ["M4A1",50]

_crate addweaponcargo ["M4A1GL",50]

_crate addweaponcargo ["M4AIM",50]

_crate addweaponcargo ["M4SPR",50]

_crate addweaponcargo ["G36a",50]

_crate addweaponcargo ["g36c",50]

_crate addweaponcargo ["g36k",50]

_crate addweaponcargo ["m24",50]

_crate addweaponcargo ["mp5A5",50]

_crate addweaponcargo ["MP5SD",50]

_crate addweaponcargo ["M240",50]

_crate addweaponcargo ["M249",50]

_crate addweaponcargo ["M107",50]

_crate addweaponcargo ["Stinger",50]

_crate addweaponcargo ["M136",50]

_crate addweaponcargo ["Laserdesignator",50]

_crate addweaponcargo ["Binocular",50]

_crate addweaponcargo ["NVGoggles",50]

_crate addmagazinecargo ["Handgrenade",10]

_crate addmagazinecargo ["Smokeshell",10]

_crate addmagazinecargo ["Smokeshellred",10]

_crate addmagazinecargo ["Smokeshellgreen",10]

_crate addmagazinecargo ["30Rnd_9x19_MP5",50]

_crate addmagazinecargo ["30Rnd_9x19_MP5SD",50]

_crate addmagazinecargo ["15Rnd_9x19_M9",50]

_crate addmagazinecargo ["15Rnd_9x19_M9SD",50]

_crate addmagazinecargo ["30Rnd_556x45_Stanag",50]

_crate addmagazinecargo ["30Rnd_556x45_G36",50]

_crate addmagazinecargo ["200Rnd_556x45_M249",50]

_crate addmagazinecargo ["5Rnd_762x51_M24",50]

_crate addmagazinecargo ["100Rnd_762x51_M240",50]

_crate addmagazinecargo ["FlareWhite_M203",50]

_crate addmagazinecargo ["FlareGreen_M203",50]

_crate addmagazinecargo ["FlareRed_M203",50]

_crate addmagazinecargo ["FlareYellow_M203",50]

_crate addmagazinecargo ["1Rnd_HE_M203",50]

_crate addmagazinecargo ["M136",20]

_crate addmagazinecargo ["Stinger",10]

_crate addmagazinecargo ["Pipebomb",10]

_crate addmagazinecargo ["Mine",10]

_crate addmagazinecargo ["Laserbatteries",10]

_crate addmagazinecargo ["10Rnd_127x99_M107",50]

Exit

Share this post


Link to post
Share on other sites

The way ACE dos it, from what I can gather, is by adding a DUMMY Weapon/Magazine class with the relevant name to seperate the weapons and ammo out. Ergo, without creating an addon to go along with your mission, I don't think you'll be able to get it to work. Here is the code ACE uses, it might help.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgVehicles

{

class AmmoBoxWest; // External class reference

class ACE_WeaponBox : AmmoBoxWest

{

scope = public;

accuracy = 1000;

displayName = "ACE Weapon Box";

class TransportMagazines

{

class _xx_ACE_Dummy_EQUIP  // THIS IS THE EQUIPMENT DEVIDOR

{

magazine = "ACE_Dummy_EQUIP";

count = 48;

};

};

};

And this is the code that defines the weapon itself:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class ACE_DUMMY_EQUIP : ACE_Dummy

{

displayName = "===== EQUIPMENT ====";

};

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  

×