enableChannel: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|r2= Nothing |RETURNVALUE= " to "|r2= Nothing |RETURNVALUE2= ")
m (Text replacement - "server.cfg" to "server config")
 
(47 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
______________________________________________________________________________________________


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


|1.42|Game version=
|eff= local


|eff= local |Multiplayer Effects=
|gr1= Radio and Chat
__________________________________________________________________________________________


| Enables/disables UI functionality which is responsible for sending text or voice chat to the given chat channel. If the channel was disabled in [[description.ext]], it can be enabled with this command, however the UI functionality changes will be local to the PC executing this command. What this command cannot do:
|descr= Enables/disables UI functionality which is responsible for sending text or voice chat to the given chat channel.
* It cannot disable incoming text or voice
{{Feature|informative|
* It cannot interrupt own client's transmission in progress
This command:
* It cannot affect any Custom Radio channels, only channels 0-5
* can override [[Description.ext]] or [[Arma 3: Server Config File|server config]]'s channel setting
* It cannot persist, so if user is logged out, the changes are reset
* cannot disable Global channel for the admin or server host, because Global channel is always available for the admin
* It has no effect on chat related scripting commands, such as [[vehicleChat]], [[globalChat]], [[globalRadio]], [[sideRadio]], etc.
* does not disable ''incoming'' text or voice
So in short, just like with [[getPlayerChannel]], this command provides a nice ability to hack into chat UI with some limitations. And the reason why it is possible to disable entire channels (except Group) in [[description.ext]], is because no one can talk or text, therefore no transmission is happening. NOTE: Group channel cannot be disabled, neither with [[enableChannel]], nor with [[description.ext]] param. Channel / Number correspondence:
* actively interrupts (since {{arma3}} v2.02) the current communication in progress
* 0 <nowiki>=</nowiki> Global
* does not affect chat related scripting commands such as [[vehicleChat]], [[globalRadio]] etc.
* 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 [[enableChannel]])
|DESCRIPTION=
____________________________________________________________________________________________
 
| channel '''enableChannel''' enable|SYNTAX=


|p1= channel: [[Number]] |PARAMETER1=
{{{!}} class="wikitable align-center"
|p2= enable: [[Boolean]] - enable both VoN and chat |PARAMETER2=
! 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
{{!}}}


| [[Nothing]] |RETURNVALUE=
|s1= channelID [[enableChannel]] enable


|s2= channel '''enableChannel''' [chat, VoN] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''since Arma 3 v1.59.135661''|SYNTAX2=
|p1= channelID: [[Number]] - [[Channel IDs|channel ID]]


|p21= channel: [[Number]] |PARAMETER21=
|p2= enable: [[Boolean]] - [[true]] to enable, [[false]] to disable (both VoN and chat)
|p22= [chat, VoN]: [[Array]] |PARAMETER22=
|p23= chat: [[Boolean]] - [[true]] to enable text chat|PARAMETER23=


|p24= VoN: [[Boolean]] - [[true]] to enable voice chat|PARAMETER4=
|r1= [[Nothing]]


|r2= [[Nothing]] |RETURNVALUE2=
|s2= channelID [[enableChannel]] [chat, VoN]
____________________________________________________________________________________________
 
|x1= <code>0 [[enableChannel]] [[false]]; // Disable user ability to send voice and text on global channel</code> |EXAMPLE1=
|x2= <code>0 [[enableChannel]] <nowiki>[</nowiki>[[true]], [[false]]]; // Enable user ability to send text but disable voice on global channel</code> |EXAMPLE2=
____________________________________________________________________________________________


|[[currentChannel]], [[setCurrentChannel]], [[getPlayerChannel]], [[channelEnabled]], [[radioChannelCreate]]|SEEALSO=
|s2since= arma3 1.60


}}
|p21= channelID: [[Number]] - [[Channel IDs|channel ID]]


<h3 style="display:none">Notes</h3>
|p22= chat: [[Boolean]] - [[true]] to enable text chat
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|p23= VoN: [[Boolean]] - [[true]] to enable voice chat
</dl>


<h3 style="display:none">Bottom Section</h3>
|r2= [[Nothing]]


[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|x1= <sqf>0 enableChannel false; // disable user ability to send voice and text on global channel</sqf>
[[Category:Command_Group:_Radio_Control|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
|x2= <sqf>0 enableChannel [true, false]; // enable user ability to send text but disable voice on global channel</sqf>
<dl class="command_description">
<dd class="notedate">Posted on June 17, 2016 - 21:48 (UTC)</dd>
<dt class="note">[[User:AgentRevolution|AgentRev]]</dt>
<dd class="note">
If the user is admin, global channel is fully enabled, regardless of this command.
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
|seealso= [[currentChannel]] [[setCurrentChannel]] [[getPlayerChannel]] [[channelEnabled]] [[radioChannelCreate]]
<dl class="command_description">
}}
<dd class="notedate">Posted on July 30, 2016 - 15:46 (UTC)</dd>
<dt class="note">[[User:Lucian|Lucian]]</dt>
<dd class="note">
Alternative Syntax supports Custom Radio Channels
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 13:36, 17 May 2024

Hover & click on the images for description

Description

Description:
Enables/disables UI functionality which is responsible for sending text or voice chat to the given chat channel.
This command:
  • can override Description.ext or server config's channel setting
  • cannot disable Global channel for the admin or server host, because Global channel is always available for the admin
  • does not disable incoming text or voice
  • actively interrupts (since Arma 3 v2.02) the current communication in progress
  • does not affect chat related scripting commands such as vehicleChat, globalRadio etc.
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:
channelID enableChannel enable
Parameters:
channelID: Number - channel ID
enable: Boolean - true to enable, false to disable (both VoN and chat)
Return Value:
Nothing

Alternative Syntax

Syntax:
channelID enableChannel [chat, VoN]
Parameters:
channelID: Number - channel ID
chat: Boolean - true to enable text chat
VoN: Boolean - true to enable voice chat
Return Value:
Nothing

Examples

Example 1:
0 enableChannel false; // disable user ability to send voice and text on global channel
Example 2:
0 enableChannel [true, false]; // enable user ability to send text but disable voice on global channel

Additional Information

See also:
currentChannel setCurrentChannel getPlayerChannel channelEnabled 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