Squirrel/Client/Functions/Players/Frozen

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(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:

  1. bool LocalPlayer.Frozen

Setting the frozen state:

  1. 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.

  1.  
  2. player <- FindLocalPlayer();
  3.  
  4. function onClientCommand( cmd, text )
  5. {
  6. if ( cmd == "Freeze" )
  7. {
  8. player. = true;
  9. }
  10. return 1;
  11. }
  12.  
Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox