onUseWith

Getting triggered when player uses an item on target.

Prototypes
onUseWith(callback) -- callback = function(pos, itemId, target, subType)
Parameters
    • function(pos, itemId, target, subType): callback function
      • pos: item position object x, y and z.
      • itemId: client side item id.
      • target: the target for the item usage.
      • subType: integer
Usage
onUseWith(function(pos, itemId, target, subType)
	print(itemId .. " was used")
end)