Closed xhackax47 closed 2 years ago
I just noticed the regen is fastest when i dont move but continue whatever i do/did Someone know how i can disable this? Ever noticed the "SetPlayerHealthRechargeMultiplier(player, 0.0) and SetPlayerHealthRechargeLimit(player, 0.0) so i dont understand
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
exports.spawnmanager:setAutoSpawn(false)
local ped = PlayerPedId()
local player = PlayerId()
CreateThread(function()
Wait(5000)
SetEntityMaxHealth(ped, 200)
SetEntityHealth(ped, 200)
SetPlayerHealthRechargeMultiplier(player, 0.0)
SetPlayerHealthRechargeLimit(player, 0.0)
end)
CreateThread(function()
Wait(1000)
QBCore.Functions.GetPlayerData(function(PlayerData)
PlayerJob = PlayerData.job
onDuty = PlayerData.job.onduty
SetPedArmour(PlayerPedId(), PlayerData.metadata["armor"])
if (not PlayerData.metadata["inlaststand"] and PlayerData.metadata["isdead"]) then
deathTime = Laststand.ReviveInterval
OnDeath()
DeathTimer()
elseif (PlayerData.metadata["inlaststand"] and not PlayerData.metadata["isdead"]) then
SetLaststand(true)
else
TriggerServerEvent("hospital:server:SetDeathStatus", false)
TriggerServerEvent("hospital:server:SetLaststandStatus", false)
end
if PlayerJob.name == 'ambulance' and onDuty then
TriggerServerEvent("hospital:server:AddDoctor", PlayerJob.name)
end
end)
end)
end)
Describe the bug When every player go under 50% of health with injury, it automatically regen to 50% always until the player disconnect.
To Reproduce Steps to reproduce the behavior:
Expected behavior Just not automatically regen?
Screenshots Moment of death (0% health) Last stand (50% health) Death stand (100% health)
Questions (please complete the following information):
qb-
to something custom? [e.g. yes/no] no