setCameraInterior | Multi Theft Auto: Wiki Skip to content

setCameraInterior

Client-side
Server-side
Shared

Pair: getCameraInterior

This page is incomplete! Help wanted!

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


Sets the interior of the local camera. Only the interior of the camera is changed, the local player stays in the interior he was in.

Syntax

setCameraInterior ( )

Code Examples

server

This example make a command to change your cam interior to a selected one.

function setCamInt( thePlayer, commandName, intID )
if( intID )then -- If there is an ID
local seted = setCameraInterior( thePlayer, intID ) -- set the interior to the camera
if( seted )then -- If it has been changed correctly
outputChatBox( "Your camera's interior has been set to "..intID, thePlayer ) -- Tell to the player his new camera's interior
else -- otherwise
outputChatBox( "Can't change your camera's interior...", thePlayer, 255, 0, 0 ) -- Tell him the change failed
end
else -- otherwise
outputChatBox( "Syntax: /caminterior [interiorID] ", thePlayer, 255, 0, 0 ) -- Tell him the correct syntax
end
end
addCommandHandler( "caminterior", setCamInt )