ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientPlayerVoiceStart

Event

onClientPlayerVoiceStart

ClientBrowserIdentical to MTA:SA

A player started talking through voice chat (for the local player: their microphone started transmitting). You can block another player's utterance: then this player does not hear it until they stop talking.

Handler

addEventHandler("onClientPlayerVoiceStart", root, function() ... end)

Source

source is the talking player.

cancelEvent() mutes this utterance for this player only.

Example

local blocked = {}
addCommandHandler("ignoruj", function(_, nick)
    local p = nick and getPlayerFromName(nick)
    if p then blocked[p] = true end
end)
addEventHandler("onClientPlayerVoiceStart", root, function()
    if blocked[source] then cancelEvent() end
end)

See also