enableChannel: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(chat and von swapped)
Line 33: Line 33:
| [[Nothing]] |= Return value
| [[Nothing]] |= Return value


|s2= channel '''enableChannel''' [VoN, chat]         ''since Arma 3 v1.59.135661''|= Syntax
|s2= channel '''enableChannel''' [chat, VoN]         ''since Arma 3 v1.59.135661''|= Syntax


|p21= channel: [[Number]] |= Parameter 1
|p21= channel: [[Number]] |= Parameter 1
|p22= [VoN, chat]: [[Array]]  |= Parameter 2
|p22= [chat, VoN]: [[Array]]  |= Parameter 2
|p23= VoN: [[Boolean]] - [[true]] to enable voice chat|= Parameter 3
|p23= chat: [[Boolean]] - [[true]] to enable text chat|= Parameter 3
|p24= chat: [[Boolean]] - [[true]] to enable text chat|= Parameter 4
|p24= VoN: [[Boolean]] - [[true]] to enable voice chat|= Parameter 4


|r2= [[Nothing]] |= Return value
|r2= [[Nothing]] |= Return value
Line 44: Line 44:
   
   
|x1= <code>0 [[enableChannel]] [[false]]; // Disable user ability to send voice and text on global channel</code> |= Example 1
|x1= <code>0 [[enableChannel]] [[false]]; // Disable user ability to send voice and text on global channel</code> |= Example 1
|x2= <code>0 [[enableChannel]] <nowiki>[</nowiki>[[false]], [[true]]]; // Disable user ability to send voice but not text on global channel</code> |= Example 2
|x2= <code>0 [[enableChannel]] <nowiki>[</nowiki>[[true]], [[false]]]; // Disable user ability to send text but not voice on global channel</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 13:56, 21 April 2016

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. What this command cannot do:
  • It cannot disable incoming text or voice
  • It cannot interrupt own client's transmission in progress
  • It cannot affect any Custom Radio channels, only channels 0-5
  • It cannot persist, so if user is logged out, the changes are reset
  • It has no effect on chat related scripting commands, such as vehicleChat, globalChat, globalRadio, sideRadio, etc.
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:
  • 0 = Global
  • 1 = Side
  • 2 = Command
  • 3 = Group
  • 4 = Vehicle
  • 5 = Direct
  • 6-15 = Custom Radio (Is not supported by enableChannel)
Groups:
Uncategorised

Syntax

Syntax:
channel enableChannel enable
Parameters:
channel: Number
enable: Boolean - enable both VoN and chat
Return Value:
Nothing

Alternative Syntax

Syntax:
channel enableChannel [chat, VoN]         since Arma 3 v1.59.135661
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]; // Disable user ability to send text but not 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