JakeHekesFists 58 Report post Posted September 10, 2017 ExileClient_object_player_thread_safeZone.sqf This script was made to stop people from being cheap and using the UAV in a god mode area. copy the contents of the pastebin link below to your mission pbo, add overwrite to CfgExileCustomCode. eg. for example if you place the script in an exileOverwrites folder, do as below. class CfgExileCustomCode { ExileClient_object_player_thread_safeZone = "exileOverwrites\ExileClient_object_player_thread_safeZone.sqf"; // disable UAV/Bicycles in Safezone }; pastebin link belowhttps://pastebin.com/FnFm1tKy /** * 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/. */ /***** JakeHekesFists Edit: 2017 *****/ private _vehicle = vehicle player; // use these settings to toggle features on and off private _disableUAV = true; // disables player from connecting UAV to terminal in safe zone private _disableBikes = false; // ejects players from bicycles in safe zone to prevent crazy bicycle ramming - players can still pack bike if using enigma script. if (!ExilePlayerInSafezone) exitWith {false}; if (_disableUAV) then { if (alive (getConnectedUAV player)) then { player connectTerminalToUAV objNull; ["ErrorTitleAndText", ["Warning!", "Do not operate the UAV from inside the Safe Zone"]] call ExileClient_gui_toaster_addTemplateToast; }; }; 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 (_disableBikes) then { if (_vehicle isKindOf "Bicycle") then { player setVelocity [0, 0, 0]; player action [ "eject", _vehicle ]; ["ErrorTitleAndText", ["OFF YA BIKE M8", "Bicycles are not allowed in the SafeZone"]] call ExileClient_gui_toaster_addTemplateToast; }; }; 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 Script works in a very simple way, it just checks if a player is connected to a UAV in the traders, and if they are. it disconnects them. There is also a feature in this script to automatically eject players from bicycles in the safezone, I have disabled it by default. I had some major issues with people griefing with the crazy collision physics of the bicycle in the traders. Can save your admins a lot of headaches if you turn it on. Edit line 15 and 16 to toggle the features on/off. Feel free to use and edit the code however you see fit. 4 Share this post Link to post Share on other sites
Teacher 13 Report post Posted September 12, 2017 Вот за это спасибо, мелочь а реально нужная вещь! 1 Share this post Link to post Share on other sites
Teacher 13 Report post Posted September 12, 2017 It would be nice to add the possibility of choosing at what distance you can use the UAV from SafeZone as under construction! Share this post Link to post Share on other sites
Maaaaark 3 Report post Posted March 6, 2018 I can not get this to work (unless it is deactivated for admins?) I added the following to the config.cpp file (I just added the ExileClient_object... part under the current class CfgExileCustomCode class CfgExileCustomCode { ExileClient_object_player_thread_safeZone = "exileOverwrites\ExileClient_object_player_thread_safeZone.sqf"; // disable UAV/Bicycles in Safezone }; And created a folder called exileOverwrites in which there is now a exileOverwrites\ExileClient_object_player_thread_safeZone.sqf file with the rest of the code in it. I can still access the UAV terminal in the trader safe zone. Please can you assist? Share this post Link to post Share on other sites
Maaaaark 3 Report post Posted March 9, 2018 Nevermind, it was because I am an admin. Players can not use the UAV terminal in safe zones. Thank you for this script!! It is perfect! Share this post Link to post Share on other sites