mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-27 02:01:49 +03:00
Add dayz_authKey for safes and lockboxes
Safes and Lockboxes got updated and need dayz_authKey now. Also improved the logging of codes and who has used which codes in the logs for server admins.
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
Usage: _obj spawn player_unlockVault;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_obj","_ownerID","_playerNear","_text","_objType","_ComboMatch"];
|
||||
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_code","_unlockedClass","_obj","_ownerID","_text","_objType","_ComboMatch"];
|
||||
|
||||
{player removeAction _x} count s_player_combi;
|
||||
s_player_combi = [];
|
||||
s_player_unlockvault = 1;
|
||||
@@ -36,21 +36,23 @@ if (_ComboMatch || (_ownerID == dayz_playerUID)) then {
|
||||
dayz_lastCodeFail = 0;
|
||||
|
||||
[_unlockedClass,objNull] call fn_waitForObject;
|
||||
|
||||
|
||||
if (_unlockedClass == "LockboxStorage") then {
|
||||
[player,"lockboxopen",0,false] call dayz_zombieSpeak;
|
||||
} else {
|
||||
[player,"safeopen",0,false] call dayz_zombieSpeak;
|
||||
};
|
||||
|
||||
PVDZE_handleSafeGear = [player,_obj,0];
|
||||
_code = [_obj getVariable["CharacterID","0"],dayz_combination] select (_ComboMatch);
|
||||
|
||||
PVDZE_handleSafeGear = [player,_obj,0,_code,dayz_authKey];
|
||||
publicVariableServer "PVDZE_handleSafeGear";
|
||||
|
||||
waitUntil {!isNil "dze_waiting"}; // wait for response from server to verify safe was logged before proceeding
|
||||
|
||||
format[localize "STR_BLD_UNLOCKED",_text] call dayz_rollingMessages;
|
||||
} else {
|
||||
PVDZE_handleSafeGear = [player,_obj,3,dayz_combination];
|
||||
PVDZE_handleSafeGear = [player,_obj,3,dayz_combination,dayz_authKey];
|
||||
publicVariableServer "PVDZE_handleSafeGear";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
|
||||
Reference in New Issue
Block a user