Jump to content
Sign in to follow this  
Guest

Cpp

Recommended Posts

Guest

OK IM WHIT STUPID

HELP ME PLEASE

SOMETHING IS WRONG WHIT GRENADE(MORTAIR) IN MY CPP

// M70AB2 -------P3D----- McHide [sV]  --www.Natosoldier.com  

// some basic defines

#define TEast 1

#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 M70AB2

{

units[] = {};

weapons[] = {M70AB2};

requiredVersion = 1.91;

};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class M70AB2: Riffle

{

displayName = M70AB2;

displayNameMagazine="M70AB2 Magazine";

shortNameMagazine="M70AB2 Magazine";

scopeWeapon = public;

scopeMagazine = public;

model="\M70AB2\M70AB2.p3d";

modelOptics="\data3d\optika_ak47.p3d";

picture="\dtaext\equip\w\w_ak47.paa"

optics = true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

modes[]={"Single","FullAuto"};

class Single

{

ammo="BulletSingleG";

multiplier=1;

burst=1;

displayName="M70AB2 Semi";

dispersion=0.000200;

sound[]={"Weapons\AK74Single",1.000000,1};

soundContinuous=0;

reloadTime=0.150000;

ffCount=1;

recoil="M70AB2single";

autoFire=0;

aiRateOfFire=5.000000;

aiRateOfFireDistance=500;

useAction=0;

useActionTitle="";

};

class FullAuto

{

ammo="BulletFullAutoG";

multiplier=1;

burst=1;

displayName="M70AB2 Auto";

dispersion=0.000800;

sound[]={"Weapons\AK74Full",1.000000,1};

soundContinuous=1;

reloadTime=0.100000;

ffCount=30;

recoil="M70AB2auto";

autoFire=6;

aiRateOfFire=5.000000;

aiRateOfFireDistance=300;

useAction=0;

useActionTitle="";

};

};

};

class MortarShell : Grenade // mortar soldier

{

hit=50;indirectHit=40;indirectHitRange=10;

minRange=45;minRangeProbab=0.50;

midRange=240;midRangeProbab=0.55;

maxRange=450;maxRangeProbab=0.00;

model=mortarShell;

//soundHit[]={Explosions\hellfire,db40,1};

soundHit[]={Explosions\expl4,db20,1};

cost=120;

};

class Mortar : GrenadeLauncher

{

//--

scopeWeapon = private;

scopeMagazine = public;

modelSpecial="M70AB2A2tromblon";

valueMagazine = 5;

// weaponType = WeaponSlotSecondary;

magazineType = 2 * WeaponSlotItem;

ammo=MortarShell;

displayName = $STR_DN_MORTAR_W;

displayNameMagazine = $STR_MN_MORTAR_W;

shortNameMagazine = $STR_SN_MORTAR_W;

count=1;

initSpeed=70;

reloadAction = ManActReloadMortar;

modes[] = {this, this};

// autoReload = false;

// primary=false;

}

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land:AllVehicles{};

class Man:Land{};

class Soldier:Man{};

class SoldierGB:Soldier{};

class M70AB2Soldier:SoldierGB

{

picture="ismg";

vehicleClass="Men";

scope=2;

cost=60000;

accuracy=2.500000;

displayName="[sV]M70AB2 soldier";

weaponSlots="1 + 16 + 4*256 + 2 + 4*32 + 4 + 2*4096";

weapons[]={"M70AB2","Binocular","Throw","Put"};

magazines[]={"M70AB2","M70AB2","M70AB2"};

threat[]={1,0.100000,1};

};

};

class CfgRecoils

{

    M70AB2single[]=

    {

    0.010,-0.027,0.090,

    0.060,-0.021,0.080,

    0.100,0.000,0.000

};

    M70AB2auto[]=

    {

  0.020,-0.037,0.065,

  0.050,-0.022,0.065,

    0.100,0.000,0.000

};

};    

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyM70AB2: ProxyWeapon {};

Share this post


Link to post
Share on other sites
Guest

well will somebody help me please sad_o.gif

Share this post


Link to post
Share on other sites

You have a mortarshell config mixed in with your cfgWeapons.

You need to make a cfgAmmo.

<edit>

Also your mortar weapon is outside your cfgWeapons.

You have you cfgWeapons closing after your fullauto setup, effectively leaving the mortar out completely.

Share this post


Link to post
Share on other sites
Guest

yup i knew but i dont know how, sory for bad english

my m70 gun works in game good whitout mortar cpp.

PLEASE HELP

Share this post


