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

# Heist finished

> Triggered when a heist is completed.

Triggered when a heist is completed (the same moment the server console logs `"Heist has been completed"`).

```lua Event theme={null}
RegisterNetEvent("robberies_creator:heist:heistFinished", function(heistId)

end)
```

### Parameters

| Name      | Data Type | Description     |
| --------- | --------- | --------------- |
| `heistId` | integer   | ID of the heist |

## Example

```lua theme={null}
RegisterNetEvent("robberies_creator:heist:heistFinished", function(heistId)
    -- just an example, will do nothing useful, you may want to retrieve data from the database

    print("Heist with ID " .. heistId .. " is finished")
end)
```

<Note>
  Place this code in the file `integrations/sv_integrations.lua` of the script, at the bottom of the file on new lines.
</Note>


## Related topics

- [Server](/robberies-creator/server/index.md)
- [Heist started](/robberies-creator/server/heist-started.md)
- [Pocket crafting finished](/drugs-creator/server/pocket-crafting-finished.md)
- [FAQ](/robberies-creator/faq.md)
- [How to start](/missions-creator/how-to-start.md)
