• 2
NFGCaboose-1

Satchel explosives detonate in safe zones

Question

@Eichi @maca134  So evidently after the last Arma update players can place satchels or explosive  charges down on the ground from their inventory in safe zones and touch them off blowing up vehicles and blasting players out of the safe zone. Something related to the IDAP DLC.  Don’t know if you would call it a bug or Arma just making things more Arma. Is there a way to disable this function in the safe zones while still having the ability to use explosives in the game. Figure something in the enter and leave safe zone sqf’s as overwrites. Has anybody else seen this yet?

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

Me too. I have added this into ExileClient_object_player_event_onEnterSafezone.sqf

wdy_no_mines = player addEventHandler ["InventoryClosed", {
	_mines = ["SatchelCharge_Remote_Mag","ClaymoreDirectionalMine_Remote_Mag","DemoCharge_Remote_Mag","ATMine_Range_Mag","APERSMine_Range_Mag","APERSBoundingMine_Range_Mag","SLAMDirectionalMine_Wire_Mag","APERSTripMine_Wire_Mag","APERSMineDispenser_Mag"];
	_minetypes = ["SatchelCharge_Remote_Ammo","ClaymoreDirectionalMine_Remote_Ammo","DemoCharge_Remote_Ammo","ATMine_Range_Ammo","APERSMine_Range_Ammo","APERSBoundingMine_Range_Ammo","SLAMDirectionalMine_Wire_Ammo","APERSTripMine_Wire_Ammo","APERSMineDispenser_Ammo"]; 
	_holder = nearestObject [position player, "GroundWeaponHolder"];
	{
		_mine = _x;
		{
			if(typeOf _mine == _x)then
			{
				deleteVehicle _mine;
			};
		}forEach _minetypes;
	}forEach (player nearObjects 2);
	_cargomag = getMagazineCargo _holder; 
	_keyMag = _cargomag select 0;
	_keyMag2 = _cargomag select 1;
	_minecheck = false;
	{
		if(_x in _keyMag)then 
		{
			_index = _keyMag find _x;
			_keyMag deleteAt _index; 
			_keyMag2 deleteAt _index;
			_minecheck = true;
		};
	}forEach _mines;
	if(_minecheck)then 
	{ 
		_cargoWeap = getWeaponCargo _holder; 
		_cargoitem = getItemCargo _holder; 
		_cargopos = getPos _holder; 
		_cargoposATL = getPosATL _holder; 
		deleteVehicle _holder;
		_keyWeap = _cargoWeap select 0; 
		_keyWeap2 = _cargoWeap select 1; 
		_keyItem = _cargoItem select 0; 
		_keyItem2 = _cargoItem select 1; 
		_weaponHolder = createVehicle ["GroundWeaponHolder", _cargopos, [], 0, "CAN_COLLIDE"]; 
		_weaponHolder setPosATL _cargoposATL; 
	{ 
		_indexkeyMag = _keyMag find _x; 
		_keyMagnum = _keyMag2 select _indexkeyMag; 
		_weaponHolder addMagazineCargoGlobal [_x,_keyMagnum]; 
	}forEach _keyMag; 
	{ 
		_indexkeyWeap = _keyWeap find _x; 
		_keyWeapnum = _keyWeap2 select _indexkeyWeap; 
		_weaponHolder addWeaponCargoGlobal [_x,_keyWeapnum]; 
	}forEach _keyWeap; 
	{ 
		_indexkeyItem = _keyItem find _x; 
		_keyItemnum = _keyItem2 select _indexkeyItem; 
		_weaponHolder addItemCargoGlobal [_x,_keyItemnum]; 
	}forEach _keyItem; 
	["ErrorTitleAndText", ["Explosive Deleted", "You cannot place an explosive this close to a trader!"]] call ExileClient_gui_toaster_addTemplateToast; 
	};  
}];;

and

player removeEventHandler ["InventoryClosed",wdy_no_mines];

into ExileClient_object_player_event_onLeaveSafezone.sqf.

But there is still an exploit possible.

I am not sure if my code makes sense or if there are better eventHandlers, commands, or ways to solve this problem. Any input would be appreciated.

Edited by Artharon

Share this post


Link to post
Share on other sites
Advertisement
  • 0

You could also add this to ExileClient_object_player_thread_safeZone.sqf but I don't think this is a good idea....

 

_minetypes= ["SatchelCharge_Remote_Ammo","ClaymoreDirectionalMine_Remote_Ammo","DemoCharge_Remote_Ammo","ATMine_Range_Ammo","APERSMine_Range_Ammo","APERSBoundingMine_Range_Ammo","SLAMDirectionalMine_Wire_Ammo","APERSTripMine_Wire_Ammo","APERSMineDispenser_Ammo"]; 
	{
		_mine = _x;
		{
			if(typeOf _mine == _x)then
			{
				deleteVehicle _mine;
			};
		}forEach _minetypes;
	}forEach (player nearObjects 2);

Edit: Tryed it, doesn't even work fast enough to not be able to touch off the bomb....

Edited by Artharon

Share this post


Link to post
Share on other sites
  • 0

Gonna try one last thing since „Put“ Eventhandler isn‘t working in Exile (or I am retarded) , that would be an eventhandler which always checks for mines 2 meters around a player if he presses „Spacebar“ and is in a SafeZone. Not really satisfying but this could be at least without exploits if it works correctly. Animationeventhandlers were always too late or too early with deleting.=/ Will post my results here.

Share this post


Link to post
Share on other sites
  • 0

There is no viable solution regarding key/mousebutton eventhandler since the code for mousebuttons are handled very differently than keys. Just go with my first solution and the bad guys firstly have to figure out how to go around the script and secondly 1 guy dies at least from them.

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.