From ffc128118722495438b860a7d4d9edc5e7c3f6bb Mon Sep 17 00:00:00 2001 From: Jacob Hansen <89487861+JHansen2000@users.noreply.github.com> Date: Thu, 20 Jun 2024 01:07:40 -0400 Subject: [PATCH] Update main.lua --- client/main.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/main.lua b/client/main.lua index b94e744..910a405 100644 --- a/client/main.lua +++ b/client/main.lua @@ -42,6 +42,12 @@ end) function SetDeathState(deathState) playerState:set(DEATH_STATE_STATE_BAG, deathState, true) DeathState = deathState + + local playerData = QBX.PlayerData + playerData.metadata['isdead'] = (deathState == sharedConfig.deathState.DEAD) + playerData.metadata['inlaststand'] = (deathState == sharedConfig.deathState.LAST_STAND) + TriggerServerEvent('qb-core:server:SetMetaData', 'isdead', playerData.metadata['isdead']) + TriggerServerEvent('qb-core:server:SetMetaData', 'inlaststand', playerData.metadata['inlaststand']) end BleedTickTimer, AdvanceBleedTimer = 0, 0