Just make it easy for your self.
local camera = {
{50, 1, 2538.47, 2074.72, 10.67, 1364.53, -1279.62, 13.54}, -- camera 1
{50, 10, 1967.71, 1342.9, 26.63, 2034.47, 1343.02, 20.01 } -- camera 2
}
local indexCamera = #camera
addEventHandler("onPlayerJoin",root,
function ()
setTimer (function ()
if isElement (source) then
setCameraMatrix( source,unpack(camera[math.random(indexCamera)]))
fadeCamera(source, true)--fadecamera
end
end,3000,1)
end)
#camera -- table range. {} + {} = 2
math.random() -- can be number 1 t/m table range
camera[]-- index the table. {}, {}
unpack() -- unpack the data. >50, 1, 2538.47, 2074.72, 10.67, 1364.53, -1279.62, 13.54<