S-SIDE
addEvent("spawnPlayerInMap", true)
addEventHandler("spawnPlayerInMap", root, function()
local pos = math.random(1,#RandomSpawn)
outputChatBox("HURA")
spawnPlayer(source, RandomSpawn[pos][1], RandomSpawn[pos][2], RandomSpawn[pos][3])
fadeCamera(source, true, 2)
setCameraTarget (source, source)
end)
C-SIDE
function onPlayerLogged()
fadeCamera(false, 3)
showChat(true)
setTimer(ifPlayerClosePanel, 4000, 1)
stopSound(sound)
end
function ifPlayerClosePanel()
triggerServerEvent("spawnPlayerInMap", localPlayer)
end
[/code]