ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isPlayerTalking

Function

isPlayerTalking

Server and clientPlayersTrilogy Hub only

Checks whether a player is talking through voice chat right now. On the client, for the local player it means their microphone is transmitting.

Syntax

bool isPlayerTalking(player thePlayer)

Arguments

thePlayerplayer
The player.

Returns

true while talking.

Example

for _, p in ipairs(getElementsByType("player")) do
    if isPlayerTalking(p) then outputServerLog(getPlayerName(p) .. " mówi") end
end

See also