MGTDB

Fix M134 configs so we can use it on other vehicles

26 posts in this topic

For the next Exile update, could the configs for the M134 Gatling gun be fixed, since the introduction of the Armed SUV/HMMWV with the custom Exile M134 config it has broken default Arma 3's M134_minigun 

  • Like 4

Share this post


Link to post
Share on other sites

Ignore this, have managed to get it working on the Pawnee by re-adding the weapon/ammo

if(_className == "B_Heli_Light_01_armed_F") then //AH-9 Pawnee
{
	_vehicleObject removeWeaponTurret  	   ["missiles_DAR",[-1]];		
	_vehicleObject removeMagazinesTurret   ["24Rnd_missiles",[-1]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[0]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[-1]];
};

 

Edited by MGTDB
  • Like 3

Share this post


Link to post
Share on other sites
Advertisement

Sorry for the late reply
in exile_server/code/ExileServer_object_vehicle_createNonPersistentVehicle.sqf

Spoiler

private["_className","_position","_direction","_usePositionATL","_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", false];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
if(_className == "B_Heli_Light_01_armed_F") then //AH-9 Pawnee
{
	_vehicleObject removeWeaponTurret  	   ["missiles_DAR",[-1]];		
	_vehicleObject removeMagazinesTurret   ["24Rnd_missiles",[-1]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[0]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[0]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[-1]];
	_vehicleObject addMagazineTurret       ["60Rnd_CMFlare_Chaff_Magazine",[0]];
	_vehicleObject addMagazineTurret   	   ["60Rnd_CMFlare_Chaff_Magazine",[-1]];

};
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

 

and ExileServer_object_vehicle_createPersistentVehicle.sqf

Spoiler

private["_className","_position","_direction","_usePositionATL","_pinCode","_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_pinCode = _this select 4;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", true];
_vehicleObject setVariable ["ExileAccessCode", _pinCode];
_vehicleObject addEventHandler ["GetOut", {_this call ExileServer_object_vehicle_event_onGetOut}];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject disableTIEquipment true;
if(_className == "B_Heli_Light_01_armed_F") then //AH-9 Pawnee
{
	_vehicleObject removeWeaponTurret  	   ["missiles_DAR",[-1]];		
	_vehicleObject removeMagazinesTurret   ["24Rnd_missiles",[-1]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[0]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[0]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[-1]];
	_vehicleObject addMagazineTurret       ["60Rnd_CMFlare_Chaff_Magazine",[0]];
	_vehicleObject addMagazineTurret   	   ["60Rnd_CMFlare_Chaff_Magazine",[-1]];
};
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

 


 

  • Like 1

Share this post


Link to post
Share on other sites
On 2017-5-19 at 2:13 PM, MGTDB said:

Sorry for the late reply
in exile_server/code/ExileServer_object_vehicle_createNonPersistentVehicle.sqf

and ExileServer_object_vehicle_createPersistentVehicle.sqf

tut tut @MGTDB where are the spaces between the variables in the private array...? :D:D 
Cos they're sooo important :)

just joking btw for anyone else reading this.

  • Like 1

Share this post


Link to post
Share on other sites
33 minutes ago, BaroN said:

tut tut @MGTDB where are the spaces between the variables in the private array...? :D:D 
Cos they're sooo important :)

just joking btw for anyone else reading this.

Those spaces..!!! :swear:

  • Like 2

Share this post


Link to post
Share on other sites
On ‎5‎/‎19‎/‎2017 at 6:13 AM, MGTDB said:

Sorry for the late reply
in exile_server/code/ExileServer_object_vehicle_createNonPersistentVehicle.sqf

  Reveal hidden contents


private["_className","_position","_direction","_usePositionATL","_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", false];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
if(_className == "B_Heli_Light_01_armed_F") then //AH-9 Pawnee
{
	_vehicleObject removeWeaponTurret  	   ["missiles_DAR",[-1]];		
	_vehicleObject removeMagazinesTurret   ["24Rnd_missiles",[-1]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[0]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[0]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[-1]];
	_vehicleObject addMagazineTurret       ["60Rnd_CMFlare_Chaff_Magazine",[0]];
	_vehicleObject addMagazineTurret   	   ["60Rnd_CMFlare_Chaff_Magazine",[-1]];

};
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

 

and ExileServer_object_vehicle_createPersistentVehicle.sqf

  Reveal hidden contents


