The commands and key bindings players use, and the exports and events for connecting Deathmatch to your own scripts.
Commands and Key Bindings#
Command | Default key | What it does |
|---|---|---|
| E | Opens the lobby menu within 10 meters of the entrance, or anywhere with |
| Mouse wheel up | While dead in a match, spectate the next living teammate. |
|
All three are FiveM key bindings — Deathmatch Menu, Deathmatch MS Up and Deathmatch MS Down — so players can change them in Settings → Key Bindings → FiveM. To open the menu from your own script, such as an NPC or a target option:
ExecuteCommand('dmopen')
dmquitis an internal developer command, not a supported way to leave a match. Players leave a lobby with Leave; a match ends when a team wins or the timer runs out.
Client Exports#
IsPlayerInDM#
Returns true if the local player is in a running match.
if exports['qs-deathmatch']:IsPlayerInDM() then
print('Player is in a Deathmatch match')
endGetData#
Returns the local match state.
local data = exports['qs-deathmatch']:GetData()
print(data.InPB, data.LobbyId, data.TeamID, data.MapName)Field | Type | Description |
|---|---|---|
| boolean | true while in a match. |
| number | Current lobby, -1 when none. |
| number | 1 Ice team, 2 Fire team, 0 outside a match. |
Server Exports#
IsPlayerInDM#
Returns true if the given player is in a running match. Useful to block jobs, robberies, shops or commands during a game.
if exports['qs-deathmatch']:IsPlayerInDM(source) then
print('Player: ' .. source .. ' is in a Deathmatch match')
endClient Events#
Triggered locally on the player's client. Listen with AddEventHandler.
Event | Arguments | When |
|---|---|---|
| state (boolean) | true when the match starts, false when it ends. |
| — | At the start of every round. |
| — |
local inDeathmatch = false
AddEventHandler('deathmatch:inDeathmatch', function(state)
inDeathmatch = state
end)deathmatch:GetPBData#
The event version of GetData, with a callback.
TriggerEvent('deathmatch:GetPBData', function(data)
print(data.InPB)
end)deathmatch:ShowMessage#
Shows the big GTA shard message Deathmatch uses. The second argument is how many frames it stays on screen (400 by default).
TriggerEvent('deathmatch:ShowMessage', 'Get ready!', 200)

