Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2a377a731b81c1121c36 to your computer and use it in GitHub Desktop.
Save anonymous/2a377a731b81c1121c36 to your computer and use it in GitHub Desktop.
Disable bomb dropping on trade zone enter
class CfgExileCustomCode
{
/*
You can overwrite every single file of our code without touching it.
To do that, add the function name you want to overwrite plus the
path to your custom file here. If you wonder how this works, have a
look at our bootstrap/fn_preInit.sqf function.
Simply add the following scheme here:
<Function Name of Exile> = "<New File Name>";
Example:
ExileClient_util_fusRoDah = "myaddon\myfunction.sqf";
*/
// Disable Bomb dropping on safe zone
ExileClient_object_player_event_onEnterSafezone = "ExileClient_object_player_event_onEnterSafezone.sqf";
};
/**
* Exile Mod
* www.exilemod.com
* © 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 };
ExilePlayerInSafezone = true;
if (alive player) then
{
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;
{
detach _x;
_x setPosATL [(_position select 0) + random 2, (_position select 1) + random 2, 0.05];
_x setDir (random 260);
}
forEach _attachedObjects;
};*/
ExileClientSafeZoneVehicle = _vehicle;
ExileClientSafeZoneVehicleFiredEventHandler = _vehicle addEventHandler ["Fired", {_this call ExileClient_object_player_event_onFiredSafeZoneVehicle}];
};
ExileClientSafeZoneESPEventHandler = addMissionEventHandler ["Draw3D", {20 call ExileClient_gui_safezone_safeESP}];
["SafezoneEnter"] call ExileClient_gui_notification_event_addNotification;
ExileClientSafeZoneUpdateThreadHandle = [1, ExileClient_object_player_thread_safeZone, [], true] call ExileClient_system_thread_addtask;
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment