OnClientPlayerVoiceStart: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 17: | Line 17: | ||
This example outputs to the console the player that started talking. | This example outputs to the console the player that started talking. | ||
<syntaxhighlight lang="lua">addEventHandler("onClientPlayerVoiceStart",root,function() | <syntaxhighlight lang="lua">addEventHandler("onClientPlayerVoiceStart",root,function() | ||
outputConsole(getPlayerName(source) | outputConsole(getPlayerName(source).." has started talking.") | ||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 09:37, 31 August 2019
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 starts talking through voice chat.
Parameters
No parameters.
Source
The source of this event is the player element that just started 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 started talking.
addEventHandler("onClientPlayerVoiceStart",root,function() outputConsole(getPlayerName(source).." has started talking.") end)
See Also
- onClientPlayerChangeNick
- onClientPlayerChoke
- onClientPlayerDamage
- onClientPlayerHeliKilled
- onClientPlayerHitByWaterCannon
- onClientPlayerJoin
- onClientPlayerPickupHit
- onClientPlayerPickupLeave
- onClientPlayerQuit
- onClientPlayerRadioSwitch
- onClientPlayerSpawn
- onClientPlayerStealthKill
- onClientPlayerStuntFinish
- onClientPlayerStuntStart
- onClientPlayerTarget
- onClientPlayerVehicleEnter
- onClientPlayerVehicleExit
- onClientPlayerVoicePause
- onClientPlayerVoiceResumed
- onClientPlayerVoiceStart
- onClientPlayerVoiceStop
- onClientPlayerWasted
- onClientPlayerWeaponFire
- onClientPlayerWeaponSwitch