# Integrate with death scripts

**Dont worry, we'll fix that !**

## How to integrate to your death script ?

{% hint style="info" %}
if your death/revive script is using a CLIENT side logic, follow these steps, else jump to the next hint &#x20;
{% endhint %}

* [ ] Find the code part which revives the player inside the death script
* [ ] Paste this line in the event `TriggerServerEvent("dismember:server:resetCommand")`
* [ ] Save and restart the death script

This should look like this now&#x20;

```lua
RegisterNetEvent("MyDeathScript:revive")
AddEventHandler("MyDeathScript:revive", function()
    -- Blahblahblah
    -- Whatever the code is already doing
    TriggerServerEvent("dismember:server:resetCommand")
end)
```

{% hint style="info" %}
if your death/revive script is using a SERVER side logic, follow these :&#x20;
{% endhint %}

* [ ] Find the code part which revives the player inside the death script
* [ ] Paste this line in the event `TriggerClientEvent("dismember:client:resetDismember", -1, netId)`
* [ ] `netId` needs to be the server id of the player to revive, or the source of the event
* [ ] Save and restart the death script

The code should now look like this&#x20;

```lua
RegisterNetEvent("MyDeathScript:revive")
AddEventHandler("MyDeathScript:revive", function(source)
    -- Blahblahblah
    -- Whatever the code is already doing
    TriggerClientEvent("dismember:client:resetDismember", -1, source)
end)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pingouin.dev/scripts-docs/decapitation-script/integrate-with-death-scripts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
