GetIsPlayerDead added
Added GetIsPlayerDead to framework serverside. Needs testing on esx and qbox
This commit is contained in:
1 parent
df0dedd46c
commit
3c96d6a2bc
3 files changed
+20
No files matched your search
@@ -134,6 +134,12 @@ Framework.GetStatus = function(src, column)
|
|||||||
return xPlayer.get(column) or nil
|
return xPlayer.get(column) or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Framework.GetIsPlayerDead = function(src)
|
||||||
|
local xPlayer = ESX.GetPlayerFromId(src)
|
||||||
|
if not xPlayer then return end
|
||||||
|
return xPlayer.get("is_dead") or false
|
||||||
|
end
|
||||||
|
|
||||||
-- Framework.AddThirst(src, value)
|
-- Framework.AddThirst(src, value)
|
||||||
-- Adds the specified value from the player's thirst level.
|
-- Adds the specified value from the player's thirst level.
|
||||||
Framework.AddThirst = function(src, value)
|
Framework.AddThirst = function(src, value)
|
||||||
|
|||||||
@@ -253,6 +253,13 @@ Framework.GetHunger = function(src)
|
|||||||
return newHunger
|
return newHunger
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Framework.GetIsPlayerDead = function(src)
|
||||||
|
local player = QBCore.Functions.GetPlayer(src)
|
||||||
|
if not player then return end
|
||||||
|
local playerData = player.PlayerData
|
||||||
|
return playerData.metadata.isdead or false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
---This will get the thirst of a player
|
---This will get the thirst of a player
|
||||||
---@param src any
|
---@param src any
|
||||||
|
|||||||
@@ -218,6 +218,13 @@ Framework.GetHunger = function(src)
|
|||||||
return newHunger
|
return newHunger
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Framework.GetIsPlayerDead = function(src)
|
||||||
|
local player = QBox:GetPlayer(src)
|
||||||
|
if not player then return end
|
||||||
|
local playerData = player.PlayerData
|
||||||
|
return playerData.metadata.isdead or false
|
||||||
|
end
|
||||||
|
|
||||||
---This will return the players thirst level.
|
---This will return the players thirst level.
|
||||||
---@param src number
|
---@param src number
|
||||||
---@return number
|
---@return number
|
||||||
|
|||||||
Reference in new issue
Block a user