IsPlayerTalking

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

isPlayerTalking

Checks whether the server currently considers a player to be transmitting voice.

Syntax

bool isPlayerTalking(int playerId)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.

Returns

Returns true while validated voice activity is active; otherwise returns false.

Examples

Check current voice activity:

if isPlayerTalking(playerId) then
    outputDebugString(getPlayerName(playerId) .. " is talking")
end

Notes

  • Available only in server-side resource scripts.
  • For edge-triggered logic prefer onPlayerStartTalking and onPlayerStopTalking.