Jump to content
Sign in to follow this  
clawhammer

Help by writing my config.cpp for my first addon

Recommended Posts

Hello together

Iam working on my first arma addon (An Ammochest).

Now iam at the Part to write a config.cpp.

How do i write such a file?

Thanks for help yay.gif

mfg

Clawhammer

Share this post


Link to post
Share on other sites
Quote[/b] ]search for Brsseb tutorials

it's for ofp and won't be that helpfull frankly speaking

if you're going make a weapon - search for SLX weapon example

Share this post


Link to post
Share on other sites

here is an Example: You can PBO it up and itll work

config.cpp

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define true 1

#define false 0

#define private 0

#define protected 1

#define public 2

class CfgPatches

{

class MyAddOn

{

units[] = {MyAddOn_WeaponBox};

weapons[] = {};

requiredVersion = 1.00;

};

};

class CfgVehicleClasses

{

class MyAddOn_box

{

displayName = "MyAddOn Weapons Crate";

};

};

class CfgVehicles

{

// Base Classes

class WeaponBoxWest; // External class reference

// WeaponBox

class MyAddOn_WeaponBox: WeaponBoxWest

{

vehicleClass = "MyAddOn_box";

model = "\MyAddOn_ammoBox\ABox.p3d";

displayName = "MyAddOn WeaponsCrate";

// Magazines/Ammo are below this line //////////////////////////

class TransportMagazines

{

class _xx_30Rnd_556x45_Stanag {magazine = "30Rnd_556x45_Stanag";count = 50;};

class _xx_30Rnd_556x45_StanagSD {magazine = "30Rnd_556x45_StanagSD";count = 50;};

class _xx_200Rnd_556x45_M249 {magazine = "200Rnd_556x45_M249";count = 20;};

class _xx_100Rnd_762x51_M240 {magazine = "100Rnd_762x51_M240";count = 20;};

class _xx_5Rnd_762x51_M24 {magazine = "5Rnd_762x51_M24";count = 20;};

class _xx_30Rnd_9x19_MP5SD {magazine = "30Rnd_9x19_MP5SD";count = 50;};

class _xx_10Rnd_127x99_M107 {magazine = "10Rnd_127x99_M107";count = 20;};

class _xx_PipeBomb {magazine = "PipeBomb";count = 10;};

class _xx_M136 {magazine = M136;count = 10;};

class _xx_1rnd_HE_M203 {magazine = "1rnd_HE_M203";count = 20;};

class _xx_FlareWhite_M203 {magazine = "FlareWhite_M203";count = 10;};

class _xx_FlareRed_M203 {magazine = "FlareRed_M203";count = 10;};

class _xx_FlareGreen_M203 {magazine = "FlareGreen_M203";count = 10;};

class _xx_FlareYellow_M203 {magazine = "FlareYellow_M203";count = 10;};

class _xx_Stinger {magazine = "Stinger";count = 2;};

class _xx_Javelin {magazine = "Javelin";count = 2;};

class _xx_Laserbatteries {magazine = "Laserbatteries";count = 5;};

};

// Weapons are below this line /////////////////////////////////////////

class TransportWeapons

{

class _xx_M4A1SD {weapon = M4A1SD;count = 1;};

class _xx_M4A1 {weapon = M4A1;count = 1;};

class _xx_M107 {weapon = M107;count = 1;};

class _xx_M16A2 {weapon = M16A2;count = 1;};

class _xx_Laserdesignator {weapon = Laserdesignator;count = 5;};

class _xx_Javelin {weapon = Javelin;count = 1;};

class _xx_M136 {weapon = M136;count = 2;};

class _xx_NVGoggles {weapon = NVGoggles;count = 5;};

class _xx_Binocular {weapon = Binocular;count = 5;};

class _xx_Stinger {weapon = Stinger;count = 1;};

};

};

};

Pretty self-explanatory, if you have questions and Ill answer them..

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  

×