private["_className","_position","_direction","_usePositionATL","_pinCode","_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_pinCode = _this select 4;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", true];
_vehicleObject setVariable ["ExileAccessCode", _pinCode];
_vehicleObject addEventHandler ["GetOut", {_this call ExileServer_object_vehicle_event_onGetOut}];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject disableTIEquipment true;
if(_className == "B_Heli_Light_01_armed_F") then //AH-9 Pawnee
{
	_vehicleObject removeWeaponTurret  	   ["missiles_DAR",[-1]];		
	_vehicleObject removeMagazinesTurret   ["24Rnd_missiles",[-1]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[0]];
	_vehicleObject addWeaponTurret         ["M134_minigun",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret   	   ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[-1]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[0]];
	_vehicleObject addWeaponTurret         ["CMFlareLauncher",[-1]];
	_vehicleObject addMagazineTurret       ["60Rnd_CMFlare_Chaff_Magazine",[0]];
	_vehicleObject addMagazineTurret   	   ["60Rnd_CMFlare_Chaff_Magazine",[-1]];
};
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

 


 

Ah, now it makes sense.  Thank you kind sir :)

  • Like 1

Share this post


Link to post
Share on other sites
On 5/22/2017 at 11:25 AM, Heavy said:

Ah, now it makes sense.  Thank you kind sir :)

Tried this, it's not working for me. I literally copy/pasted your code into my sqf files. No change. Did I miss something?

Share this post


Link to post
Share on other sites
On 6/13/2017 at 0:06 PM, JerryAtricks said:

Tried this, it's not working for me. I literally copy/pasted your code into my sqf files. No change. Did I miss something?

As long as you setup both .sqfs like MGT DB suggested and do the redirects, it should work.  Considering the server I manage is PVE, I un-commented the missile pods and such.

Share this post


Link to post
Share on other sites
17 hours ago, Heavy said:

As long as you setup both .sqfs like MGT DB suggested and do the redirects, it should work.  Considering the server I manage is PVE, I un-commented the missile pods and such.

Then I must not understand what he "suggested" (?). Here's what I have.
ExileServer_object_vehicle_createNonPersistentVehicle.sqf
 

Spoiler

/**
 * ExileServer_object_vehicle_createNonPersistentVehicle
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_className", "_position", "_direction", "_usePositionATL", "_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", false];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject disableTIEquipment true;
if(_className == "B_Heli_Light_01_armed_F") then //AH-9 Pawnee
{
     _vehicleObject removeWeaponTurret         ["missiles_DAR",[-1]];        
    _vehicleObject removeMagazinesTurret   ["24Rnd_missiles",[-1]];
    _vehicleObject addWeaponTurret         ["M134_minigun",[0]];
    _vehicleObject addWeaponTurret         ["M134_minigun",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[-1]];
};
_vehicleObject enableDynamicSimulation true;
_vehicleObject

ExileServer_object_vehicle_createPersistentVehicle.sqf
 

Spoiler

/**
 * ExileServer_object_vehicle_createPersistentVehicle
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_className", "_position", "_direction", "_usePositionATL", "_pinCode", "_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_pinCode = _this select 4;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", true];
_vehicleObject setVariable ["ExileAccessCode", _pinCode];
_vehicleObject addEventHandler ["GetOut", {_this call ExileServer_object_vehicle_event_onGetOut}];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject disableTIEquipment true;

if(_className == "B_Heli_Light_01_armed_F") then //AH-9 Pawnee
{
        _vehicleObject removeWeaponTurret         ["missiles_DAR",[-1]];        
    _vehicleObject removeMagazinesTurret   ["24Rnd_missiles",[-1]];
    _vehicleObject addWeaponTurret         ["M134_minigun",[0]];
    _vehicleObject addWeaponTurret         ["M134_minigun",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[0]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret          ["2000Rnd_762x51_Belt",[-1]];
    _vehicleObject addMagazineTurret       ["2000Rnd_762x51_Belt",[-1]];
};

_vehicleObject enableDynamicSimulation true;
_vehicleObject

Like I said, I copy/pasted the code he posted, but it's not working. Am I supposed to change those values?

A few questions about those _vehicleObject lines, if I may. Why are they duplicated with one being [0] and the other being [-1]?

 

Also, in ExileServer_object_vehicle_createPersistentVehicle shouldn't this line:

_vehicleObject disableTIEquipment true;

be

_vehicleObject disableTIEquipment = true;

?

Edited by JerryAtricks

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.