Revert to previous code for lock and unlock safes

Should fix dupe issues introduced with that newer system
This commit is contained in:
[VB]AWOL
2014-05-07 09:44:41 -05:00
parent 6193106f7f
commit e1577bc4f3
3 changed files with 20 additions and 62 deletions

View File

@@ -882,48 +882,3 @@ server_spawnCleanAnimals = {
diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]);
};
};
server_getLocalObjVars = {
private ["_player","_obj","_objectID","_objectUID","_weapons","_magazines","_backpacks"];
_player = _this select 0;
_obj = _this select 1;
if (isNull _player or isNull _obj) exitWith { diag_log format["ERROR: getLocalObjVars is Null Player: %1 Object: %2 ", _player, _obj] };
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
_weapons = _obj getVariable ["WeaponCargo", false];
_magazines = _obj getVariable ["MagazineCargo", false];
_backpacks = _obj getVariable ["BackpackCargo", false];
PVDZE_localVarsResult = [_weapons,_magazines,_backpacks];
(owner _player) publicVariableClient "PVDZE_localVarsResult";
diag_log format["SAFE UNLOCKED: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player)];
};
server_setLocalObjVars = {
private ["_obj","_holder","_weapons","_magazines","_backpacks","_player","_objectID","_objectUID"];
_obj = _this select 0;
_holder = _this select 1;
_player = _this select 2;
if (isNull _player or isNull _holder or isNull _obj) exitWith { diag_log format["ERROR: setLocalObjVars is Null Player: %1 Object: %2 Holder: %3", _player, _obj, _holder] };
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
_weapons = getWeaponCargo _obj;
_magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj;
deleteVehicle _obj;
_holder setVariable ["WeaponCargo", _weapons];
_holder setVariable ["MagazineCargo", _magazines];
_holder setVariable ["BackpackCargo", _backpacks];
diag_log format["SAFE LOCKED: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player)];
};