getCameraViewMode | Multi Theft Auto: Wiki Skip to content

getCameraViewMode

Client-side
Server-side
Shared

Pair: setCameraViewMode

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function allows you to get the active camera view modes. This indicates at what distance the camera will follow the player or vehicle.

Syntax

getCameraViewMode ( )

Code Examples

client

This example tells the player their current camera view when they change it

function onPlayerSpawn(theSpawnpoint)
currentCam("fire") -- start a repeating check
end
addEventHandler("onClientPlayerSpawn", root, onPlayerSpawn)
function currentCam(key)
if (getControlState(key)) then
local vehicleMode, pedMode = getCameraViewMode()
outputChatBox("Your current cam view is: " .. vehicleMode .. ".")
end
end