here's a cpp for Fliper's M82 Barret......
//Barret M82A1 SASR "Light fifty"; final version (V.1.0);
//By WFW => Wulf&FlipeR Workshop: FlipeR(Barret model), LoneWulf(.CPP);
//Special TNX to InQUIsiTOr(90% of textures);
//www.natosoldier.com;
#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
#define private 0
#define protected 1
#define public 2
#define WeaponNoSlot 0
#define WeaponSlotPrimary 1
#define WeaponSlotSecondary 16
#define WeaponSlotItem 256
#define WeaponSlotBinocular 4096
#define WeaponHardMounted 65536
class CfgModels
{
class Default{};
class Weapon: Default{};
class WFW_Barret: Weapon{};
};
class CfgPatches
{
class WFWSniperWM82A1
{
units[] = {WFWSniperWM82A1};
weapons[] = {};
requiredVersion = 1.01;
};
class WFWMBarretM82A1
{
units[] = {};
weapons[] = {WFWBarretM82A1};
requiredVersion = 1.01;
};
};
class CfgVehicles
{
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class Man:Land{};
class Soldier:Man{};
class SoldierWB:Soldier{};
class SoldierWSniper:SoldierWB{};
class WFWSniperWM82A1:SoldierWSniper
{
displayName="Heavy Sniper (M82A1)";
weapons[]={WFWM82A1,binocular};
magazines[]={WFWM82A1mag,WFWM82A1mag,WFWM82A1mag,WFWM82A1mag};
nightVision=1;
camouflage=0.600000;
};
};
class CfgRecoils
{
WFWBarret[]={0.022000,0,0,0.060000,0.014000,0.020000,0.050000,0.006000,0.060000,0.340000,0,0};
};
class CfgAmmo
{
class default {};
class BulletSingle:default {};
class WFWM82A1:BulletSingle
{
hit=100;
indirectHit=6;
indirectHitRange=0.100000;
explosive=0;
cost=40;
maxSpeed=854;
minRange=1;
minRangeProbab=0.100000;
midRange=750;
midRangeProbab=0.300000;
maxRange=1800;
maxRangeProbab=0.90000;
visibleFire=300;
audibleFire=2000;
visibleFireTime=2;
};
};
class CfgWeapons
{
class default {};
class MGun:default {};
class Riffle:MGun {};
class SniperRiffle:Riffle {};
class WFWM82A1:SniperRiffle
{
scopeWeapon=2;
scopeMagazine=0;
weaponType=WeaponSlotPrimary;
model="\WFW_M82A1\WFW_Barret.p3d";
displayName="WFW Barret M82A1";
picture="\WFW_M82A1\pic\w_WFWBarretM82A1.paa";
sound[]={\WFW_M82A1\sound\WFWM82A1.wav,1,1};
optics = true;
modelOptics="\WFW_M82A1\scope\WFWBarretscope.p3d";
///flashSize=2.500000;
opticsZoomMin=0.05000;
opticsZoomMax=0.05000;
distanceZoomMin=400;
distanceZoomMax=400;
ammo=WFWM82A1;
count=10;
initSpeed=854;
multiplier=1;
division=1;
burst=1;
dispersion=0.0007;
maxLeadSpeed=854;
soundContinuous=0;
reloadTime=0.9;
magazineReloadTime=2.5;
magazines[]={WFWM82A1mag};
recoil=WFWBarret;
autoFire=0;
autoReload=0;
aiRateOfFire=5.0;
aiRateOfFireDistance=1100;
aiDispersionCoefX=0.000009;
aiDispersionCoefY=0.000007;
threat[]={1,0.5,0.1};
enableAttack=1;
useAction=0;
useActionTitle="";
};
class WFWM82A1mag: WFWM82A1
{
displayNameMagazine = M82mag;
shortNameMagazine = M82mag;
picture="\WFW_M82A1\pic\m_WFWBarretM82A1Mag.paa";
scopeWeapon=0;
scopeMagazine=2;
};
};
class CfgNonAIVehicles
{
class ProxyWeapon {};
class ProxyWFWM82A1: ProxyWeapon {};
};