It working, i test it now.
Also i forgot say problem.
You problem in 28 line
setTimer( randomSpawn, 3000, 1, source )
You forgot call table.
setTimer( randomSpawn, 3000, 1, source,randomSpawnTable )
Correct.
Full correct code
local randomSpawnTable =
{
{ -2818.3391, 1134.4768, 26.1129, 179.2400 },
{ 2021.3114, 1344.1099, 10.8203, 269.5800 },
{ 2221.3726, 1838.4792, 10.8203, 90.3700 }
}
function randomSpawn( thePlayer, randomSpawnTable )
local random = math.random( 1, #randomSpawnTable )
spawnPlayer(
thePlayer,
randomSpawnTable[random][1],
randomSpawnTable[random][2],
randomSpawnTable[random][3],
randomSpawnTable[random][4]
)
end
function onPlayerJoin( )
fadeCamera( source, true )
setCameraTarget( source, source )
randomSpawn( source, randomSpawnTable )
end
addEventHandler( "onPlayerJoin",root, onPlayerJoin )
function onPlayerDeath( )
fadeCamera ( source, false, 1.0, 255, 0, 0 )
setTimer( randomSpawn, 3000, 1, source,randomSpawnTable )
setTimer( fadeCamera, 2500, 1, source, true, 0.5 )
end
addEventHandler( "onPlayerWasted", root, onPlayerDeath )