From d2baaeef9c34dfe251ff3eaa8adf409f43a08c30 Mon Sep 17 00:00:00 2001 From: Antony <97451137+TonybynMp4@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:37:49 +0100 Subject: [PATCH] feat(server/main.lua): Replicate isDead to statebag (#73) The isDead statebag is used by pma-voice to disable the radio. (it could also be used for other things i guess) --- server/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/server/main.lua b/server/main.lua index 895c26b..5e9f80d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -33,6 +33,7 @@ AddStateBagChangeHandler(DEATH_STATE_STATE_BAG, nil, function(bagName, _, value) local player = exports.qbx_core:GetPlayer(playerId) player.Functions.SetMetaData('isdead', value == sharedConfig.deathState.DEAD) player.Functions.SetMetaData('inlaststand', value == sharedConfig.deathState.LAST_STAND) + Player(playerId).state:set("isDead", value == sharedConfig.deathState.DEAD or value == sharedConfig.deathState.LAST_STAND, true) end) ---@param player table|number