channelEnabled: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Game version" to "|Game version=") |
Lou Montana (talk | contribs) (Fix Category:Pages using duplicate arguments in template calls and description) |
||
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]]. | | 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]]. | ||
{{{!}} class{{=}}"wikitable" style{{=}}"text-align: center" | |||
! colspan{{=}}"6" {{!}} channel ID number correspondence | |||
{{!}}- | |||
{{!}} Global | |||
{{!}} Side | |||
{{!}} Command | |||
{{!}} Group | |||
{{ | {{!}} 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= | ||
|p1= channel: [[Number]] |PARAMETER1= | |p1= channel: [[Number]] |PARAMETER1= | ||
| [[Array]] - in format [ | | [[Array]] - in format [isTextChatEnabled, isVoiceEnabled] |RETURNVALUE= | ||
|RETURNVALUE= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_isGlobalChatEnabled = ([[channelEnabled]] 0) [[select]] 0; | |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; | |||
|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
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 - 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
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