mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
add logging method for lock/unlock
This commit is contained in:
@@ -43,9 +43,8 @@ _pos = _obj getVariable["OEMPos",(getposATL _obj)];
|
||||
|
||||
if(!isNull _obj) then {
|
||||
|
||||
//force vault save just before locking
|
||||
PVDZE_veh_Update = [_obj,"gear"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
PVDZE_log_lockUnlock = [player, _obj,true];
|
||||
publicVariableServer "PVDZE_log_lockUnlock";
|
||||
|
||||
//place vault
|
||||
_holder = createVehicle [_lockedClass,_pos,[], 0, "CAN_COLLIDE"];
|
||||
|
||||
@@ -58,6 +58,9 @@ if ((_ownerID == dayz_combination) or (_ownerID == dayz_playerUID)) then {
|
||||
|
||||
if(!isNull _obj and alive _obj) then {
|
||||
|
||||
PVDZE_log_lockUnlock = [player, _obj, false];
|
||||
publicVariableServer "PVDZE_log_lockUnlock";
|
||||
|
||||
_obj setVariable["packing",1];
|
||||
[1,1] call dayz_HungerThirst;
|
||||
_weapons = _obj getVariable["WeaponCargo",[]];
|
||||
|
||||
@@ -70,8 +70,7 @@ if (isServer) then {
|
||||
"PVDZE_plr_TradeMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
|
||||
"PVDZE_plr_DeathB" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
|
||||
|
||||
"PVDZE_obj_getlocalVars" addPublicVariableEventHandler {(_this select 1) spawn server_getLocalObjVars};
|
||||
"PVDZE_obj_setlocalVars" addPublicVariableEventHandler {(_this select 1) spawn server_setLocalObjVars};
|
||||
"PVDZE_log_lockUnlock" addPublicVariableEventHandler {(_this select 1) spawn server_logUnlockLockEvent};
|
||||
};
|
||||
|
||||
//Client only
|
||||
|
||||
@@ -882,3 +882,20 @@ server_spawnCleanAnimals = {
|
||||
diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]);
|
||||
};
|
||||
};
|
||||
|
||||
server_logUnlockLockEvent = {
|
||||
private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_status"];
|
||||
_player = _this select 0;
|
||||
_obj = _this select 1;
|
||||
_status = _this select 2;
|
||||
if (!isNull(_obj)) then {
|
||||
_objectID = _obj getVariable["ObjectID", "0"];
|
||||
_objectUID = _obj getVariable["ObjectUID", "0"];
|
||||
_statusText = "UNLOCKED"
|
||||
if (_status) then {
|
||||
[_obj, "gear"] call server_updateObject;
|
||||
_statusText = "LOCKED"
|
||||
};
|
||||
diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player), _statusText];
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user