mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 08:13:22 +00:00
Replace PlayerPed
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user