channelEnabled: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
(Add 2.20 result)
 
Line 6: Line 6:
|gr1= Radio and Chat
|gr1= Radio and Chat


|descr= Returns [[Array]] of [[Boolean]]s in format [enabledChat, enabledVoN] for the given channel. For more information about enabling/disabling of chat channels see [[enableChannel]].
|descr= Returns [[Array]] of [[Boolean]]s in format [enabledChat, enabledVoN] for the given channel.
{{{!}} class{{=}}"wikitable" style{{=}}"text-align: center"
For more information about enabling/disabling of chat channels see [[enableChannel]].
! colspan{{=}}"16" {{!}} [[Channel IDs|channel ID]] number correspondence
 
{{{!}} class="wikitable align-center"
! colspan="16" {{!}} [[Channel IDs|Channel ID]] number correspondence
{{!}}-
{{!}}-
{{!}} colspan="6" {{!}} Default Channels
{{!}} colspan="10" {{!}} Custom Channels
{{!}}- style="font-size: .9em"
{{!}} Global
{{!}} Global
{{!}} Side
{{!}} Side
Line 16: Line 21:
{{!}} Vehicle
{{!}} Vehicle
{{!}} Direct
{{!}} Direct
{{!}} Custom1
{{!}} CC&nbsp;1
{{!}} Custom2
{{!}} CC&nbsp;2
{{!}} Custom3
{{!}} CC&nbsp;3
{{!}} Custom4
{{!}} CC&nbsp;4
{{!}} Custom5
{{!}} CC&nbsp;5
{{!}} Custom6
{{!}} CC&nbsp;6
{{!}} Custom7
{{!}} CC&nbsp;7
{{!}} Custom8
{{!}} CC&nbsp;8
{{!}} Custom9
{{!}} CC&nbsp;9
{{!}} Custom10
{{!}} CC&nbsp;10
{{!}}-
{{!}}-
{{!}} 0
{{!}} 0
Line 49: Line 54:
|p1= channelID: [[Number]] - [[Channel IDs|Channel ID]] (see description)
|p1= channelID: [[Number]] - [[Channel IDs|Channel ID]] (see description)


|r1= [[Array]] - in format [enabledChat, enabledVoN]
|r1= [[Array]] - in format [enabledChat, enabledVoN, {{GVI|arma3|2.20|size= 0.75}} enableMapMarkers, enableMapDrawing]


|x1= <sqf>_isGlobalChatEnabled = (channelEnabled 0) select 0; // check if user can use text on global channel</sqf>
|x1= <sqf>_isGlobalChatEnabled = (channelEnabled 0) select 0; // check if user can use text on global channel</sqf>
Line 55: Line 60:
|x2= <sqf>_isGlobalVoiceEnabled = (channelEnabled 0) select 1; // check if user can use the VoN on global channel</sqf>
|x2= <sqf>_isGlobalVoiceEnabled = (channelEnabled 0) select 1; // check if user can use the VoN on global channel</sqf>


|x3= <sqf>(channelEnabled 0) params ["_isGlobalChatEnabled", "_isGlobalVoiceEnabled"]; // sets both variables</sqf>
|x3= <sqf>
// sets all variables
(channelEnabled 0) params [
"_isGlobalChatEnabled",
"_isGlobalVoiceEnabled",
"_areMarkersEnabled",
"_isMapDrawingEnabled"
];</sqf>


|seealso= [[currentChannel]] [[setCurrentChannel]] [[getPlayerChannel]] [[enableChannel]] [[radioChannelCreate]]
|seealso= [[currentChannel]] [[setCurrentChannel]] [[getPlayerChannel]] [[enableChannel]] [[radioChannelCreate]]
}}
}}

Latest revision as of 15:14, 25 October 2025

Hover & click on the images for description

Description

Description:
Returns Array of Booleans in format [enabledChat, enabledVoN] for the given channel. For more information about enabling/disabling of chat channels see enableChannel.
Channel ID number correspondence
Default Channels Custom Channels
Global Side Command Group Vehicle Direct CC 1 CC 2 CC 3 CC 4 CC 5 CC 6 CC 7 CC 8 CC 9 CC 10
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Groups:
Radio and Chat

Syntax

Syntax:
channelEnabled channelID
Parameters:
channelID: Number - Channel ID (see description)
Return Value:
Array - in format [enabledChat, enabledVoN, Arma 3 logo black.png 2.20 enableMapMarkers, enableMapDrawing]

Examples

Example 1:
_isGlobalChatEnabled = (channelEnabled 0) select 0; // check if user can use text on global channel
Example 2:
_isGlobalVoiceEnabled = (channelEnabled 0) select 1; // check if user can use the VoN on global channel
Example 3:
// sets all variables (channelEnabled 0) params [ "_isGlobalChatEnabled", "_isGlobalVoiceEnabled", "_areMarkersEnabled", "_isMapDrawingEnabled" ];

Additional Information

See also:
currentChannel setCurrentChannel getPlayerChannel enableChannel radioChannelCreate

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note