Replace PlayerPed

This commit is contained in:
GhzGarage
2021-04-02 22:26:42 -05:00
parent 3948415301
commit be3e23ec93
3 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ Citizen.CreateThread(function()
Citizen.Wait(math.random(3000, 5000))
if isLoggedIn then
if QBCore.Functions.GetPlayerData().metadata["hunger"] <= 0 or QBCore.Functions.GetPlayerData().metadata["thirst"] <= 0 then
local ped = GetPlayerPed(-1)
local ped = PlayerPedId()
local currentHealth = GetEntityHealth(ped)
SetEntityHealth(ped, currentHealth - math.random(5, 10))