Player.Muted

From Liberty Unleashed Wiki
Revision as of 16:07, 25 October 2010 by Force (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function sets/returns whether or not the player is muted.

Syntax

  1. bool player.Muted
  1. player.Muted = bool value

Arguments

  • value - A boolean saying if the player is muted

Example 1. Returning

This will tell the player if they are muted or not when they type '/muted'.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "muted" )
  5. {
  6. MessagePlayer( "Muted status - " + pPlayer.Muted, pPlayer );
  7. }
  8. return 1;
  9. }
  10.  

Example 2. Setting

This will mute the player when they typed '/muted2'.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "muted2" )
  5. {
  6. pPlayer.Muted = true;
  7. }
  8. return 1;
  9. }
  10.  

Notes

The function MessagePlayer and event onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox