this is a simple script that places the camera above the player (GTA2 style)
local root = getRootElement()
local localPlayer = getLocalPlayer ()
local update = false
function updateCameraPos()
local x, y, z = getElementPosition ( localPlayer )
setCameraPosition ( x, y-1, z + 30 )
setCameraLookAt ( x, y, z )
end
end
function changeCamera()
if ( update == false ) then
update = true
toggleCameraFixedMode ( true )
addEventHandler ( "onClientRender", root, updateCameraPos )
else
update = false
toggleCameraFixedMode ( false )
removeEventHandler ( "onClientRender", root, updateCameraPos )
end
end
addCommandHandler ( "cam", changeCamera )
if you wanna know what I mean by 'jerky' change this line to
setCameraPosition ( x, y-1, z + 3 )