From b36d94d9272b0dac68a5d67958427ed676e14505 Mon Sep 17 00:00:00 2001 From: "[GADD]Monkeynutz" Date: Wed, 20 Sep 2017 19:31:25 +0100 Subject: [PATCH] Added code for Combat Storing This file contains the code for the Combat Storing option. --- .../VirtualGarage/Functions/fn_allowVGStore.sqf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowVGStore.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowVGStore.sqf index bb23263..7e69055 100644 --- a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowVGStore.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_allowVGStore.sqf @@ -15,9 +15,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -private ["_res","_flag"]; +private ["_res","_flag","_cmon1","_cmon2","ExAd_STOP_COMBAT_STORING"]; + +_cmon1 = if (ExileClientPlayerIsInCombat && ExAd_STOP_COMBAT_STORING)exitWith{["ErrorTitleAndText", ["ExAd - Virtual Garage", "You cannot store Vehicles While in Combat!"]] call ExileClient_gui_toaster_addTemplateToast;}; + +_cmon2 = if (isNil "ExAdCurFlagNetId")exitWith{diag_log "ExAdClient: allowVGStore - ExAdCurFlagNetId is nil";false}; -if(isNil "ExAdCurFlagNetId")exitWith{diag_log "ExAdClient: allowVGStore - ExAdCurFlagNetId is nil";false}; _flag = objectFromNetId ExAdCurFlagNetId; _allowedVeh = _flag call ExAd_fnc_allowedVGVeh; @@ -25,4 +28,4 @@ _storedVeh = count (_flag getVariable ["ExAdVGVeh", []]); _res = if(_allowedVeh > _storedVeh)then{true}else{false}; -_res \ No newline at end of file +_res