- Documentation
- Camera
Category
Camera
All Lua functions and events in the Camera category, on the server and the client.
Client functions 13
getReturns the player's camera element, e.g. for attaching other elements or data.Camera getReturns whether the camera clips objects and vehicles (theCamera Clip setCameraClipsetting).getReturns the camera sway level (0-255).Camera Drunk Level getReturns the field of view stored withCamera Field Of View setCameraFieldOfView.getReturns the camera filter:Camera Goggle Effect "normal","nightvision"or"thermalvision".getReturns the current in-vehicle camera view, read from the game:Camera View Mode 0= bumper (view from inside),1= close,2= medium,3= far. It also reflects a view change made by the player with the key.resetStops the camera shake.Shake Camera setStores whether the camera should clip objects and vehicles.Camera Clip setSways the camera as when drunk in the game (0 = none, 255 = strongest). At higher levels the ped controls also lag slightly.Camera Drunk Level setStores the camera field of view (10-120 degrees).Camera Field Of View setTurns on a game image filter: night vision (a green, brightened image) or thermal vision (warm peds and vehicles in red, the rest in blue).Camera Goggle Effect "normal"turns the filter off. It is the same effect as the goggles in the game.setChanges the in-vehicle camera view, like the view change key in the game:Camera View Mode 0= bumper (view from inside),1= close,2= medium,3= far. The player can still change the view with the key afterwards.shakeShakes the camera for a moment, e.g. on an explosion. Strength 0-255.Camera
Shared functions 7
fadeFades the screen out or in, in a given colour. Useful for teleports, joining and cutscenes.Camera getReturns the interior the camera is rendered in.Camera Interior getReturns the camera position, the point it looks at, the roll and the field of view.Camera Matrix getReturns the element the camera follows, orCamera Target falsewhen the camera is fixed.setSets the camera interior, i.e. which buildings are drawn around it. Use together withCamera Interior setCameraMatrixto preview interiors.setPlaces the camera at a point and aims it at a target. The camera stops following the player untilCamera Matrix setCameraTarget.setPuts the camera behind the player or makes it follow another element (e.g. when spectating).Camera Target