SetCameraInterior: Difference between revisions
Jump to navigation
Jump to search
m (Add Server Example) |
m (Added example.) |
||
| Line 48: | Line 48: | ||
</section> | </section> | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<strong> This example make a command to change your cam interior to a selected one. </strong> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function setCam(thePlayer,command,int) | |||
if (int) then | |||
local setInt = setCameraInterior(thePlayer,int) | |||
if (setInt) then | |||
outputChatBox("Your camera's interior has been set to "..int,255,255,0) | |||
else | |||
outputChatBox("Can't change your camera's interior...",255,0,0) | |||
end | |||
else | |||
outputChatBox("Syntax: /camera [interiorID] ",255,0,0) | |||
end | |||
end | |||
addCommandHandler("camera",setCam) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
| Line 55: | Line 68: | ||
==See Also== | ==See Also== | ||
{{Client_camera_functions}} | {{Client_camera_functions}} | ||
Revision as of 03:14, 31 May 2010
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
Click to collapse [-]
Serverbool setCameraInterior ( player thePlayer, int interior )
Required Arguments
- thePlayer: the player whose camera interior will be set.
- interior: the interior to place the camera in.
Click to collapse [-]
Clientbool setCameraInterior ( int interior )
Required Arguments
- interior: the interior to place the camera in.
Returns
Returns true if the camera's interior was changed successfully, false otherwise.
Example
Click to collapse [-]
ServerThis example make a command to change your cam interior to a selected one.
function setCamInt( thePlayer, commandName, intID )
if( intID )then
local seted = setCameraInterior( thePlayer, intID )
if( seted )then
outputChatBox( "Your camera's interior has been seted to "..intID, thePlayer )
else
outputChatBox( "Can't change your camera's interior...", thePlayer, 255, 0, 0 )
end
else
outputChatBox( "Syntax: /caminterior [interiorID] ", thePlayer, 255, 0, 0 )
end
end
addCommandHandler( "caminterior", setCamInt )
Click to collapse [-]
ClientThis example make a command to change your cam interior to a selected one.
function setCam(thePlayer,command,int)
if (int) then
local setInt = setCameraInterior(thePlayer,int)
if (setInt) then
outputChatBox("Your camera's interior has been set to "..int,255,255,0)
else
outputChatBox("Can't change your camera's interior...",255,0,0)
end
else
outputChatBox("Syntax: /camera [interiorID] ",255,0,0)
end
end
addCommandHandler("camera",setCam)
See Also
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraViewMode
- Shared
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget