onChannelEvent

Triggered when a channel event occurs can be someone joined or left the channel.

Prototypes
onChannelEvent(callback) -- callback = function(channelId, name, event)
Parameters
    • function(channelId, name, event): callback function
      • channelId: client side channel id
      • name: event player name.
      • event: channel event enum.
        • ChannelEvent.Join
        • ChannelEvent.Leave
        • ChannelEvent.Invite
        • ChannelEvent.Exclude
Usage
onChannelEvent(function(channelId, name, event)
	if event == ChannelEvent.Join then
		info(name .. " joined the room!")
	end
end)