Link to post
Share on other sites
Guest

lol i put in game ,but...

there are mortairs in my slots of arnament but there is no action for put mortair on gun

// M70AB2 -------P3D----- McHide [sV] --www.Natosoldier.com

// some basic defines

#define TEast 1

#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 M70AB2

{

units[] = {M70AB2Soldier};

weapons[] = {M70AB2, M70AB2Mortar};

requiredVersion = 1.91};

};

};

class CfgModels

{

class Default{};

class Weapon: Default{};

class M70AB2: Weapon{};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class M70AB2: Riffle

{

displayName="M70AB2";

displayNameMagazine="M70AB2 Magazine";

shortNameMagazine="M70AB2 Magazine";

scopeWeapon = public;

scopeMagazine = public;

model="\M70AB2\M70AB2.p3d";

modelOptics="\data3d\optika_ak47.p3d";

picture="\dtaext\equip\w\w_ak47.paa";

optics=true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

modes[]={"Single","FullAuto"};

class Single

{

ammo="BulletSingleG";

multiplier=1;

burst=1;

displayName="M70AB2 Semi";

dispersion=0.000200;

sound[]={"Weapons\AK74Single",1.000000,1};

soundContinuous=0;

reloadTime=0.150000;

ffCount=1;

recoil="M70AB2single";

autoFire=0;

aiRateOfFire=5.000000;

aiRateOfFireDistance=500;

useAction=0;

useActionTitle="";

};

class FullAuto

{

ammo="BulletFullAutoG";

multiplier=1;

burst=1;

displayName="M70AB2 Auto";

dispersion=0.000800;

sound[]={"Weapons\AK74Full",1.000000,1};

soundContinuous=1;

reloadTime=0.100000;

ffCount=30;

recoil="M70AB2auto";

autoFire=6;

aiRateOfFire=5.000000;

aiRateOfFireDistance=300;

useAction=0;

useActionTitle="";

};

};

class GrenadeLauncher: Default {};

class Mortar: GrenadeLauncher {};

class M70AB2Mortar: Mortar

{

modelSpecial="M70AB2A2tromblon"

};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land:AllVehicles{};

class Man:Land{};

class Soldier:Man{};

class SoldierGB:Soldier{};

class M70AB2Soldier: SoldierGB

{

picture="ismg";

vehicleClass="Men";

scope=2;

cost=60000;

accuracy=4.500000;

displayName="[sV]M70AB2 soldier";

weaponSlots="1 + 16 + 4*256 + 2 + 4*32 + 4 + 2*4096";

weapons[]={"M70AB2","Binocular","Throw","Put"};

magazines[]={"M70AB2","M70AB2","M70AB2",Mortar,Mortar,Mortar};

threat[]={1,0.100000,1};

};

};

class CfgRecoils

{

M70AB2single[]=

{

0.010,-0.027,0.090,

0.060,-0.021,0.080,

0.100,0.000,0.000

};

M70AB2auto[]=

{

0.020,-0.037,0.065,

0.050,-0.022,0.065,

0.100,0.000,0.000

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyM70AB2: ProxyWeapon {};

};

sad_o.gif

Share this post


Link to post
Share on other sites

hehe, ok, I 'think' this might work.

class M70AB2: Riffle

{

displayName="M70AB2";

displayNameMagazine="M70AB2 Magazine";

shortNameMagazine="M70AB2 Magazine";

scopeWeapon = public;

scopeMagazine = public;

model="\M70AB2\M70AB2.p3d";

modelOptics="\data3d\optika_ak47.p3d";

picture="\dtaext\equip\w\w_ak47.paa";

optics=true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

modes[]={"Single","FullAuto"};

magazines[] = {M70AB2, M70AB2Mortar}; <- Add this line

......

Share this post


Link to post
Share on other sites
Guest

sad_o.gif

no if i add this nothing hapens

all is the same

Share this post


Link to post
Share on other sites
Guest

ok i found one cpp from my friend

plis look to this one and find me solution PLEASE

// M70AB2 -------P3D----- McHide [sV] --www.Natosoldier.com

// some basic defines

#define TEast 1

#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 M70AB2

{

units[] = {M70AB2Soldier};

weapons[] = {M70AB2, SV_M70mortar};

requiredVersion = 1.91};

};

};

class CfgModels

