Jump to content

How to move the camera.


killingyasoon

Recommended Posts

how to move the camera, cant get it done.

local cameras = {
	{ 329.10980224609, -2117.2749023438, 50.161201477051, 329.65179443359, -2116.4926757813, 49.853763580322 },
	{ 1463.18, -1143.13, 194.36, 1463.18, -1143.13, 194.36 }
	
}

function cam( plr )
	local theplr = nil
	if ( source and getElementType ( source ) == 'player' ) then
		theplr = source
	elseif ( plr and getElementType ( plr ) == 'player' ) then
		theplr = plr
	end
	setTimer ( function ( p )
		local ind = math.random ( #cameras )
		setCameraMatrix ( p, unpack ( cameras[ind] ) )
		fadeCamera ( p, true )
	end, 700, 1, theplr )
end
addEventHandler ( "onPlayerJoin", root, cam )
addEventHandler ( "onPlayerLogout", root, cam )

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...