GetCameraPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
This function returns the current position of the specified player's camera.
This function returns a [[string]] containing the current mode of the specified player's camera.
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float float float getCameraPosition ( player thePlayer )
string getCameraMode ( player thePlayer ) --- possible modes "player", "fixed"
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''thePlayer:''' The player whose camera position you wish to obtain.
*'''thePlayer:''' The player whose camera mode you wish to obtain.


===Returns===
===Returns===
Returns three [[float|floats]] containing the x, y and z co-ordinate values if the function was successful, ''false'' otherwise.
Returns a string with one of two values if successful:
* '''player:''' The camera is attached to a player or object.
* '''fixed:''' The camera is in a fixed position.
 
The function will return ''false'' if unsuccessful.


==Example==  
==Example==  
Line 18: Line 22:


[[Category:Incomplete]]
[[Category:Incomplete]]
{{Needs_Checking|Is the description correct?}}

Revision as of 04:23, 2 October 2006

This function returns a string containing the current mode of the specified player's camera.

Syntax

string getCameraMode ( player thePlayer ) --- possible modes "player", "fixed"

Required Arguments

  • thePlayer: The player whose camera mode you wish to obtain.

Returns

Returns a string with one of two values if successful:

  • player: The camera is attached to a player or object.
  • fixed: The camera is in a fixed position.

The function will return false if unsuccessful.

Example

See Also

Dialog-information.png This article needs checking.

Reason(s): Is the description correct?