Skip to main content

MLPlayer.OnTransmissionChannelUpdate

"Read-Only"

This property is Read-Only

NameType
OnTransmissionChannelUpdateEventHandler

Event callback function requirement

info

This property is an event. It means that you need to add a listener function to it. Here how that function needs to look like.

function(number actorNo, number[] transmissionChannels);

Parameters
NameTypeDescription
actorNonumberActor number of the player
transmissionChannelsnumberThe transmission channels effected.

Usage

--- @type 
local mlplayer;

--- callback function called when event triggers
--- @param number number
--- @param number number
local function CallBack(number, number)
-- code to handle event call back
end


-- Regsiter callback function
mlplayer.OnTransmissionChannelUpdate.Add(CallBack);

Description

Called when transmission channels get updated on the server.

Example

Updates the remote player/ target player with specified actor no, audio source properties on other local clients.

---@type MLPlayer
local player;

---@param actorId number
---@param channels number[]
local function onTransmissionChannelUpdate(actorId, channels)

end

player.OnTransmissionChannelUpdate.Add(onTransmissionChannelUpdate)