Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _object_inventory = {
- private["_inventory","_previous","_key"];
- _isNormal = true;
- if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
- _isNormal = false;
- _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
- };
- if (typeOf (_object)in DZE_DoorsLocked) then{
- _isNormal = false;
- _inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item
- };
- if(_isNormal)then {
- _inventory = [
- getWeaponCargo _object,
- getMagazineCargo _object,
- getBackpackCargo _object,
- _object getVariable["bankMoney",0],
- _object getVariable["Loadouts",[]]
- ];
- };
- _previous = str(_object getVariable["lastInventory",[]]);
- if (str(_inventory) != _previous) then {
- _object setVariable["lastInventory",_inventory,true];
- if (_objectID == "0") then {
- _key = format["CHILD:309:%1:%2:",_uid,_inventory];
- } else {
- _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
- };
- //diag_log ("HIVE: WRITE: "+ str(_key));
- _key call server_hiveWrite;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement