channelEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
Line 7: Line 7:
__________________________________________________________________________________________
__________________________________________________________________________________________


| 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:  
| 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]].
* 0 <nowiki>=</nowiki> Global
{{{!}} class{{=}}"wikitable" style{{=}}"text-align: center"
* 1 <nowiki>=</nowiki> Side
! colspan{{=}}"6" {{!}} channel ID number correspondence
* 2 <nowiki>=</nowiki> Command
{{!}}-
* 3 <nowiki>=</nowiki> Group
{{!}} Global
* 4 <nowiki>=</nowiki> Vehicle
{{!}} Side
* 5 <nowiki>=</nowiki> Direct
{{!}} Command
* 6-15 <nowiki>=</nowiki> Custom Radio (Is not supported by [[channelEnabled]])
{{!}} Group
{{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=
{{!}} Vehicle
{{!}} Direct
{{!}}-
{{!}} 0
{{!}} 1
{{!}} 2
{{!}} 3
{{!}} 4
{{!}} 5
{{!}}}
{{Informative | [[radioChannelCreate|Custom radios]] (6..15) are '''not''' supported.}}
{{Important | Before Arma 3 v1.59.135661, the output of this command was [[Boolean]].}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''channelEnabled''' channel|SYNTAX=
| [[channelEnabled]] channel|SYNTAX=


|p1= channel: [[Number]] |PARAMETER1=
|p1= channel: [[Number]] |PARAMETER1=


| [[Array]] - in format [chat, VoN], where
| [[Array]] - in format [isTextChatEnabled, isVoiceEnabled] |RETURNVALUE=
* chat: [[Boolean]] - [[true]] if text chat is enabled
* VoN: [[Boolean]] - [[true]] if voice chat is enabled
|RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_isGlobalChatEnabled = ([[channelEnabled]] 0) [[select]] 0; // Check if user can use text on global channel</code> |EXAMPLE1=
|x1= <code>_isGlobalChatEnabled = ([[channelEnabled]] 0) [[select]] 0; {{cc|check if user can use text on global channel}}</code> |EXAMPLE1=
|x2= <code>_isGlobalVoiceEnabled = ([[channelEnabled]] 0) [[select]] 1; // Check if user can use the VoN on global channel</code> |EXAMPLE1=
 
|x2= <code>_isGlobalVoiceEnabled = ([[channelEnabled]] 0) [[select]] 1; {{cc|check if user can use the VoN on global channel}}</code> |EXAMPLE2=
 
|x3= <code>([[channelEnabled]] 0) [[params]] ["_isGlobalChatEnabled", "_isGlobalVoiceEnabled"]; {{cc|sets both variables}}</code> |EXAMPLE3=
____________________________________________________________________________________________
____________________________________________________________________________________________


|[[currentChannel]], [[setCurrentChannel]], [[getPlayerChannel]], [[enableChannel]], [[radioChannelCreate]]|SEEALSO=
|[[currentChannel]], [[setCurrentChannel]], [[getPlayerChannel]], [[enableChannel]], [[radioChannelCreate]]|SEEALSO=
}}
}}



Revision as of 10:21, 1 October 2019

Hover & click on the images for description

Description

Description:
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 ID number correspondence
Global Side Command Group Vehicle Direct
0 1 2 3 4 5
Custom radios (6..15) are not supported.
Before Arma 3 v1.59.135661, the output of this command was Boolean.
Groups:
Uncategorised

Syntax

Syntax:
channelEnabled channel
Parameters:
channel: Number
Return Value:
Array - in format [isTextChatEnabled, isVoiceEnabled]

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:
(channelEnabled 0) params ["_isGlobalChatEnabled", "_isGlobalVoiceEnabled"]; // sets both variables

Additional Information

See also:
currentChannelsetCurrentChannelgetPlayerChannelenableChannelradioChannelCreate

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

Notes

Bottom Section