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

> Speichert ein bestimmtes Inventar in der Datenbank, falls es geändert wurde.

Speichert ein bestimmtes Inventar in der Datenbank, falls es geändert wurde.

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

  ```lua Example theme={null}
  -- Bestimmtes Inventar speichern
  exports['jaksam_inventory']:saveDirtyInventory('police_stash_1')

  -- Spieler-Inventar nach wichtigen Änderungen speichern
  local success = exports['jaksam_inventory']:saveDirtyInventory(1)
  if not success then
      print('Failed to save inventory')
  end
  ```
</CodeGroup>

### Parameter

| Name          | Datentyp         | Beschreibung                         |
| ------------- | ---------------- | ------------------------------------ |
| `inventoryId` | string \| number | Die ID des zu speichernden Inventars |

### Rückgabewert

| Name      | Datentyp | Beschreibung                                           |
| --------- | -------- | ------------------------------------------------------ |
| `success` | boolean  | True, falls das Inventar erfolgreich gespeichert wurde |


## Related topics

- [Save dirty inventories](/de/jaksam-inventory/functions/server/save-dirty-inventories.md)
- [Server](/de/jaksam-inventory/functions/server/index.md)
- [Commands](/de/jaksam-inventory/guides/commands.md)
- [Inventory created](/de/jaksam-inventory/hooks/on-inventory-created.md)
- [Get inventory](/de/jaksam-inventory/functions/client/get-inventory.md)
