MGTDB 956 Report post Posted January 22, 2018 (edited) This is for vehicles vs players, currently, since Arma 3 0.54 collision between vehicles cannot be disabled First, if you don't already, create a folder called custom in your mission file Grab 3 files from the Exile client filesExileClient_object_player_event_onEnterSafezone.sqf, ExileClient_object_player_thread_safeZone.sqf and ExileClient_object_player_event_onLeaveSafezone.sqf Change ExileClient_object_player_event_onEnterSafezone.sqf to the code below and place it in the custom folder Spoiler /** * ExileClient_object_player_event_onEnterSafezone * * 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["_vehicle", "_attachedObjects", "_position"]; if (ExilePlayerInSafezone) exitWith { false }; if !(alive player) exitWith { false }; ExilePlayerInSafezone = true; ExileClientVehiclesCollision = []; { ExileClientVehiclesCollision pushBackUnique _x; player disableCollisionWith _x; } forEach nearestObjects [player, ["LandVehicle","Tank","Air","Ship"], 50]; player allowDamage false; player removeAllEventHandlers "HandleDamage"; _vehicle = vehicle player; if !(_vehicle isEqualTo player) then { if (local _vehicle) then { _vehicle allowDamage false; }; _attachedObjects = attachedObjects _vehicle; if !(_attachedObjects isEqualTo []) then { _position = getPosATL _vehicle; { if ((typeOf _x) in ["DemoCharge_Remote_Mag", "SatchelCharge_Remote_Mag"]) then { detach _x; _x setPosATL [(_position select 0) + random 2, (_position select 1) + random 2, 0.05]; _x setDir (random 360); }; } forEach _attachedObjects; }; ExileClientSafeZoneVehicle = _vehicle; ExileClientSafeZoneVehicleFiredEventHandler = _vehicle addEventHandler ["Fired", {_this call ExileClient_object_player_event_onFiredSafeZoneVehicle}]; }; ExileClientSafeZoneESPEventHandler = addMissionEventHandler ["Draw3D", {20 call ExileClient_gui_safezone_safeESP}]; ["Welcome! God mode enabled."] spawn ExileClient_gui_baguette_show; ExileClientSafeZoneUpdateThreadHandle = [1, ExileClient_object_player_thread_safeZone, [], true] call ExileClient_system_thread_addtask; true Change ExileClient_object_player_thread_safeZone.sqf to the code below and place it in the custom folder Spoiler /** * ExileClient_object_player_thread_safeZone * * 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["_vehicle"]; _vehicle = vehicle player; if (!ExilePlayerInSafezone) exitWith {false}; { ExileClientVehiclesCollision pushBackUnique _x; player disableCollisionWith _x; } forEach nearestObjects [player, ["LandVehicle","Tank","Air","Ship"], 50]; if (_vehicle isEqualTo player) then { if !(isNull ExileClientSafeZoneVehicle) then { ExileClientSafeZoneVehicle removeEventHandler ["Fired", ExileClientSafeZoneVehicleFiredEventHandler]; ExileClientSafeZoneVehicle = objNull; ExileClientSafeZoneVehicleFiredEventHandler = nil; }; } else { if (local _vehicle) then { _vehicle allowDamage false; }; if !(_vehicle isEqualTo ExileClientSafeZoneVehicle) then { if !(isNull ExileClientSafeZoneVehicle) then { ExileClientSafeZoneVehicle removeEventHandler ["Fired", ExileClientSafeZoneVehicleFiredEventHandler]; ExileClientSafeZoneVehicle = objNull; ExileClientSafeZoneVehicleFiredEventHandler = nil; }; ExileClientSafeZoneVehicle = _vehicle; ExileClientSafeZoneVehicleFiredEventHandler = _vehicle addEventHandler ["Fired", {_this call ExileClient_object_player_event_onFiredSafeZoneVehicle}]; }; }; true and ExileClient_object_player_event_onLeaveSafezone.sqf to the code below and place it in the custom folder Spoiler /** * ExileClient_object_player_event_onLeaveSafezone * * 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["_vehicle"]; if !(ExilePlayerInSafezone) exitWith { false }; ExilePlayerInSafezone = false; { if !(isNull _x) then { player enableCollisionWith _x; }; } forEach ExileClientVehiclesCollision; ExileClientVehiclesCollision = []; if !(isNil "ExileClientSafeZoneUpdateThreadHandle") then { [ExileClientSafeZoneUpdateThreadHandle] call ExileClient_system_thread_removeTask; ExileClientSafeZoneUpdateThreadHandle = nil; }; player allowDamage true; player addEventHandler ["HandleDamage", {_this call ExileClient_object_player_event_onHandleDamage}]; if !(isNull ExileClientSafeZoneVehicle) then { if (local ExileClientSafeZoneVehicle) then { ExileClientSafeZoneVehicle allowDamage true; }; ExileClientSafeZoneVehicle removeEventHandler ["Fired", ExileClientSafeZoneVehicleFiredEventHandler]; ExileClientSafeZoneVehicle = objNull; ExileClientSafeZoneVehicleFiredEventHandler = nil; }; _vehicle = vehicle player; if !(_vehicle isEqualTo player) then { if (local _vehicle) then { _vehicle allowDamage true; }; }; if !(isNil "ExileClientSafeZoneESPEventHandler") then { removeMissionEventHandler ["Draw3D", ExileClientSafeZoneESPEventHandler]; ExileClientSafeZoneESPEventHandler = nil; }; if (alive player) then { ["Goodbye! God mode disabled."] spawn ExileClient_gui_baguette_show; }; true Then in config.cpp, find class CfgExileCustomCode and add the following to the array class CfgExileCustomCode { ExileClient_object_player_event_onEnterSafezone = "custom\ExileClient_object_player_event_onEnterSafezone.sqf"; ExileClient_object_player_thread_safeZone = "custom\ExileClient_object_player_thread_safeZone.sqf"; ExileClient_object_player_event_onLeaveSafezone = "custom\ExileClient_object_player_event_onLeaveSafezone.sqf"; }; Then pack your mission file and you're good to go! Edited: Made it even more performant Edited: Updated with Stokes code Edited January 25, 2018 by MGTDB 11 Share this post Link to post Share on other sites
A z 7 Report post Posted January 22, 2018 Seen this in effect. Idea is good. But now I can't stop multiple players running up to my vehicle and draining all my fuel along with looting my mission vehicle. Before I could ram the player with the vehicle giving me a few seconds to actually sell everything I gained. 1 Share this post Link to post Share on other sites
Wooki 4 Report post Posted January 23, 2018 As opposed to you repeatedly ramming the players until they are forced out of the trade zone, so you can kill and loot them? 2 Share this post Link to post Share on other sites
geekm0nkey 144 Report post Posted January 23, 2018 I solved this issue by having one of my traders inaccessible by vehicles. Share this post Link to post Share on other sites
A z 7 Report post Posted January 23, 2018 16 hours ago, Wooki said: As opposed to you repeatedly ramming the players until they are forced out of the trade zone, so you can kill and loot them? Why do you think I rammed them Share this post Link to post Share on other sites
StokesMagee 871 Report post Posted January 23, 2018 (edited) // My comment was moved to the OP Edited January 26, 2018 by StokesMagee 2 Share this post Link to post Share on other sites
dima054 59 Report post Posted January 24, 2018 Umm so which solution is better? From MGTDB or from StokesMagee? Share this post Link to post Share on other sites
MGTDB 956 Report post Posted January 25, 2018 17 hours ago, dima054 said: Umm so which solution is better? From MGTDB or from StokesMagee? Updated OP to use Stokes code 2 Share this post Link to post Share on other sites
dima054 59 Report post Posted January 25, 2018 You have duplicate if (!ExilePlayerInSafezone) exitWith {false}; in thread file @MGTDB 1 Share this post Link to post Share on other sites
MGTDB 956 Report post Posted January 25, 2018 52 minutes ago, dima054 said: You have duplicate if (!ExilePlayerInSafezone) exitWith {false}; in thread file @MGTDB Fixed 1 Share this post Link to post Share on other sites