IsPlayerMuted: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(→‎Syntax: OOP syntax added)
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
==Description==
{{Server function}}
This function returns a true or false if a player has been muted.
Use this function to check if a player has been muted.


==Syntax==
==Syntax==
 
  <syntaxhighlight lang="lua">bool isPlayerMuted ( player thePlayer )</syntaxhighlight>
  bool [[isPlayerMuted]] ( [[player]] player )
{{OOP||[[player]]:isMuted|muted|setPlayerMuted}}
 
===Required Arguments===
===Required Arguments===
*'''thePlayer:''' The [[player]] you are checking.


*'''player''': The [[player]] you are checking.
===Returns===
Returns ''true'' if the player is muted and ''false'' otherwise.


==Example==
==Example==
if ( [[isPlayerMuted]] ( [[findPlayer]] ( "Someguy" ) ) then
<syntaxhighlight lang="lua">
   [[serverChat]] ( "It seems Someguy can't speak to you." )
someguy = getPlayerFromName ( "someGuy" )
end
if isPlayerMuted ( someguy ) then
   outputChatBox ( "It seems Someguy can't speak." )
end
</syntaxhighlight>
 
==See Also==
{{Player functions}}

Latest revision as of 05:16, 15 July 2014