enableChannel: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <nowiki>[</nowiki>" to " [<nowiki/>")
(Fix description and clean comments)
Line 9: Line 9:
__________________________________________________________________________________________
__________________________________________________________________________________________


| 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:
| 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.
* It cannot disable incoming text or voice
{{Important | Only the [[#Alternative Syntax|Alternative Syntax]] can affect Custom Radio channels (6-15).}}
* It cannot interrupt own client's transmission in progress
{{Informative|
* It cannot affect any Custom Radio channels, only channels 0-5
This command:
* It cannot persist, so if user is logged out, the changes are reset
* cannot disable global channel 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:  
* does not interrupt own client's transmission in progress (but will prevent any further ones)
* 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
Channel&nbsp;/&nbsp;Number correspondence:
* 4 <nowiki>=</nowiki> Vehicle
* 0 {{=}} Global
* 5 <nowiki>=</nowiki> Direct
* 1 {{=}} Side
* 6-15 <nowiki>=</nowiki> Custom Radio (Is not supported by [[enableChannel]])
* 2 {{=}} Command
* ''3 {{=}} Group'' (cannot be disabled with [[enableChannel]] nor [[Description.ext#disableChannels|Description.ext/disableChannels[]<nowiki/>]])
* 4 {{=}} Vehicle
* 5 {{=}} Direct
* 6-15 {{=}} Custom Radio
|DESCRIPTION=
|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| channel '''enableChannel''' enable|SYNTAX=
| channel [[enableChannel]] enable |SYNTAX=


|p1= channel: [[Number]] |PARAMETER1=
|p1= channel: [[Number]] |PARAMETER1=
|p2= enable: [[Boolean]] - enable both VoN and chat |PARAMETER2=
 
|p2= enable: [[Boolean]] - [[true]] to enable, [[false]] to disable (both VoN and chat) |PARAMETER2=


| [[Nothing]] |RETURNVALUE=
| [[Nothing]] |RETURNVALUE=


|s2= channel '''enableChannel''' [chat, VoN] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''since Arma 3 v1.59.135661''|SYNTAX2=
|s2= channel [[enableChannel]] [chat, VoN] {{since|arma3|1.59.135661|y}} |SYNTAX2=


|p21= channel: [[Number]] |PARAMETER21=
|p21= channel: [[Number]] |PARAMETER21=
|p22= [chat, VoN]: [[Array]]  |PARAMETER22=
|p23= chat: [[Boolean]] - [[true]] to enable text chat|PARAMETER23=


|p24= VoN: [[Boolean]] - [[true]] to enable voice chat|PARAMETER4=
|p22= [chat, VoN]: [[Array]] |PARAMETER22=
 
|p23= chat: [[Boolean]] - [[true]] to enable text chat |PARAMETER23=
 
|p24= VoN: [[Boolean]] - [[true]] to enable voice chat |PARAMETER4=


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


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


Line 61: Line 68:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Radio Control|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Radio_Control|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<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 -->
<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 -->

Revision as of 16:49, 22 March 2020

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. 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.
Only the Alternative Syntax can affect Custom Radio channels (6-15).
This command:
  • cannot disable global channel for the admin
  • does not disable incoming text or voice
  • does not interrupt own client's transmission in progress (but will prevent any further ones)
  • does not affect chat related scripting commands such as vehicleChat, globalRadio etc.

Channel / Number correspondence:

Groups:
Uncategorised

Syntax

Syntax:
channel enableChannel enable
Parameters:
channel: Number
enable: Boolean - true to enable, false to disable (both VoN and chat)
Return Value:
Nothing

Alternative Syntax

Syntax:
channel enableChannel [chat, VoN] Template:since
Parameters:
channel: Number
[chat, VoN]: Array
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:
currentChannelsetCurrentChannelgetPlayerChannelchannelEnabledradioChannelCreate

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