Citizen.CreateThread(function()
while true do
Wait(500)
local ped = GetPlayerPed(-1)
if IsEntityDead(ped) then
Wait(500)
NetworkResurrectLocalPlayer( 363.885, -580.289, 28.8411, true, true, false)
ClearPedTasks(ped)
TriggerServerEvent("weaponshop:playerSpawned", spawn)
end
end
end)