Need help with m240 biplane script

system- server_monitor.sqf if you figure out how to do the bi plane m240 gun please upload part of the code where it goes in server_monitor tryed this many of times and have no luck think im putting it in wrong place just need to see the code where it goes exact cheers bro hope that helped you.
 
This has only been tested on 1.8.0.3 and on a Dayz.st server
All edits will be in the Server PBO
Go to server_monitor and find the code

if (_x == "Crossbow") then { _x = "Crossbow_DZ" }; // Convert Crossbow to Crossbow_DZ
if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
// Convert to DayZ Weapons
if (_x == "DMR") then { _x = "DMR_DZ" };
//if (_x == "M14_EP1") then { _x = "M14_DZ" };
if (_x == "SVD") then { _x = "SVD_DZ" };
if (_x == "SVD_CAMO") then { _x = "SVD_CAMO_DZ" };
if (isClass(configFile >> (_config select _i) >> _x) &&
getNumber(configFile >> (_config select _i) >> _x >> "stopThis") != 1) then {
if (_forEachIndex < count _magItemQtys) then {
switch (_i) do {
case 0: { _object addWeaponCargoGlobal [_x,(_magItemQtys select _forEachIndex)]; };
case 1: { _object addMagazineCargoGlobal [_x,(_magItemQtys select _forEachIndex)]; };
case 2: { _object addBackpackCargoGlobal [_x,(_magItemQtys select _forEachIndex)]; };
};
};
};
} forEach _magItemTypes;
} forEach _cargo;
};

Under that add
if (_object isKindOf "AN2_DZ") then {

_object addWeapon "M240_veh";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
};


Then you are done!

(optional) of you want to add mags just add one extra _object addMagazine "100Rnd_762x51_M240"; and to remove a mag obvis just delete one....
 
Code:
if (count _intentory > 0) then {
                if (_type in DZE_LockedStorage) then {
                    // Fill variables with loot
                    _object setVariable ["WeaponCargo", (_intentory select 0)];
                    _object setVariable ["MagazineCargo", (_intentory select 1)];
                    _object setVariable ["BackpackCargo", (_intentory select 2)];
                } else {

                    //Add weapons
                    _objWpnTypes = (_intentory select 0) select 0;
                    _objWpnQty = (_intentory select 0) select 1;
                    _countr = 0;                   
                    {
                        if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
                            _x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
                        };
                        _isOK =     isClass(configFile >> "CfgWeapons" >> _x);
                        if (_isOK) then {
                            _object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
                        };
                        _countr = _countr + 1;
                    } forEach _objWpnTypes;
               
                    //Add Magazines
                    _objWpnTypes = (_intentory select 1) select 0;
                    _objWpnQty = (_intentory select 1) select 1;
                    _countr = 0;
                    {
                        if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
                        if (_x == "ItemTent") then { _x = "ItemTentOld" };
                        _isOK =     isClass(configFile >> "CfgMagazines" >> _x);
                        if (_isOK) then {
                            _object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
                        };

                                                if (_object isKindOf "AN2_DZ") then {

                                                _object addWeapon "M240_veh";
                                                _object addMagazine "100Rnd_762x51_M240";
                                                _object addMagazine "100Rnd_762x51_M240";
                                                _object addMagazine "100Rnd_762x51_M240";
                                                _object addMagazine "100Rnd_762x51_M240";
                                                _object addMagazine "100Rnd_762x51_M240";
                                                _object addMagazine "100Rnd_762x51_M240";
                                                };
                        _countr = _countr + 1;
                    } forEach _objWpnTypes;

                    //Add Backpacks
                    _objWpnTypes = (_intentory select 2) select 0;
                    _objWpnQty = (_intentory select 2) select 1;
                    _countr = 0;
                    {
                        _isOK =     isClass(configFile >> "CfgVehicles" >> _x);
                        if (_isOK) then {
                            _object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
                        };
                        _countr = _countr + 1;
                    } forEach _objWpnTypes;
                };
            };

            if (_object isKindOf "AllVehicles") then {
                {
                    _selection = _x select 0;
                    _dam = _x select 1;
                    if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
                    [_object,_selection,_dam] call object_setFixServer;
                } forEach _hitpoints;

                _object setFuel _fuel;

                if (!((typeOf _object) in dayz_allowedObjects)) then {
                   
                    //_object setvelocity [0,0,1];
                    _object call fnc_veh_ResetEH;
                   
                    if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
                        _object setvehiclelock "locked";
                    };

                    _totalvehicles = _totalvehicles + 1;

                    // total each vehicle
                    serverVehicleCounter set [count serverVehicleCounter,_type];
                };
            };








tryed it here and no luck can someone help please cheers
 
Back
Top