Skip to content

function hasItem (client-side)

Available since version: 0.3.9.0

The function is used to retrieve the amount of the item the player/npc currently has.

Declaration

int hasItem(int id, Item item)

Parameters

  • int id: the player id.
  • Item item: the item object. For more information see Item class.

Returns int

the item amount that player/npc currently has in inventory or 0 if player doesn't have the item.