Skip to main content

MLPlayer.UpdateReceiverChannels(number[] channelsToRemove, number[] channelsToAdd)

Update receiving channel of the local client.

Parameters:

NameTypeDescription
channelsToRemovenumber[]Channels to unsubscibe from receiving. Null will not remove any.
channelsToAddnumber[]Channel to subscribe to receiver. Null will not add any.

Returns:

typeDescription
booleanreturn true if operation succeed, otherwise false.

Usage

---@type MLPlayer
local mlplayer;

---@type number
local channelsToRemove;

---@type number
local channelsToAdd;


local val0 = mlplayer.UpdateReceiverChannels(channelsToRemove, channelsToAdd)

Extra Detail

By default, all players receive from channel 0. First, removing channels is executed. This way, you could leave all channels and join only the ones provided. Priority is always to channel addition: if the same channel is added to both arrays then the channel will be added.