> For the complete documentation index, see [llms.txt](https://peppesess.gitbook.io/fenix-development-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://peppesess.gitbook.io/fenix-development-documentation/resources/fnx-matchmaking.md).

# fnx-matchmaking

how can i setup the match with my death system?

### Our export

Server and Client side&#x20;

```
local pim = export:["fenix-matchmaking"].PlayerInMatch() -- check if the player is in a match
local pinm = export:["fenix-matchmaking"].PlayerInMatchMaking() - check if the player is in the matchmaking
```

### How can i set it for my death system?

all must be client side, when your player die.

```
local PlayerInMatch = export:["fenix-matchmaking"].PlayerInMatch()

if PlayerInMatch then
    TriggerServerEvent("fenix-matchmaking:ImDead")
    TriggerServerEvent("fenix-matchmaking:Updatestats") 
else
    -- Your death system 
end
```

### How can i set it for ambulancejob?

edit your onplayerdeath handler with this:

```
AddEventHandler('esx:onPlayerDeath', function(data)
    local inMatch = exports["fenix-matchmaking"].PlayerInMatch()
    if  not inMatch then
        OnPlayerDeath()
    end
end)
```

photo example

![](https://807306352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYyUqsAFg0fc2f2rIKA9A%2Fuploads%2Frma0YcIQcQFQlkDLUmm4%2Fimage.png?alt=media\&token=e4e803a3-2457-4469-9ec2-df9bbab818ae)

### How can  i set it for fnx-deathsystem?

edit the client of the death system and add this lines

```
local inMatch = exports["fenix-matchmaking"].PlayerInMatch()

if  not inMatch then
    TriggerServerEvent("fnx-death_system:updatedeath",true)
end
```

photo example

![](https://807306352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYyUqsAFg0fc2f2rIKA9A%2Fuploads%2FSMp1Nps3nGwMA6PwLktQ%2Fimage.png?alt=media\&token=61a5da5b-06ab-43a0-bfb5-5d04b577b1fa)
