OnClientPlayerVoiceStop: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client event}} __NOTOC__ <div style="border: 1px dotted blue; background: #00CC66;padding:4px;margin-bottom:2px;">'''Note''': This event should only be used as a low-level fu...")
 
No edit summary
Line 2: Line 2:
__NOTOC__  
__NOTOC__  
<div style="border: 1px dotted blue; background: #00CC66;padding:4px;margin-bottom:2px;">'''Note''':  This event should only be used as a low-level function for advanced users.  For typical Voice scripting, please see the [[Resource:Voice|Voice Resource]]</div>
<div style="border: 1px dotted blue; background: #00CC66;padding:4px;margin-bottom:2px;">'''Note''':  This event should only be used as a low-level function for advanced users.  For typical Voice scripting, please see the [[Resource:Voice|Voice Resource]]</div>
This event is triggered when a player starts talking through voice chat.
This event is triggered when a player stops talking through voice chat.


==Parameters==
==Parameters==
Line 8: Line 8:


==Source==
==Source==
The [[event system#Event source|source]] of this event is the player [[element]] that just started talking through voice chat.
The [[event system#Event source|source]] of this event is the player [[element]] that just stopped talking through voice chat.


==Cancel effect==
==Cancel effect==
Line 15: Line 15:


==Example==  
==Example==  
This page lacks an example
This example outputs to the console the player that stopped talking.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">addEventHandler("onClientPlayerVoiceStop",root,function()
--ADD AN EXAMPLE
outputConsole(getPlayerName(source)..." has stopped talking.")
end)
</syntaxhighlight>
</syntaxhighlight>


[[Category:Needs_Example]]
==See Also==
==See Also==
{{Client_player_events}}
{{Client_player_events}}

Revision as of 23:12, 27 April 2012

Note: This event should only be used as a low-level function for advanced users. For typical Voice scripting, please see the Voice Resource

This event is triggered when a player stops talking through voice chat.

Parameters

No parameters.

Source

The source of this event is the player element that just stopped talking through voice chat.

Cancel effect

  • If the source is the local player, the local player will not broadcast his voice chat to the server
  • If the source is a remote player, the player who started talking will not be heard.

Example

This example outputs to the console the player that stopped talking.

addEventHandler("onClientPlayerVoiceStop",root,function()
	outputConsole(getPlayerName(source)..." has stopped talking.")
end)

See Also