PDA

View Full Version : What is wrong with my cpp?



max
Nov 4 2002, 19:43
Go easy on me, it's my first attempt at making one http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wink.gif

// 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 SoldierWAK5BSD
{
units[] = {SoldierWAK5BSD};
weapons[] = {AK5BSD};
requiredVersion = 1.75;
};

};

class CfgAmmo
{
class Default{};
class BulletSingle: Default{};
class BulletSingleW: BulletSingle{};
class BulletSilencedSingleW: BulletSingleW
{
indirectHitRange=0.100000;
visibleFire=0.055000;
audibleFire=0.055000;
visibleFireTime=2;
tracerColor[]={0,0,0,0.005000};
tracerColorR[]={0,0,0,0.005000};
};

class BulletBurst: BulletSingle{};
class BulletFullAuto: BulletBurst{};
class BulletFullAutoW: BulletFullAuto{};
class BulletSilencedFullAutoW: BulletFullAutoW
{
indirectHitRange=0.100000;
visibleFire=0.070000;
audibleFire=0.070000;
visibleFireTime=3;
tracerColor[]={0,0,0,0.005000};
tracerColorR[]={0,0,0,0.005000};
};
};


class CfgWeapons
{
class Default {};
class MGun : Default {};
class Riffle: MGun {};
class M16 : Riffle {};
class AK5BSD: M16
{
scopeWeapon=2;
scopeMagazine=2;
model="\AK5BSD\AK5BLJ.p3d";
modelOptics="optika_snpierw";
picture="\AK5BSD\weapics\w_AK5b.paa";
optics=1;
opticsZoomMin=0.050000;
opticsZoomMax=0.200000;
displayName="AK5B SD";
displayNameMagazine="AK5Bmag";
shortNameMagazine="AK5Bmag";
drySound[]={"weapons\M16dry",0.010000,1};
magazines[]={"AK5Bmag"};
count=20;
reloadMagazineSound[]={"\AK5BSD\sound\AK5_reload.wav",1.000000,1};
modes[]={"Single","Fullauto"};
class Single
{
ammo="BulletSingleW";
multiplier=1;
burst=1;
displayName="AK5B SD Semi";
dispersion=0.000200;
sound[]={"\AK5BSD\sound\AK5_sd.wav",1.000000,1};
soundContinuous=0;
reloadTime=0.150000;
ffCount=1;
recoil="riffleSingle";
autoFire=0;
aiRateOfFire=5.000000;
aiRateOfFireDistance=500;
useAction=0;
useActionTitle="";
};
class FullAuto
{
ammo="BulletFullAutoW";
multiplier=1;
burst=1;
displayName="AK5B SD Auto";
dispersion=0.000400;
sound[]={"\AK5BSD\sound\AK5_sd.wav",1.000000,1};
soundContinuous=0;
reloadTime=0.100000;
ffCount=100;
recoil="riffleBurst3";
autoFire=1;
aiRateOfFire=5.000000;
aiRateOfFireDistance=500;
useAction=0;
useActionTitle="";
};

};


///Magazine definitions;
class AK5Bmag: AK5BSD
{
displayNameMagazine = AK5Bmag;
shortNameMagazine = AK5Bmag;
picture="\AK5BSD\weapics\m_Ak5.paa";
count=30;
scopeWeapon=0;
scopeMagazine=2;
};

};

class CfgVehicles
{
class All {};
class AllVehicles:All{};
class Land:AllVehicles{};
class Man:Land{};
class Soldier:Man{};
class SoldierWB:Soldier{};
class SoldierWAK5BLJ: SoldierWB
{
model="mc vojakw2.p3d";
displayName="Soldier AK5B (Suppressed)";
weapons[]={"AK5BSD","Binocular","NVGoggles","Throw","Pu
t"};
magazines[]={AK5Bmag,AK5Bmag,AK5Bmag,AK5Bmag,AK5Bmag,AK5Bmag,HandGrenade,HandGrenade,HandGrenade,Smoke
Shell};
};
};

class CfgNonAIVehicles
{
class ProxyWeapon {};
class ProxySoldierWAK5BSD: ProxyWeapon
{
autocenter=0;
scope=2;
reversed=0;
simulation="ProxyWeapon";
model="\AK5BSD\AK5BLJ.p3d";
};
};

max
Nov 5 2002, 13:21
Anyone?

stoppelhopser
Nov 8 2002, 09:50
you should post the problem that is caused! maybe that helps finding out whether the config is buggy or not.

stoppelhopser
Nov 8 2002, 09:55
if found something:
in CfgVehicles you coded:
model="mc vojakw2.p3d";
try:
model="[YourAddonName]\mc vojakw2"
that is
model="SoldierWAK5BSD\mc vojakw2"

Nov 8 2002, 13:10
Moving to Addon Config & Scripting http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif

max
Nov 8 2002, 13:13
Oops, forgot to post the problem http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif
The problem I am having is that I can't aim the weapon.
And when I go into "scope-mode" I begin to spin around very fast. Any ideas?

chris330
Dec 24 2002, 18:19
I notice that your scope model is something like:
"optika_snpier"
instead of:
"optika_sniper"

That may be your problem. Please message me or reply to this thread as my SA80 addon (releasing very soon) has exactly the same problem. http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wow.gif

Soul_Assassin
Dec 24 2002, 20:51
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (chris330 @<hidden> Dec. 24 2002,20:19)</td></tr><tr><td id="QUOTE">I notice that your scope model is something like:
"optika_snpier"
instead of:
"optika_sniper"

That may be your problem. Please message me or reply to this thread as my SA80 addon (releasing very soon) has exactly the same problem.  http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wow.gif[/QUOTE]<span id='postcolor'>
LOL http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/tounge.gif

CrunchyFrog
Dec 27 2002, 18:21
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (max @<hidden> Nov. 08 2002,15:13)</td></tr><tr><td id="QUOTE">Oops, forgot to post the problem http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif
The problem I am having is that I can&#39;t aim the weapon.
And when I go into "scope-mode" I begin to spin around very fast. Any ideas?[/QUOTE]<span id='postcolor'>
Your .P3D file is corrupt

Maslow
Dec 27 2002, 19:59
just a lill question froggy......... is it hitler dancing around in your avatar http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif???

drewb99
Dec 28 2002, 00:21
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (max @<hidden> Nov. 08 2002,15:13)</td></tr><tr><td id="QUOTE">Oops, forgot to post the problem http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif
The problem I am having is that I can&#39;t aim the weapon.
And when I go into "scope-mode" I begin to spin around very fast. Any ideas?[/QUOTE]<span id='postcolor'>
Your model needs a memory LOD with appropriate vertices.

chris330
Dec 28 2002, 01:11
My scope still spins round like a looney, but I have all the right vertices in place in the Memory LOD. I noticed that flipper has a View Pilot LOD in his addons, is this required to stop the scope going mental? http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif