fix(server/events/player): Position

Position was not updating on player dropped but was on player save event.
This commit is contained in:
GhzGarage
2021-09-25 18:31:28 -05:00
parent 5555cd6662
commit 34c574daf2
3 changed files with 4 additions and 4 deletions
-2
View File
@@ -122,10 +122,8 @@ end)
RegisterNetEvent('QBCore:UpdatePlayer', function()
local src = source
local ped = GetPlayerPed(src)
local Player = QBCore.Functions.GetPlayer(src)
if Player then
Player.PlayerData.position = GetEntityCoords(ped)
local newHunger = Player.PlayerData.metadata['hunger'] - QBCore.Config.Player.HungerRate
local newThirst = Player.PlayerData.metadata['thirst'] - QBCore.Config.Player.ThirstRate
if newHunger <= 0 then newHunger = 0 end