Skip to content

Commit

Permalink
fix: isPlayerDead callback
Browse files Browse the repository at this point in the history
* Fix isPlayerDead callback

PlayerData.metadata.idead should be PlayerData.metadata.isdead to properly allow for players to be robbed while dead.

* Update interactions.lua
  • Loading branch information
solareon authored Nov 13, 2023
1 parent 26a2020 commit 7d04117
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/interactions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ RegisterNetEvent('police:client:DeEscort', function()
end)

RegisterNetEvent('police:client:GetKidnappedTarget', function(playerId)
if QBX.PlayerData.metadata.idead or QBX.PlayerData.metadata.inlaststand or QBX.PlayerData.metadata.ishandcuffed then
if QBX.PlayerData.metadata.isdead or QBX.PlayerData.metadata.inlaststand or QBX.PlayerData.metadata.ishandcuffed then
if not isEscorted then
isEscorted = true
local dragger = GetPlayerPed(GetPlayerFromServerId(playerId))
Expand Down
2 changes: 1 addition & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ end)
-- Callbacks
lib.callback.register('police:server:isPlayerDead', function(_, playerId)
local player = exports.qbx_core:GetPlayer(playerId)
return player.PlayerData.metadata.idead
return player.PlayerData.metadata.isdead
end)

lib.callback.register('police:GetPlayerStatus', function(_, playerId)
Expand Down

0 comments on commit 7d04117

Please sign in to comment.