is logged in

This commit is contained in:
Atikur Rahaman Santo
2021-11-26 19:37:53 +06:00
committed by GitHub
parent 1013a14b37
commit 07b2107898
+3 -3
View File
@@ -1,7 +1,7 @@
CreateThread(function()
while true do
Wait(0)
if LocalPlayer.state['isLoggedIn'] then
if LocalPlayer.state.isLoggedIn then
Wait((1000 * 60) * QBCore.Config.UpdateInterval)
TriggerServerEvent('QBCore:UpdatePlayer')
end
@@ -11,7 +11,7 @@ end)
CreateThread(function()
while true do
Wait(QBCore.Config.StatusInterval)
if LocalPlayer.state['isLoggedIn'] then
if LocalPlayer.state.isLoggedIn then
if QBCore.Functions.GetPlayerData().metadata['hunger'] <= 0 or
QBCore.Functions.GetPlayerData().metadata['thirst'] <= 0 then
local ped = PlayerPedId()
@@ -20,4 +20,4 @@ CreateThread(function()
end
end
end
end)
end)