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

# Step completed

> Triggered when a step of a heist is completed.

Triggered when a step of a heist is completed.

```lua Event theme={null}
RegisterNetEvent("robberies_creator:heist:stepCompleted", function(playerId, heistId, stageId, stepType)

end)
```

### Parameters

| Name       | Data Type | Description                                                         |
| ---------- | --------- | ------------------------------------------------------------------- |
| `playerId` | integer   | Player server ID who completed the step                             |
| `heistId`  | integer   | Heist ID                                                            |
| `stageId`  | integer   | Stage ID                                                            |
| `stepType` | string    | The step type. Available step types are listed [below](#step-types) |

### Step types

* `SAFE`
* `ROBBABLE_OBJECT`
* `HACKABLE_PANEL`
* `THERMAL_CHARGE`
* `LOCKPICKABLE_DOOR`

## Example

```lua theme={null}
-- This hypothetical example will give xp when a player completes a step that has a minigame
RegisterNetEvent("robberies_creator:heist:stepCompleted", function(playerId, heistId, stageId, stepType)
    if(stepType ~= "ROBBABLE_OBJECT") then
        TriggerEvent("xp_script:addPlayerXp", playerId, 10)
    end
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)
- [On mission completed](/missions-creator/server/on-mission-completed.md)
- [Heist finished](/robberies-creator/server/heist-finished.md)
- [Pocket crafting finished](/drugs-creator/server/pocket-crafting-finished.md)
