getCameraTarget | Multi Theft Auto: Wiki Skip to content

getCameraTarget

Client-side
Server-side
Shared

Pair: setCameraTarget

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 returns an element that corresponds to the current target of the specified player's camera (i.e. what it is following).

Syntax

getCameraTarget ( )

Code Examples

server
function isTargetPlayer( thePlayer )
local target = getCameraTarget ( thePlayer )
if ( getElementType ( target ) == "player" ) then -- If target is a player
return true -- Return true
else
return false -- Otherwise, return false.
end
end