Shane Martin

Disable vehicle thermal and certain weapons

48 posts in this topic

This is a quick and dirty way to disable thermal from vehicles / helicopters, and delete weapons from vehicles (eg missiles).

The reason for using ExileServer_object_vehicle_createPersistentVehicle.sqf is that when loading the server and buying from trader both of these events call this file to create the vehicle.

in ExileServer_object_vehicle_createPersistentVehicle.sqf, copy the code below and replace:

/**
 * 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 = createVehicle [_className, _position, [], 0, "CAN_COLLIDE"];

//Let's remove missiles!
_vehicleObject removeWeaponTurret ["missiles_DAR",[-1]];
_vehicleObject removeWeaponTurret ["missiles_DAGR",[-1]];

//Let's remove thermal from Tanks / Helis!
_vehicleObject disableTIEquipment true;

clearBackpackCargoGlobal _vehicleObject;
clearItemCargoGlobal _vehicleObject;
clearMagazineCargoGlobal _vehicleObject;
clearWeaponCargoGlobal _vehicleObject;
_position set[2, (_position select 2) + 0.25]; 
_vehicleObject setDir _direction;		
if (_usePositionATL) then
{
	_vehicleObject setPosATL _position;
}
else 
{
	_vehicleObject setPosASL _position;
};
_vehicleObject setVariable ["ExileIsPersistent", true];
_vehicleObject setVariable ["ExileAccessCode",_pinCode];
_vehicleObject addEventHandler ["GetOut", { _this call ExileServer_object_vehicle_event_onGetOut}];
_vehicleObject addMPEventHandler ["MPKilled", { _this call ExileServer_object_vehicle_event_onMPKilled}];
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

In the example above I have took out the rockets for the heli's (AH-9, Orca and Hellcat) and disabled the thermal imaging equipment on all vehicles.

To disable the cannons on the AMV-7 Marshall, add the code below:

_vehicleObject removeWeaponTurret ["autocannon_40mm_CTWS",[0]];

For the miniguns on the UH-80 Ghosthawk, add the code below (Thanks to Kugane for letting me know it wasn't working):

_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport",[1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport2",[2]];

For the AH-99 Blackfoot: add the code below:

//Disable weapons AH-99
_vehicleObject removeWeaponTurret ["missiles_DAGR",[0]];
_vehicleObject removeWeaponTurret ["missiles_ASRAAM",[0]];

For the MI-48, add the code below:

//Disable Weapons MI-48 Kajman
_vehicleObject removeWeaponTurret ["missiles_SCALPEL",[0]];
_vehicleObject removeWeaponTurret ["rockets_Skyfire",[0]];

For the AFV-4, add the code below:

//AFV-4 Gorgon
_vehicleObject removeWeaponTurret ["autocannon_30mm_CTWS",[0]];
_vehicleObject removeWeaponTurret ["missiles_titan",[0]];

For the BTR-K, add the code below:

//BTR-K
_vehicleObject removeWeaponTurret ["autocannon_30mm_CTWS",[0]];
_vehicleObject removeWeaponTurret ["missiles_titan",[0]];

For the FV-720, add the code below:

//FV-720
_vehicleObject removeWeaponTurret ["autocannon_30mm",[0]];

For the MSE-3, add the code below:

//mse-3 madrid
_vehicleObject removeWeaponTurret ["GMG_40mm",[0]];

For the IFV-6C, add the add the code below:

//ifv-6c
_vehicleObject removeWeaponTurret ["GMG_40mm",[0]];

If you need any help, post below :)

Shane

Edited by Shane Martin
More Info
  • Like 3

Share this post


Link to post
Share on other sites
Advertisement

Works perfectly. Using this on my server. Now HMG vehicles arent *too* OP and I can add the armed Pawnee, Orca and Hellcat but not allow OP missiles!

I currently have the Pawnee, Orca and Hellcat in my server and the Hellcat and orca are awesome just the pawnee you have no clue on your ammo counter

 

Share this post


Link to post
Share on other sites

doesnt't work on blackhawk -.-

added 

_vehicleObject removeWeaponTurret ["LMG_Minigun",[-1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun2",[-1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun_heli",[-1]];

 

Share this post


Link to post
Share on other sites

doesnt't work on blackhawk -.-

added 

_vehicleObject removeWeaponTurret ["LMG_Minigun",[-1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun2",[-1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun_heli",[-1]];

 

Try:

_vehicleObject removeWeaponTurret ["LMG_Minigun",[1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun2",[2]];

-1 is for the drivers turret, where the minguns are different turret positions.

Regards,

Shane

Share this post


Link to post
Share on other sites

still not works

Apologies, please try the following:
 

_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport",[1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport2",[2]];

Regards,

Shane

  • Like 1

Share this post


Link to post
Share on other sites

Apologies, please try the following:
 

_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport",[1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport2",[2]];

Regards,

Shane

this works :)

the minigun is still installed, but not usable at all

  • Like 1

Share this post


Link to post
Share on other sites

This is a quick and dirty way to disable thermal from vehicles / helicopters, and delete weapons from vehicles (eg missiles).

The reason for using ExileServer_object_vehicle_createPersistentVehicle.sqf is that when loading the server and buying from trader both of these events call this file to create the vehicle.

in ExileServer_object_vehicle_createPersistentVehicle.sqf, copy the code below and replace:

/**
 * 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 = createVehicle [_className, _position, [], 0, "CAN_COLLIDE"];

//Let's remove missiles!
_vehicleObject removeWeaponTurret ["missiles_DAR",[-1]];
_vehicleObject removeWeaponTurret ["missiles_DAGR",[-1]];

//Let's remove thermal from Tanks / Helis!
_vehicleObject disableTIEquipment true;

clearBackpackCargoGlobal _vehicleObject;
clearItemCargoGlobal _vehicleObject;
clearMagazineCargoGlobal _vehicleObject;
clearWeaponCargoGlobal _vehicleObject;
_position set[2, (_position select 2) + 0.25]; 
_vehicleObject setDir _direction;		
if (_usePositionATL) then
{
	_vehicleObject setPosATL _position;
}
else 
{
	_vehicleObject setPosASL _position;
};
_vehicleObject setVariable ["ExileIsPersistent", true];
_vehicleObject setVariable ["ExileAccessCode",_pinCode];
_vehicleObject addEventHandler ["GetOut", { _this call ExileServer_object_vehicle_event_onGetOut}];
_vehicleObject addMPEventHandler ["MPKilled", { _this call ExileServer_object_vehicle_event_onMPKilled}];
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

In the example above I have took out the rockets for the heli's (AH-9, Orca and Hellcat) and disabled the thermal imaging equipment on all vehicles.

To disable the cannons on the AMV-7 Marshall, add the code below:

_vehicleObject removeWeaponTurret ["autocannon_40mm_CTWS",[0]];

For the miniguns on the UH-80 Ghosthawk, add the code below (Thanks to Kugane for letting me know it wasn't working):

_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport",[1]];
_vehicleObject removeWeaponTurret ["LMG_Minigun_Transport2",[2]];

For the AH-99 Blackfoot: add the code below:

//Disable weapons AH-99
_vehicleObject removeWeaponTurret ["missiles_DAGR",[0]];
_vehicleObject removeWeaponTurret ["missiles_ASRAAM",[0]];

For the MI-48, add the code below:

//Disable Weapons MI-48 Kajman
_vehicleObject removeWeaponTurret ["missiles_SCALPEL",[0]];
_vehicleObject removeWeaponTurret ["rockets_Skyfire",[0]];

For the AFV-4, add the code below:

//AFV-4 Gorgon
_vehicleObject removeWeaponTurret ["autocannon_30mm_CTWS",[0]];
_vehicleObject removeWeaponTurret ["missiles_titan",[0]];

For the BTR-K, add the code below:

//BTR-K
_vehicleObject removeWeaponTurret ["autocannon_30mm_CTWS",[0]];
_vehicleObject removeWeaponTurret ["missiles_titan",[0]];

For the FV-720, add the code below:

//FV-720
_vehicleObject removeWeaponTurret ["autocannon_30mm",[0]];

For the MSE-3, add the code below:

//mse-3 madrid
_vehicleObject removeWeaponTurret ["GMG_40mm",[0]];

For the IFV-6C, add the add the code below:

//ifv-6c
_vehicleObject removeWeaponTurret ["GMG_40mm",[0]];

If you need any help, post below :)

Shane

Thermal is disabled when in first person in the gunner seat and zoom but it can still see thermal when not zooming. 

Any ideas?

 

thanks

Share this post


Link to post
Share on other sites

Is there actually a way to add a specific gun to a specific vehicle ?

Basically something like this 

addMagazineTurret ["6Rnd_LG_scalpel",[-1]]; 
addWeapon "missiles_SCALPEL";

How to define it for a specific veicle now ?

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.