Home   Help Search Login Register  

Author Topic: cpp help needed  (Read 896 times)

0 Members and 1 Guest are viewing this topic.

gundam007

  • Guest
cpp help needed
« on: 07 Aug 2003, 05:51:59 »
For my gang people I am making, I am having a problem with the config file. It says /cfgModels/CfgVehicles { encountered instead of =
?
Code: [Select]
// some basic defines
#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

#define WeaponNoSlot            0// dummy weapons
#define WeaponSlotPrimary      1// primary weapons
#define WeaponSlotSecondary   16// secondary weapons
#define WeaponSlotItem         256// items
#define WeaponSlotBinocular   4096// binocular
#define WeaponHardMounted      65536


class CfgPatches
{       class gangsta
   {
      units[] = {gangsta};
      weapons[] = {};
      requiredVersion = 1.75;
   };
        class ganglock
        {
   units[] = {};
   weapons[] = {ganglock};
   requiredVersion = 1.75;
        };
};
class CfgModels
{
   class Default{};
   // some generic model requirements
   class Head: Default
   {
      sections[] =
      {
         "osobnost",
         "brejle"
      };
   };
   class Man: Default
   {
      sections[] =
      {
         "head injury","body injury",
         "l arm injury","r arm injury","p arm injury",
         "l leg injury","r leg injury","p leg injury",
         "medic",
         "hlava",
         "krk",
         "zasleh"
      };
      sectionsInherit=Head;
   };
   class gangsta: Man {};

        class Weapon: Default{};
   class ganglock: Weapon{};
class CfgAmmo
{
   class Default {};
   class BulletSingle : Default{};
   class ganglockAmmo: BulletSingle
   {
      access=2;
      hit=6;
      indirectHit=1;
      indirectHitRange=0.050000;
      visibleFire=14;
      audibleFire=14;
      visibleFireTime=2;
      minRange=1;
      minRangeProbab=0.100000;
      midRange=10;
      midRangeProbab=0.500000;
      maxRange=70;
      maxRangeProbab=0.001000;
      cartridge="FxCartridgeSmall";
      tracerColor[]={0.800000,0.500000,0.100000,0.040000};
      tracerColorR[]={0,0,0,0.005000};
   };
};


class CfgWeapons
{
   class Default {};
   class MGun: Default {};
   class Riffle: MGun {};
   class HandGunBase: Riffle {};
   class ganglock: HandGunBase
   {
      access=2;
      scopeWeapon=0;
      scopeMagazine=0;
      weaponType=2;
      magazineType=32;
      model="\gang\glock.p3d";
      modelOptics="\gang\glockhand";
      picture="\gang\glock19.paa";
      optics=1;
      opticsZoomMin=0.350000;
      opticsZoomMax=0.350000;
      distanceZoomMin=150;
      distanceZoomMax=200;
      displayName="Gangsta Glock 19";
      displayNameMagazine="Gangsta Glock Mag";
      shortNameMagazine="G19 Mag";
      count=15;
      reloadTime=0.130000;
      magazineReloadTime=1;
      reloadMagazineSound[]={"\gang\reload.wav",1,1.000000};
      drySound[]={"weapons\M16dry",1,1};
      magazines[]={"ganglockmag"};
      modes[]={"Single"};
      class Single
      {
         ammo="ganglockAmmo";
         multiplier=1;
         burst=1;
         displayName="Gangsta Glock";
         dispersion=0.002000;
         sound[]={"\gang\glock.wav",1,1.000000};
         soundContinuous=0;
         reloadTime=0.200000;
         ffCount=1;
         recoil="riffleSilenced";
         autoFire=0;
         aiRateOfFire=0.500000;
         aiRateOfFireDistance=50;
         useAction=0;
         useActionTitle="";
      };
   };
   
};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ganglock : ProxyWeapon {};
};

class CfgVehicles
{
   class All{};
   class AllVehicles:All{};
   class Land:AllVehicles{};
   class Man:Land{};
   class Soldier:Man{};
   class SoldierEB:Soldier{};
   
class gangsta:SoldierEB{};
   {

      displayName="Gangsta";
      weapons[]={ganglock};
      magazines[]={ganglockmag,ganglockmag,ganglockmag,ganglockmag};
      model="\gang\homie.p3d";
      wounds[]={"\gang\homie.paa","\gang\homie-d.paa"};

   };
};
« Last Edit: 07 Aug 2003, 07:35:13 by gundam007 »

MJHergenroder

  • Guest
Re:cpp help needed
« Reply #1 on: 07 Aug 2003, 15:32:37 »
remove the parenthesis and semicolon directly folowing SoldierEB under the Vehicles section.  What you basically have now is:

class gangsta:SoldierEB {};{attributes...}; which doesn't make any sense.  What you want is:

class gangsta:SoldierEB{attributes};

the parenthesis aren't really attached to SoldierEB, they are for sectioning off the attributes def's in gangsta.

gundam007

  • Guest
Re:cpp help needed
« Reply #2 on: 07 Aug 2003, 18:11:12 »
Thanks so much.  Now, I am having a new problem. My textures on the guy are just showing up as white. And the muzzleflash stays on all the time! I defined zasleh and zbran in o2               ??? :-[  :-\ :'(
« Last Edit: 07 Aug 2003, 18:31:21 by gundam007 »

blue_thud

  • Guest
Re:cpp help needed
« Reply #3 on: 09 Aug 2003, 17:38:06 »
Your texture paths for your addon are probably wrong. You want to have them in same folder as your .p3d then texture with them.