Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basicneeds #2

Open
Velkostatkar opened this issue Oct 20, 2021 · 0 comments
Open

Basicneeds #2

Velkostatkar opened this issue Oct 20, 2021 · 0 comments

Comments

@Velkostatkar
Copy link

Hello , do I need esx_basicneeds with this renzu_status?

I am maybe blind but I have no idea where is error becouse as I check it its all OK but I get this to F8
image

Basicneeds aroud line 54:#

AddEventHandler('esx_status:onTick', function(data)
	local playerPed  = PlayerPedId()
	local prevHealth = GetEntityHealth(playerPed)
	local health     = prevHealth
	
	for k, v in pairs(data) do
		

########## if v.name == 'hunger' and v.percent == 0 then
			if prevHealth <= 150 then
				health = health - 5
			else
				health = health - 1
			end
		elseif v.name == 'thirst' and v.percent == 0 then
			if prevHealth <= 150 then
				health = health - 5
			else
				health = health - 1
			end
		end
	end
	
	if health ~= prevHealth then SetEntityHealth(playerPed, health) end
end)

Renzu_status line around 81#

CreateThread(function()
	while not Statusregistered do
		Wait(2000)
	end
	while true do
		if Config.OnTick_Value_only then

#############			TriggerEvent('esx_status:onTick', GetStatus(Config.register_status))


		else
			TriggerEvent('esx_status:onTick', GetStatusData(true))
		end
		Wait(Config.TickTime)
	end
end)

am I blind?
Please help
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant