Jump to content
Sign in to follow this  
Guest

Some cpp script problem

Recommended Posts

Guest

ok i have a problem im building Mg     M72b1 and i want to use it whit 2 models.One is model closed bipod and one is model whit open bipod.

its working now, but i cant see gun and insted of m71b1 in hands is greade and i dont see gun at all

sqs file

_unit = _this select 1;

_id = _this select 2;

? _id == M72B1legs : goto "M72B1l";

? _id == M72B1 : goto "M72";

hint "Error, no id!";

exit;

#M72B1l

_unit removeAction M72B1legs;

_unit playmove "CombatReloadMagazine";

~1

_unit removeWeapon "M72B1";

_unit removeWeapon "handgrenade";

_unit AddWeapon "M72B1legs";

_unit AddWeapon "handgrenade";

M72B1 = _unit addAction ["Nogice","\m72b1\scripts\Nogice.sqs"];

exit;

#M72

_unit removeAction M72B1;

_unit playmove "CombatReloadMagazine";

~1

_unit removeWeapon "M72B1legs";

_unit removeWeapon "handgrenade";

_unit AddWeapon "M72B1";

_unit AddWeapon "handgrenade";

M72B1legs = _unit addAction ["Zlozi nogice","\m72b1\scripts\Nogice.sqs"];

exit;

cpp file

// M72B1 -------P3D----- McHide [sV]

// poizkusni cpp

// 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 M72B1

{

units[] = {};

weapons[] = { M72B1,

M72B1legs

};

requiredVersion = 1.91;

requiredAddons[]={"BIS_Resistance","BIS_WeaponPack"};

};

};

class CfgModels

{

class Default{};

class Weapon: Default{};

class M72B1: Weapon{};

class M72B1legs: Weapon{};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class M72B1: MGun

{

displayName = M72B1;

displayNameMagazine="M72B1 Magazine";

shortNameMagazine="M72B1 Magazine";

scopeWeapon = public;

scopeMagazine = public;

model="\M72B1\M72B1.p3d";

modelOptics="\M72B1\M72B1optika.p3d";

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

optics = true;

opticsZoomMin=0.4;

opticsZoomMax=0.4;

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

class Single

{

ammo="BulletSingleG";

multiplier=1;

burst=1;

displayName="M72B1 Semi";

dispersion=0.00350;

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

soundContinuous=0;

reloadTime=0.150000;

ffCount=1;

recoil="M72B1single";

autoFire=0;

aiRateOfFire=05;

aiRateOfFireDistance=1000;

useAction=0;

useActionTitle="";

};

class FullAuto

{

ammo="BulletFullAutoG";

multiplier=1;

burst=1;

displayName="M72B1 Auto";

tracerColor[]={0.800000,0.800000,0.600000,0.50000};

tracerColorR[]={0.800000,0.800000,0.600000,0.50000};

dispersion=0.00950;

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

soundContinuous=1;

reloadTime=0.100000;

ffCount=30;

recoil="M72B1auto";

autoFire=30;

aiRateOfFire=0.25;

aiRateOfFireDistance=600;

useAction=0;

useActionTitle="";

};

class M72B1legs: MGun

{

displayName = M72B1legs;

displayNameMagazine="M72B1 Magazine";

shortNameMagazine="M72B1 Magazine";

scopeWeapon = public;

scopeMagazine = public;

model="\M72B1\M72B1legs.p3d";

modelOptics="\data3d\optika_ak47.p3d";

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

optics = true;

opticsZoomMin=0.4;

opticsZoomMax=0.4;

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

class Single

{

ammo="BulletSingleG";

multiplier=1;

burst=1;

displayName="M72B1 Semi";

dispersion=0.00350;

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

soundContinuous=0;

reloadTime=0.150000;

ffCount=1;

recoil="M72B1single";

autoFire=0;

aiRateOfFire=05;

aiRateOfFireDistance=1200;

useAction=0;

useActionTitle="";

};

class FullAuto

{

ammo="BulletFullAutoG";

multiplier=1;

burst=1;

displayName="M72B1 Auto";

tracerColor[]={0.800000,0.800000,0.600000,0.50000};

tracerColorR[]={0.800000,0.800000,0.600000,0.50000};

dispersion=0.00950;

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

soundContinuous=1;

reloadTime=0.100000;

ffCount=30;

recoil="M72B1auto";

autoFire=30;

aiRateOfFire=0.25;

aiRateOfFireDistance=1000;

useAction=0;

useActionTitle="";

};

};

};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land:AllVehicles{};

class Man:Land{};

class Soldier:Man{};

class OfficerGNight:Soldier{};

class M72B1Soldier:OfficerGNight

{

picture="ismg";

vehicleClass="Men";

scope=2;

cost=60000;

accuracy=2.500000;

displayName="[sV]M72B1 soldier";

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

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

magazines[]={"M72B1","M72B1","M72B1","M72B1","M72B1"

,"M72B1","handgrenade","handgrenade"};

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

class EventHandlers

{

init = "M72B1legs = (_this select 0) addAction [""Nogice"",""\m72b1\scripts\Nogice.sqs""]";

};

};

};

class CfgRecoils

{

M72B1single[]=

{

0.020,-0.065,0.030,

0.060,-0.030,0.010,

0.000,0.000,0.000

};

M72B1auto[]=

{

0.020,-0.065,0.030,

0.060,-0.030,0.010,

0.000,0.000,0.000

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyM72B1: ProxyWeapon {};

};

i edited the post

someone plis help

Share this post


Link to post
Share on other sites

First of all..not very descriptive about exactly where the problem is

But for starters you have this in your script wrong:

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

nog.sqs

_unit = _this select 1;

_id = _this select 2;

? _id == m72b1legs : goto "m72b1legs";

? _id == m72b1 : goto "m72";

hint "Error, no id!";

exit;

Should be

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

nog.sqs

_unit = _this select 1;

_id = _this select 2;

? _id == "m72b1legs" : goto "m72b1legs";

? _id == "m72b1" : goto "m72";

hint "Error, no id!";

exit;

Share this post


Link to post
Share on other sites
Guest

ok im waiting for too long now, will someone help me or not sad_o.gifghostface.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  

×