Created
October 4, 2015 21:52
-
-
Save anonymous/2a377a731b81c1121c36 to your computer and use it in GitHub Desktop.
Disable bomb dropping on trade zone enter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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