Guest User

Untitled

a guest
Jul 2nd, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.51 KB | None | 0 0
  1. if !(alive player) exitWith {};
  2. private _checkLock = 0;
  3. private _door = [objNull, 0];
  4. _checkLock = _door getVariable [format ["bis_disabled_%1", _door], 0];
  5.  
  6. if (cursorTarget isKindOf "house" && _checkLock == 1 && !isNull cursorTarget && player distance _door <= 1) then { //&& [cursorTarget] call BIS_fnc_isBuildingEnterable;
  7.     _door setVariable [format ["bis_disabled_%1", _door], 0, true];
  8.     player playAnimation kick;
  9.     [_door] call BIS_fnc_DoorOpen;
  10. };
  11. else {
  12.   exitWith {hint "Door is unlocked."};
  13. };
Add Comment
Please, Sign In to add comment