Squirrel/Server/Functions/Camera/GetCinematicBorder

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|GetCinematicBorder}}
This function will return wether the cinematic border (widescreen) is in use. The function will return a boolean value of either true or false.
+
This function will return whether the cinematic border (widescreen effect) is in use. The function will return a boolean value of either true or false.
  
 
== Syntax ==
 
== Syntax ==
Line 13: Line 13:
 
function onPlayerCommand( player, command, text )
 
function onPlayerCommand( player, command, text )
 
{
 
{
if ( command == "cinema" ) MessagePlayer( "Cinematic border is currently set to " + GetCinematicBorder(), player );
+
    if ( command == "cinema" ) MessagePlayer( "Cinematic border is currently set to " + GetCinematicBorder(), player );
 +
   
 +
    return 1;
 
}
 
}
 
</code>
 
</code>

Revision as of 02:30, 25 September 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function will return whether the cinematic border (widescreen effect) is in use. The function will return a boolean value of either true or false.

Syntax

  1. bool GetCinematicBorder()

Example

This example returns whether the cinematic border is in use when a player types '/cinema'.

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "cinema" ) MessagePlayer( "Cinematic border is currently set to " + GetCinematicBorder(), player );
  5. return 1;
  6. }
  7.  

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

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox