addEventHandler("onClientPlayerWasted", getLocalPlayer(),
function()
if(source ~= getLocalPlayer())then return end
reset = true
setElementData(getLocalPlayer(), "respawn.playing", false, true)
setTimer(function()
local statea = getElementData(getLocalPlayer(), "hunterarea.playing")
if statea then
setElementData(getLocalPlayer(), "hunterarea.playing", false, true)
unbindKey("mouse1", "down", cdoshoot)
unbindKey("lshift", "down", cdjump)
unbindKey("lalt", "down", cdspeed)
end
end,1500,1)
setTimer(function()
--local state = getElementData(getLocalPlayer(), "respawn.playing") or true
if(running)then
showRespawn = true
setElementData(getLocalPlayer(), "respawn.playing", false, true)
bindKey(RESPAWN_KEY, "up", respawn)
bindKey(SPECTATE_KEY, "up", spectator)
end
end,
3000, 1)
end)
local me = getLocalPlayer()
function spectator()
clientCall(me, "Spectate.start", 'manual' )
end