SetPlayerMuted: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(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===...)
 
mNo edit summary
Line 18: Line 18:
if ( not isPlayerMuted ( someguy ) ) then
if ( not isPlayerMuted ( someguy ) ) then
   setPlayerMuted ( someguy, true )
   setPlayerMuted ( someguy, true )
   outputChatBox ( "You just got muted." )
   outputChatBox ( "You just got muted.", someguy )
end
end
</syntaxhighlight>
</syntaxhighlight>

Revision as of 18:20, 7 December 2008

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.", someguy )
end

See Also