SetPlayerMuted

From Multi Theft Auto: Wiki
Revision as of 18:20, 7 December 2008 by Awwu (talk | contribs) (New page: __NOTOC__ {{Server function}} Use this function to mute or unmute the player. ==Syntax== <syntaxhighlight lang="lua">bool setPlayerMuted ( player thePlayer, bool state )</syntaxhighlight> ===Required Arguments===...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Use this function to mute or unmute the player.

Syntax

bool setPlayerMuted ( player thePlayer, bool state )

Required Arguments

  • thePlayer: The player you are muting or unmuting.
  • state: Use true to mute and false to unmute the player.

Returns

Returns true if the player was successfully muted or unmuted, false otherwise.

Example

someguy = getPlayerFromNick ( "someGuy" )
if ( not isPlayerMuted ( someguy ) ) then
   setPlayerMuted ( someguy, true )
   outputChatBox ( "You just got muted." )
end

See Also