mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
1.0.1.94 DEV BUILD
This commit is contained in:
39
SQF/dayz_code/compile/player_unlockDoor.sqf
Normal file
39
SQF/dayz_code/compile/player_unlockDoor.sqf
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
DayZ Unlock Door
|
||||
Usage: [_obj] call player_unlockDoor;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_ok"];
|
||||
|
||||
if(!isNull dayz_selectedDoor) then {
|
||||
|
||||
// our target
|
||||
_obj = dayz_selectedDoor;
|
||||
|
||||
// get object combination
|
||||
_objectCharacterID = _obj getVariable ["CharacterID","0"];
|
||||
|
||||
// Check combination
|
||||
if (DZE_Lock_Door == _objectCharacterID) then {
|
||||
|
||||
[player,"combo_unlock",0,false] call dayz_zombieSpeak;
|
||||
|
||||
// close display
|
||||
_display = findDisplay 41144;
|
||||
_display closeDisplay 3000;
|
||||
|
||||
// unlock if locked
|
||||
if(_obj animationPhase "Open_hinge" == 0) then {
|
||||
_obj animate ["Open_hinge", 1];
|
||||
};
|
||||
|
||||
} else {
|
||||
DZE_Lock_Door = "";
|
||||
[player,"combo_locked",0,false] call dayz_zombieSpeak;
|
||||
};
|
||||
} else {
|
||||
|
||||
// close display since no target
|
||||
_display = findDisplay 41144;
|
||||
_display closeDisplay 3000;
|
||||
};
|
||||
Reference in New Issue
Block a user