channelEnabled: Difference between revisions

From Bohemia Interactive Community
mNo edit summary
(Add 2.20 result)
 
(44 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
______________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.42


|1.42|= Game version
|gr1= Radio and Chat
__________________________________________________________________________________________


| Returns [[true]] or [[false]] depending on whether the given channel is enabled or disabled. For more information about enabling/disabling of chat channels see [[enableChannel]]. Channel / Number correspondence:
|descr= Returns [[Array]] of [[Boolean]]s in format [enabledChat, enabledVoN] for the given channel.
* 0 <nowiki>=</nowiki> Global
For more information about enabling/disabling of chat channels see [[enableChannel]].
* 1 <nowiki>=</nowiki> Side
* 2 <nowiki>=</nowiki> Command
* 3 <nowiki>=</nowiki> Group
* 4 <nowiki>=</nowiki> Vehicle
* 5 <nowiki>=</nowiki> Direct
* 6-15 <nowiki>=</nowiki> Custom Radio (Is not supported by [[channelEnabled]])
{{warning|Please note that since Arma 3 v1.59.135661 the output of this command was changed from <tt>[[Boolean]]</tt> to <tt>[[Array]]</tt> in format <tt><nowiki>[</nowiki>[[Boolean]], [[Boolean]]]</tt>}}|= Description
____________________________________________________________________________________________


| '''channelEnabled''' channel|= Syntax
{{{!}} 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
{{!}} Side
{{!}} Command
{{!}} Group
{{!}} Vehicle
{{!}} Direct
{{!}} CC&nbsp;1
{{!}} CC&nbsp;2
{{!}} CC&nbsp;3
{{!}} CC&nbsp;4
{{!}} CC&nbsp;5
{{!}} CC&nbsp;6
{{!}} CC&nbsp;7
{{!}} CC&nbsp;8
{{!}} CC&nbsp;9
{{!}} CC&nbsp;10
{{!}}-
{{!}} 0
{{!}} 1
{{!}} 2
{{!}} 3
{{!}} 4
{{!}} 5
{{!}} 6
{{!}} 7
{{!}} 8
{{!}} 9
{{!}} 10
{{!}} 11
{{!}} 12
{{!}} 13
{{!}} 14
{{!}} 15
{{!}}}


|p1= channel: [[Number]] |= Parameter 1
|s1= [[channelEnabled]] channelID


| [[Array]] - in format [VoN, chat], where
|p1= channelID: [[Number]] - [[Channel IDs|Channel ID]] (see description)
* VoN: [[Boolean]] - [[true]] if voice chat is enabled
* chat: [[Boolean]] - [[true]] if text chat is enabled|= Return value
____________________________________________________________________________________________
 
|x1= <code>_isGlobalEnabled = [[channelEnabled]] 0; // Check if user can send voice and text on global channel</code> |= Example 1
____________________________________________________________________________________________


|[[currentChannel]], [[setCurrentChannel]], [[getPlayerChannel]], [[enableChannel]], [[radioChannelCreate]]|= See also
|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>


<h3 style="display:none">Notes</h3>
|x2= <sqf>_isGlobalVoiceEnabled = (channelEnabled 0) select 1; // check if user can use the VoN on global channel</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x3= <sqf>
</dl>
// sets all variables
(channelEnabled 0) params [
"_isGlobalChatEnabled",
"_isGlobalVoiceEnabled",
"_areMarkersEnabled",
"_isMapDrawingEnabled"
];</sqf>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[currentChannel]] [[setCurrentChannel]] [[getPlayerChannel]] [[enableChannel]] [[radioChannelCreate]]
 
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Radio_Control|{{uc:{{PAGENAME}}}}]]

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