{

class Default{};

class Weapon: Default{};

class M70AB2: Weapon{};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class M70AB2: Riffle

{

displayName="M70AB2";

displayNameMagazine="M70AB2 Magazine";

shortNameMagazine="M70AB2 Magazine";

scopeWeapon = public;

scopeMagazine = public;

model="\M70AB2\M70AB2.p3d";

modelOptics="\data3d\optika_ak47.p3d";

picture="\dtaext\equip\w\w_ak47.paa";

optics=true;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

modes[]={"Single","FullAuto"};

magazines[] = {M70AB2, SV_M70mortar};

class Single

{

ammo="BulletSingleG";

multiplier=1;

burst=1;

displayName="M70AB2 Semi";

dispersion=0.000200;

sound[]={"Weapons\AK74Single",1.000000,1};

soundContinuous=0;

reloadTime=0.150000;

ffCount=1;

recoil="M70AB2single";

autoFire=0;

aiRateOfFire=5.000000;

aiRateOfFireDistance=500;

useAction=0;

useActionTitle="";

};

class FullAuto

{

ammo="BulletFullAutoG";

multiplier=1;

burst=1;

displayName="M70AB2 Auto";

dispersion=0.000800;

sound[]={"Weapons\AK74Full",1.000000,1};

soundContinuous=1;

reloadTime=0.100000;

ffCount=30;

recoil="M70AB2auto";

autoFire=6;

aiRateOfFire=5.000000;

aiRateOfFireDistance=300;

useAction=0;

useActionTitle="";

};

};

class GrenadeLauncher : Default{};

class SV_M70Mortar : GrenadeLauncher //weapon

{

scopeWeapon=0; scopeMagazine=2;

modelSpecial="M70AB2A2tromblon";

valueMagazine=5;

magazineType="2 * 256";

ammo="SV_M70mortar";

displayName="SV_M70mortar";

displayNameMagazine="SV_M70mortar";

shortNameMagazine="SV_M70mortar";

count=1;

initSpeed=70;

reloadAction=manactreloadmortar;

modes[]={"this","this"};

};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land:AllVehicles{};

class Man:Land{};

class Soldier:Man{};

class SoldierGB:Soldier{};

class M70AB2Soldier: SoldierGB

{

picture="ismg";

vehicleClass="Men";

scope=2;

cost=60000;

accuracy=4.500000;

displayName="[sV]M70AB2 soldier";

weaponSlots="1 + 16 + 4*256 + 2 + 4*32 + 4 + 2*4096";

weapons[]={"M70AB2","Binocular","Throw","Put"};

magazines[]={"M70AB2","M70AB2","M70AB2","SV_M70mortar","S

V_M70mortar","SV_M70mortar"};

threat[]={1,0.100000,1};

};

};

class CfgRecoils

{

M70AB2single[]=

{

0.010,-0.027,0.090,

0.060,-0.021,0.080,

0.100,0.000,0.000

};

M70AB2auto[]=

{

0.020,-0.037,0.065,

0.050,-0.022,0.065,

0.100,0.000,0.000

};

};

class CfgAmmo

{

class Grenade : Default{};

class SV_MortarShell : Grenade //ammo

{

hit=45;

indirectHit=30;

indirectHitRange=8;

minRange=45; minRangeProbab=0.500000;

midRange=240;midRangeProbab=0.550000;

maxRange=450;maxRangeProbab=0.000000;

model="mortarShell";

soundHit[]={"Explosions\expl4",10.000000,1};

cost=120;

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyM70AB2: ProxyWeapon {};

/* manactreloadmortar

class Default{};

class GrenadeLauncher : Default{};

class Mortar : GrenadeLauncher //weapon

{

scopeWeapon=0;

scopeMagazine=2;

modelSpecial="m16_mortar_proxy";

valueMagazine=5;

magazineType="2 * 256";

ammo="MortarShell";

displayName="$STR_DN_MORTAR_W";

displayNameMagazine="$STR_MN_MORTAR_W";

shortNameMagazine="$STR_SN_MORTAR_W";

count=1;

initSpeed=70;

reloadAction=manactreloadmortar;

modes[]={"this","this"};

};

class Default{};

class Grenade : Default{};

class MortarShell : Grenade //ammo

{

hit=50;

indirectHit=40;

indirectHitRange=10;

minRange=45;

minRangeProbab=0.500000;

midRange=240;

midRangeProbab=0.550000;

maxRange=450;

maxRangeProbab=0.000000;

model="mortarShell";

soundHit[]={"Explosions\expl4",10.000000,1};

cost=120;

};

};

Share this post


Link to post
Share on other sites
Guest

anyway i think u trie to help me the only one from the big ..................... comunity of OPF

so i say is there anyone else smarter than us two?rock.gif?rock.gif?

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  

×