Squirrel/Server/Functions/Camera/GetCinematicBorder
From Liberty Unleashed Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | This function will return a boolean value of either true or false. | + | This function will return wether the cinematic border (widescreen) is in use. The function will return a boolean value of either true or false. |
== Syntax == | == Syntax == | ||
− | + | <code>bool GetCinematicBorder()</code> | |
== Example == | == Example == | ||
+ | |||
+ | This example returns whether the cinematic border is in use when a player types '/cinema'. | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
Line 18: | Line 20: | ||
This is useful for checking that the cinematic border isn't already active before setting it to true. | This is useful for checking that the cinematic border isn't already active before setting it to true. | ||
+ | |||
+ | The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in the corresponding pages. | ||
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Camera}} | {{Squirrel/Server/Functions/Camera}} |
Revision as of 15:57, 7 January 2010
This function will return wether the cinematic border (widescreen) is in use. The function will return a boolean value of either true or false.
Syntax
bool GetCinematicBorder()
Example
This example returns whether the cinematic border is in use when a player types '/cinema'.
function onPlayerCommand( player, command, text ) { if ( command == "cinema" ) MessagePlayer( "Cinematic border is currently set to " + GetCinematicBorder(), player ); }
Notes
This is useful for checking that the cinematic border isn't already active before setting it to true.
The function MessagePlayer and event onPlayerCommand were used in in this example. More info about them in the corresponding pages.
Related Functions
- FadeCamera
- GetCinematicBorder
- RestoreCamera
- ShakeCamera
- SetCameraMatrix
- SetCinematicBorder