Advertisement
Guest User

Untitled

a guest
May 30th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.10 KB | None | 0 0
  1. _object_inventory = {
  2.     private["_inventory","_previous","_key"];
  3.    
  4.         _isNormal = true;
  5.         if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
  6.             _isNormal = false;
  7.             _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
  8.         };
  9.         if (typeOf (_object)in DZE_DoorsLocked) then{
  10.             _isNormal = false;
  11.             _inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item
  12.         };
  13.  
  14.         if(_isNormal)then {
  15.             _inventory = [
  16.             getWeaponCargo _object,
  17.             getMagazineCargo _object,
  18.             getBackpackCargo _object,
  19.             _object getVariable["bankMoney",0],
  20.             _object getVariable["Loadouts",[]]
  21.             ];
  22.         };
  23.        
  24.         _previous = str(_object getVariable["lastInventory",[]]);
  25.         if (str(_inventory) != _previous) then {
  26.             _object setVariable["lastInventory",_inventory,true];
  27.             if (_objectID == "0") then {
  28.                 _key = format["CHILD:309:%1:%2:",_uid,_inventory];
  29.             } else {
  30.                 _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
  31.             };
  32.             //diag_log ("HIVE: WRITE: "+ str(_key));
  33.             _key call server_hiveWrite;
  34.         };
  35. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement