Squirrel/Client/Functions/Players/Frozen
From Liberty Unleashed Wiki
(Difference between revisions)
(→Arguments) |
(→Example) |
||
Line 18: | Line 18: | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
+ | player <- FindLocalPlayer(); | ||
+ | |||
function onClientCommand( cmd, text ) | function onClientCommand( cmd, text ) | ||
{ | { | ||
if ( cmd == "Freeze" ) | if ( cmd == "Freeze" ) | ||
{ | { | ||
− | + | player. = true; | |
} | } | ||
Revision as of 14:40, 10 August 2013
This function allows you to freeze a player. You can also get the player's frozen state.
Syntax
Returning the frozen state:
bool LocalPlayer.Frozen
Setting the frozen state:
LocalPlayer.Frozen = bool frozen
Arguments
- frozen - A boolean representing if the player is frozen or not ( true for frozen, false for not frozen ).
Example
This example command Freeze The player.
player <- FindLocalPlayer(); function onClientCommand( cmd, text ) { if ( cmd == "Freeze" ) { player. = true; } return 1; }