> ## 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.

# Save dirty inventory

> Guarda un inventario específico en la base de datos si ha sido modificado.

Guarda un inventario específico en la base de datos si ha sido modificado.

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

  ```lua Example theme={null}
  -- Guarda un inventario específico
  exports['jaksam_inventory']:saveDirtyInventory('police_stash_1')

  -- Guarda el inventario del jugador tras cambios importantes
  local success = exports['jaksam_inventory']:saveDirtyInventory(1)
  if not success then
      print('Failed to save inventory')
  end
  ```
</CodeGroup>

### Parámetros

| Nombre | Tipo de dato | Descripción |
| - | - | - |
| `inventoryId` | string \| number | El ID del inventario a guardar |

### Valor de retorno

| Nombre | Tipo de dato | Descripción |
| - | - | - |
| `success` | boolean | True si el inventario se guardó correctamente |


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