Squirrel/Server/Functions/Camera/SetCinematicBorder
From Liberty Unleashed Wiki
(Difference between revisions)
(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: | ||
− | + | {{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 | + | ''SetCinematicBorder'' can take 2 different lists of parameters. These are: |
+ | <code>bool SetCinematicBorder( bool enabled )</code> | ||
+ | <code>bool SetCinematicBorder( Player plr, bool enabled )</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" ) SetCinematicBorder( true ); | |
+ | |||
+ | return 1; | ||
} | } | ||
</code> | </code> | ||
Line 19: | Line 28: | ||
=== Notes === | === Notes === | ||
− | + | 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
This function will activate/deactive the cinematic border (widescreen effect).
[edit] Syntax
SetCinematicBorder can take 2 different lists of parameters. These are:
bool SetCinematicBorder( bool enabled )
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'.
function onPlayerCommand( player, command, text ) { if ( command == "cinema" ) SetCinematicBorder( true ); return 1; }
[edit] Notes
The event onPlayerCommand was used in this example. More info about it in the corresponding page.
[edit] Related Functions
- FadeCamera
- GetCinematicBorder
- RestoreCamera
- ShakeCamera
- SetCameraMatrix
- SetCinematicBorder