[Resolved] Stop auto respawning


#1

I’ve took a gander at some of the lua files in the fivem gamemode, and I’m having some trouble with figuring out how to stop the auto respawn.

Fivem_client.lua

AddEventHandler('onClientMapStart', function()
	Citizen.Trace("ocms fivem\n")

	Citizen.Trace("RP: Disabling autospawn...")
	exports.spawnmanager:setAutoSpawn(false)
	exports.spawnmanager:spawnPlayer()
	Citizen.Trace("RP: Autospawn disabled!")
    SetClockTime(24, 0, 0)
    PauseClock(true)
    Citizen.Trace("ocms fivem end\n")
end)

yet that doesnt seem to work anymore.


#2

I have been trying this as well. Looking to disable this then have paramedics use /revive command or player respawn on command if none around…

I have not found anything to get this working


#3

Yeah its a shame the creator of RPDeath removed his script :frowning:


#4

I have figured it out. There is a setting in the Spawn Manager resource under the hierarchy of Server\resources[system]\spawnmanager.

[REMOVED, JUST USE THE EXPORTS API]

Here is my spawnmanager.lua, just with the necessary edits to function as the RPDeath creator had intended.


#5

You shouldn’t edit the default FiveM files. Each update will cause problems. You should disable autospawn client side in your gamemode.


#6

I just changed two true values for force respawn to false.