[Help] Disable Auto HP Regeneration

Hello.

Is there a possibility to disable automatic health regeneration system from GTA V?

1 Like

SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)

6 Likes

Thank you very much :slight_smile:

where do i but that?

Create a Citizen.Thread and a boolean, execute the command then set to boolean to true(or false, depending on how you use it) so it doesn’t activate again.

I tried it but didn’t work. Please help.

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(1)
		SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
	end
end)

on a client side script, like ambulance job right near the top put in.
Citizen.CreateThread(function()
Citizen.Wait(0)
SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
end)

1 Like

where i put it ?

any were in a Client script :smiley:

i put it in client ambulancejob and dont work please help me to solve it :frowning:

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(1)
		SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
	end
end)

I have it working on my server i did put his is ambulance client main lua scrip

1 Like

please for the love of god don’t do Citizen.Wait(1) unless its something really essential… your server will eventually be unusable… in this case Citizen.Wait(1000) is more than enough

I do one and i have no problems :slight_smile:

I’m pretty sure this doesn’t need to be in a loop at all - just set once when the playerped is spawned and it should take effect for the whole session. It’s not documented properly in the natives reference, though, so that’s something to test locally first.

1 Like

why do you say this?

im just curious as to what the difference is i am new to coding so i just want to know what will be the issue and if i should in fact change it thank you :slight_smile:

1 Like

Testing shows this doesn’t seem to be needed to put in a loop at all just for anyone wondering.

1 Like

ty bro

1 Like