> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Has item

> Comprueba si un inventario tiene un ítem específico.

Comprueba si un inventario tiene un ítem específico.

<CodeGroup>
  ```lua Export theme={null}
  exports['jaksam_inventory']:hasItem(inventoryId, itemName, quantity)
  ```

  ```lua Example theme={null}
  -- Comprueba si el jugador tiene 5 panes
  local hasItem = exports['jaksam_inventory']:hasItem(1, 'bread', 5)

  if hasItem then
      -- Seguro para eliminar ítems
      exports['jaksam_inventory']:removeItem(1, 'bread', 5)
  end
  ```
</CodeGroup>

### Parámetros

| Nombre | Tipo de dato | Descripción |
| - | - | - |
| `inventoryId` | string \| number | El ID del inventario a comprobar |
| `itemName` | string | El nombre del ítem a comprobar |
| `quantity` | number | Cuántos ítems comprobar. Por defecto es 1 |

### Valor de retorno

| Nombre | Tipo de dato | Descripción |
| - | - | - |
| `boolean` | boolean | True si el inventario tiene el ítem, false si no |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.