fi_inventory

Handle inventory

object GetItemFromInventory(object oTarget, string sTag);
Parameters:
  • oTarget – Target inventory

  • sTag – Tag of item to search for

Returns:

The item

Return object with given tag

void DestroyInventory(object oTarget, float fDelay = 0.0f);
Parameters:
  • oTarget – Target inventory

  • fDelay – Delay before deletion

Destroy oTarget inventory (irrevocably).

int HasItemInInventory(object oTarget, string sTag)
Parameters:
  • oTarget – Target inventory

  • sTag – Tag of item to search for

Returns:

Boolean

Return TRUE if object with given tag exists in inventory

int CountItemsInInventory(object oTarget, string sTag);
Parameters:
  • oTarget – Target inventory

  • sTag – Tag of item to search for

Returns:

Total count

Returns count of objects with given tag

void DestroyItemInInventory(object oTarget, string sTag, int nCount = 1);
Parameters:
  • oTarget – Target inventory

  • nCount – Maximum number of items to destroy

  • sTag – Tag of item to search for

Returns count of objects with given tag