Squirrel/Server/Functions/Camera/SetCinematicBorder

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This function will activate/deactive the cinematic border. == Syntax == ''SetCinematicBorder'' can take one parameter, this is: <code>bool SetCinematicBorder( bool true/false ...)
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|SetCinematicBorder}}
This function will activate/deactive the cinematic border.
+
This function will activate/deactive the cinematic border (widescreen effect).
  
 
== Syntax ==
 
== Syntax ==
  
''SetCinematicBorder'' can take one parameter, this is:
+
''SetCinematicBorder'' can take 2 different lists of parameters. These are:  
 +
<code>bool SetCinematicBorder( bool enabled )</code>
 +
<code>bool SetCinematicBorder( Player plr, bool enabled )</code>
  
<code>bool SetCinematicBorder( bool true/false )</code>
+
== Arguments ==
 +
 
 +
* '''enabled''' - true/false to enable/disable the cinematic border
 +
* '''plr''' - The player to enable/disable cinematic border for. If this argument is not used, the function will enable/disable the setting globally
  
 
== Example ==
 
== Example ==
 +
 +
This will turn the cinematic view for all players on when someone types '/cinema'.
  
 
<code lang="squirrel">
 
<code lang="squirrel">
 
function onPlayerCommand( player, command, text )
 
function onPlayerCommand( player, command, text )
 
{
 
{
if ( command == "cinema" ) SetCinematicView( true );
+
    if ( command == "cinema" ) SetCinematicBorder( true );
 +
   
 +
    return 1;
 
}
 
}
 
</code>
 
</code>
Line 19: Line 28:
 
=== Notes ===
 
=== Notes ===
  
This will turn the cinematic view for all players on.
+
The event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in this example. More info about it in the corresponding page.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Camera}}
 
{{Squirrel/Server/Functions/Camera}}

Latest revision as of 02:45, 25 September 2010

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

This function will activate/deactive the cinematic border (widescreen effect).

[edit] Syntax

SetCinematicBorder can take 2 different lists of parameters. These are:

  1. bool SetCinematicBorder( bool enabled )
  1. bool SetCinematicBorder( Player plr, bool enabled )

[edit] Arguments

  • enabled - true/false to enable/disable the cinematic border
  • plr - The player to enable/disable cinematic border for. If this argument is not used, the function will enable/disable the setting globally

[edit] Example

This will turn the cinematic view for all players on when someone types '/cinema'.

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "cinema" ) SetCinematicBorder( true );
  5. return 1;
  6. }
  7.  

[edit] Notes

The event onPlayerCommand was used in this example. More info about it in the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox