mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Merge pull request #918 from DuoTheDev:main
Fix Taking Damage in Last Stand due to Hunger
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ end)
|
||||
CreateThread(function()
|
||||
while true do
|
||||
if LocalPlayer.state.isLoggedIn then
|
||||
if (QBCore.PlayerData.metadata['hunger'] <= 0 or QBCore.PlayerData.metadata['thirst'] <= 0) and not QBCore.PlayerData.metadata['isdead'] then
|
||||
if (QBCore.PlayerData.metadata['hunger'] <= 0 or QBCore.PlayerData.metadata['thirst'] <= 0) and not (QBCore.PlayerData.metadata['isdead'] or QBCore.PlayerData.metadata["inlaststand"]) then
|
||||
local ped = PlayerPedId()
|
||||
local currentHealth = GetEntityHealth(ped)
|
||||
local decreaseThreshold = math.random(5, 10)
|
||||
|
||||
Reference in New Issue
Block a user