OnPlayerUnmute: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:
If this event is [[Event system#Canceling|canceled]], the player will not be unmuted.
If this event is [[Event system#Canceling|canceled]], the player will not be unmuted.


==Example==  
==Example==
This example outputs to chatbox the player name who's unmuted.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- TODO
function unmuted()
    outputChatBox(getPlayerName(source) .. " has been unmuted", root, 255, 0, 0)
end
addEventHandler("onPlayerUnmute", root, unmuted)
</syntaxhighlight>
</syntaxhighlight>
{{See also/Server event|Player events}}
{{See also/Server event|Player events}}

Revision as of 20:34, 14 April 2013

This event is triggered when a player has been unmuted by setPlayerMuted.

Parameters

none

Source

The source of this event is the player that unmuted.

Cancel effect

If this event is canceled, the player will not be unmuted.

Example

This example outputs to chatbox the player name who's unmuted.

function unmuted()
    outputChatBox(getPlayerName(source) .. " has been unmuted", root, 255, 0, 0)
end
addEventHandler("onPlayerUnmute", root, unmuted)

See Also

Player events


Event functions

Shared