From fb1f18ec4789f88c1604a4e8f16d4c02fbc23638 Mon Sep 17 00:00:00 2001 From: ArturMichalak Date: Thu, 30 May 2024 21:47:10 +0200 Subject: [PATCH] feat: food, water and stress from statebag --- server/main.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/main.lua b/server/main.lua index be870aa..96a222c 100644 --- a/server/main.lua +++ b/server/main.lua @@ -214,9 +214,9 @@ lib.callback.register('qbx_admin:server:getPlayers', function(source) id = k, cid = v.PlayerData.citizenid, name = v.PlayerData.charinfo.firstname .. ' ' .. v.PlayerData.charinfo.lastname .. ' | (' .. GetPlayerName(k) .. ')', - food = v.PlayerData.metadata.hunger, - water = v.PlayerData.metadata.thirst, - stress = v.PlayerData.metadata.stress, + food = Player(v.PlayerData.source).state.hunger, + water = Player(v.PlayerData.source).state.thirst, + stress = Player(v.PlayerData.source).state.stress, armor = v.PlayerData.metadata.armor, phone = v.PlayerData.charinfo.phone, craftingrep = v.PlayerData.metadata.craftingrep, @@ -242,9 +242,9 @@ lib.callback.register('qbx_admin:server:getPlayer', function(source, playerToGet id = playerToGet, cid = playerData.citizenid, name = playerData.charinfo.firstname .. ' ' .. playerData.charinfo.lastname .. ' | (' .. GetPlayerName(playerToGet) .. ')', - food = playerData.metadata.hunger, - water = playerData.metadata.thirst, - stress = playerData.metadata.stress, + food = Player(playerData.source).state.hunger, + water = Player(playerData.source).state.thirst, + stress = Player(playerData.source).state.stress, armor = playerData.metadata.armor, phone = playerData.charinfo.phone, craftingrep = playerData.metadata.craftingrep,