Home   Help Search Login Register  

Author Topic: Fuel Tank CPP  (Read 1050 times)

0 Members and 1 Guest are viewing this topic.

JerryK_387

  • Guest
Fuel Tank CPP
« on: 22 Mar 2003, 04:18:23 »
Hey I need help... obviously. Ummm I am just messing around with O2 because I'm trying to learn how to make addons, and I've got a basic fuel tank that I want to bring in. It's just a cylinder that is up on its end, with basic dirt texture that took me 2 seconds to make... blah blah blah... and then I get to the .cpp and I can't even get it to show up in game. I have a .cpp thing made up but obviously I went wrong somewhere... also I want to know how to make it where you can drive up to it and refuel a vehicle. any help would be appreciated  :D :D

Code: [Select]

class CfgPatches
{
class tank
{
units[] = {tank};
weapons[] = {};
requiredVersion = 1.10;
};
};

class CfgVehicles
{
class All {};
class AllVehicles: All {};
class Land: AllVehicles {};
class Static : Land {};
class Building : Static {};
class NonStrategic : Building {};
class Fence : NonStrategic {};
class WireFence: Fence {};

class tank: WireFence
{
scope=public;

vehicleClass="objects";

side=TCivilian;

cost=1;

mapSize=1;

destrType=destructtree;

displayName="Tank";

model=\tank\tank;
};
};


major asshole

  • Guest
Re:Fuel Tank CPP
« Reply #1 on: 23 Mar 2003, 08:16:33 »

G'day

Do you mean one of the large fuel tanks?

I was thinking something more like this for your config

#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2


class CfgPatches
{
class FuelTank
{
units[]={FuelTank};
weapons[]={};
requiredVersion=1.3;
};
};

class CfgVehicles
{
class All {};
class Thing: All {};
class BarrelHelper: Thing {};
class BarrelBase: BarrelHelper {};

class FuelTank: BarrelBase
{
scope=2;
model="\tank\tank";
displayName="FuelTank";
vehicleClass="Objects";
transportFuel=100000;
destrType=DestructBuilding;
};
};

Hope this helps, I don't do this anymore so I'm kinda rusty

L8R