#include "..\script_component.hpp" /* * Author: IDSolutions * Handles the delivery timer and locker updates for purchased items * * Arguments: * 0: New Locker Contents * * Returns: * None * * Example: * [_newLocker] spawn forge_store_fnc_handleDelivery * * Public: No */ params [["_newLocker", [], [[]]]]; private _deliveryTime = ["DT", 0] call BIS_fnc_getParamValue; if (_newLocker isEqualTo []) exitWith {}; if (_deliveryTime > 0) then { [ format [ "Order Processing
Estimated delivery: %1", [_deliveryTime, "MM:SS"] call BIS_fnc_secondsToString ], "info", 3, "right" ] call EFUNC(misc,notify); uiSleep (_deliveryTime / 2); [ "Package in transit", "warning", 2, "left" ] call EFUNC(misc,notify); uiSleep (_deliveryTime / 2); SETPVAR(player,FORGE_Locker,_newLocker); [ "Order Delivered!
Check your locker", "success", 5, "left" ] call EFUNC(misc,notify); if (hasInterface) then { playSound "FD_Finish_F"; }; } else { SETPVAR(player,FORGE_Locker,_newLocker); [ "Order Complete!
Items added to locker", "success", 5, "left" ] call EFUNC(misc,notify); if (hasInterface) then { playSound "FD_Finish_F"; }; };