IsVoiceEnabled: Difference between revisions
Jump to navigation
Jump to search
m (removed `section` tag around example) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Server function}} | {{Server client function}} | ||
__NOTOC__ | __NOTOC__ | ||
This function allows you to make the server reveal whether or not voice is currently enabled. | This function allows you to make the server reveal whether or not voice is currently enabled. |
Revision as of 11:42, 11 September 2012
This function allows you to make the server reveal whether or not voice is currently enabled.
Syntax
bool isVoiceEnabled ()
Returns
Returns true if the voice is enabled on the server, false otherwise.
Example
This example shows how to forbid use voice for muted (in chat) players
-- only if voice enabled if isVoiceEnabled() then -- adding handler for voice start event addEventHandler( 'onPlayerVoiceStart', root, function() -- if player is muted in chat -- do not broadcast his voice to other players if isPlayerMuted(source) then cancelEvent() end end ) end
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState