IsVoiceEnabled
From Multi Theft Auto: Wiki
Added to client side. This function allows you to make the server reveal whether or not voice is currently enabled.
Syntax
bool isVoiceEnabled ( )
OOP Syntax Help! I don't understand this!
- Method: Player.isVoiceEnabled(...)
Returns
Returns true if the voice is enabled on the server, false otherwise.
Example
Click to collapse [-]
ServerThis 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
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
FROM VERSION 1.5.7 r19626 ONWARDS
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
FROM VERSION 1.5.7 r19626 ONWARDS
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot