Respawn hopital after death

Hi, Can anyone help a script to respawn after death in a hospital plz?

1 Like

Like FailyV ? It must be easy. Let me search a little and if i find anything i’ll tell u

Here you go !!!
Just found this now, amazing !

yeah i look it but in script turtle work by type /toggleDeath to respawn in hospital and it is an command that each player must type
I want without /toggleDeath, automatic spawn after death in hospital

1 Like
Citizen.CreateThread(function()
    while true do
        Wait(500)
		local ped = GetPlayerPed(-1)
		local yourplace = x,y,z
        if IsEntityDead(ped) then
            NetworkResurrectLocalPlayer(yourplace, true, true, false)
			ClearPedTasks(ped)
		end
	end
end)

change on local = yourplace , add the coords

1 Like

thx u ! i got test it :slight_smile:

just add the proper place and it will work, it comes from my WIP ragdoll events, where i respawn them where i want too.

I make script and ressource and place your code like that but not working

Citizen.CreateThread(function()
while true do
Wait(6500)
local ped = GetPlayerPed(-1)
local Hospital = 335,340,-1400
if IsEntityDead(ped) then
NetworkResurrectLocalPlayer(Hospital, true, true, false)
ClearPedTasks(ped)
end
end
end)

and i test to place it to freeroam\client.lua and nothing too

Citizen.CreateThread(function()
while true do
Wait(500)
local ped = GetPlayerPed(-1)
if IsEntityDead(ped) then
NetworkResurrectLocalPlayer( 335, 340, -1400, true, true, false)
ClearPedTasks(ped)
end
end
end)

Let’s not get into how to assign the local , use it like that.

P.S : I don’t know what coords are those, the city davis hospital is : 295.946, -1446.82, 29.9666

If you are using my RPDeath script you can edit the client.lua file and change and local RPDeathEnabled = true to local RPDeathEnabled = false. This will make the script wait 3 seconds before respawning at one of 5 hospitals (random).

This would accomplish the same task as making someone automatically type /toggleDeath when they join the server.

1 Like

where i have to add this

I’ve been using it but it doesn’t work. Could you tell me exactly how it’s done?

how to manage if we die in shooting, for example, auto respawn is like that to another place, see the example in this video, please help me :weary: -im from indonesian