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

Add this to disable autorespawn of sessionmanager #6

Closed
PokeSer opened this issue Dec 17, 2019 · 1 comment
Closed

Add this to disable autorespawn of sessionmanager #6

PokeSer opened this issue Dec 17, 2019 · 1 comment

Comments

@PokeSer
Copy link

PokeSer commented Dec 17, 2019

Hi, I suggest deactivating the autorespawn that conflicts with sessionmanager.

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0) -- DO NOT REMOVE
		local pl = Citizen.InvokeNative(0x217E9DC48139933D)
		while Citizen.InvokeNative(0x2E9C3FCB6798F397, pl) do
			Citizen.Wait(0) -- DO NOT REMOVE
			local timer = GetGameTimer()+Config.RespawnTime
			while timer >= GetGameTimer() do
				if respawned == false then
					Citizen.Wait(0) -- DO NOT REMOVE
					Citizen.InvokeNative(0xFA08722A5EA82DA7, Config.Timecycle)
					Citizen.InvokeNative(0xFDB74C9CC54C3F37, Config.TimecycleStrenght)
					Citizen.InvokeNative(0x405224591DF02025, 0.50, 0.475, 1.0, 0.22, 1, 1, 1, 100, true, true)
					DrawTxt(Config.LocaleDead, 0.50, 0.40, 1.0, 1.0, true, 161, 3, 0, 255, true)
					DrawTxt(Config.LocaleTimer .. " " .. tonumber(string.format("%.0f", (((GetGameTimer() - timer) * -1)/1000))), 0.50, 0.50, 0.7, 0.7, true, 255, 255, 255, 255, true) 
					--print ("PLAYER IS DEAD")
					DisplayHud(false)
					DisplayRadar(false)
					exports.spawnmanager:setAutoSpawn(false) -- disable respawn
				else
					respawned = false
					break
				end
			end
			respawn() -- Calling the respawn function here
		end
	end
end)

exports.spawnmanager:setAutoSpawn(false)

@amakuu
Copy link
Member

amakuu commented Dec 17, 2019

please make a pull request
/close

@amakuu amakuu closed this as completed Dec 17, 2019
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

2 participants