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