addEventHandler("onPlayerWasted", root,
function()
local spawn = math.random(1, 3)
local team = getPlayerTeam(source)
local skin = getElementModel(source)
local player = source
if spawn == 1 then
setTimer(spawnPlayer, 3000, 1, player, x, y, z, math.random(0, 360), skin, 0, 0, team)
elseif spawn == 2 then
setTimer(spawnPlayer, 3000, 1, player, x, y, z, math.random(0, 360), skin, 0, 0, team)
elseif spawn == 3 then
setTimer(spawnPlayer, 3000, 1, player, x, y, z, math.random(0, 360), skin, 0, 0, team)
end
end
)