Squirrel/Server/Functions/Camera/ShakeCamera
From Liberty Unleashed Wiki
(Difference between revisions)
(→Example) |
|||
Line 4: | Line 4: | ||
== Syntax == | == Syntax == | ||
− | <code>bool ShakeCamera( Player plr, | + | <code>bool ShakeCamera( Player plr, int intensity )</code> |
== Arguments == | == Arguments == | ||
Line 18: | Line 18: | ||
if ( szCommand == "shake" ) | if ( szCommand == "shake" ) | ||
{ | { | ||
− | ShakeCamera( pPlayer, | + | ShakeCamera( pPlayer, 300 ); |
} | } | ||
return 1; | return 1; |
Latest revision as of 19:49, 28 October 2010
This function shakes the camera of the given player.
[edit] Syntax
bool ShakeCamera( Player plr, int intensity )
[edit] Arguments
- plr - This is the pointer of the player to whose camera should be shaken
- intensity - The intensity of the shaking
[edit] Example
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "shake" ) { ShakeCamera( pPlayer, 300 ); } return 1; }
[edit] Notes
The event onPlayerCommand was used in this example. More info about this in the corresponding page.