Squirrel/Server/Functions/Camera/RestoreCamera
From Liberty Unleashed Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|RestoreCamera}} | |
This function restores the camera for the given player. | This function restores the camera for the given player. | ||
Line 22: | Line 22: | ||
MessagePlayer( "Your camera has been restored.", player ); | MessagePlayer( "Your camera has been restored.", player ); | ||
} | } | ||
+ | |||
+ | return 1; | ||
} | } | ||
</code> | </code> | ||
Line 27: | Line 29: | ||
=== Notes === | === Notes === | ||
− | The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used | + | The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in this example. More info about them in the corresponding pages. |
− | + | ||
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Camera}} | {{Squirrel/Server/Functions/Camera}} |
Latest revision as of 02:38, 25 September 2010
This function restores the camera for the given player.
[edit] Syntax
bool RestoreCamera( Player plr )
[edit] Arguments
- plr - This is the pointer of the player to whom the camera will be restored
[edit] Example
This example command restores player's camera to original status when they type '/restorecamera'.
function onPlayerCommand( player, command, text ) { if ( command == "restorecamera" ) { RestoreCamera( player ); MessagePlayer( "Your camera has been restored.", player ); } return 1; }
[edit] Notes
The function MessagePlayer and event onPlayerCommand were used in this example. More info about them in the corresponding pages.
[edit] Related Functions
- FadeCamera
- GetCinematicBorder
- RestoreCamera
- ShakeCamera
- SetCameraMatrix
- SetCinematicBorder