#Question

1 messages · Page 1 of 1 (latest)

mortal dust
#

So this is a support thing but got told to ask here.

Wouldn't it make more sense for drink and food drain to only happen when not dead?

Right now food and drink drain no matter what as long as logged in, that doesn't really make sense

kindred fern
#

Hi. Sorry but Im having a real hard time understanding your question.

Do you mean "while dead" you meant logged off ?

mortal dust
#

No like literally dead, if you take damage in game, and you bleed out, and die

#
CreateThread(function()
    while true do
        local sleep = 0
        if LocalPlayer.state.isLoggedIn then
            sleep = (1000 * 60) * QBCore.Config.UpdateInterval
            TriggerServerEvent('QBCore:UpdatePlayer')
        end
        Wait(sleep)
    end
end)

like this here, wouldnt it be better to run if logged in and not dead