Squirrel/Client/Functions/Players/Frozen

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
(Example)
 
Line 24: Line 24:
 
     if ( cmd == "Freeze" )
 
     if ( cmd == "Freeze" )
 
     {
 
     {
       player. = true;
+
       player.Frozen = true;
 
     }
 
     }
 
      
 
      

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

[edit] Syntax

Returning the frozen state:

  1. bool LocalPlayer.Frozen

Setting the frozen state:

  1. LocalPlayer.Frozen = bool frozen

[edit] Arguments

  • frozen - A boolean representing if the player is frozen or not ( true for frozen, false for not frozen ).

[edit] 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.Frozen = true;
  9. }
  10. return 1;
  11. }
  12.  
Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox