Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- missionNamespace setVariable ["approvedList", [WSL, ASL, WS1, WS2, WS3, WS4]];
- missionNamespace setVariable [
- "fnc_closeInventory",
- {
- [] spawn {
- waitUntil { !isNull findDisplay 602 };
- closeDialog 0;
- hint "Access denied";
- };
- }
- ];
- this addEventHandler [
- "ContainerOpened",
- {
- params ["_container", "_unit"];
- private _approved = missionNamespace getVariable ["approvedList", []];
- private _fnc = missionNamespace getVariable "fnc_closeInventory";
- private _isAdmin = serverCommandAvailable "#kick";
- private _isZeus = (allCurators findIf {getAssignedCuratorUnit _x isEqualTo _unit}) > -1;
- if (!(_unit in _approved) && !_isZeus && !_isAdmin && (_unit == player)) then {
- call _fnc;
- };
- }
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement