customChat: Difference between revisions

From Bohemia Interactive Community
m (template:command argument fix)
No edit summary
 
(40 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 0.50


|0.50|= Game version
|gr1= Radio and Chat


|arg= global |Multiplayer Arguments=
|gr2= Custom Radio and Chat


|eff= local |Multiplayer Effects=
|arg= global
____________________________________________________________________________________________


| Sends the chat message to the custom radio channel. The radio channel needs to be created on the server before hand, with [[radioChannelCreate]] command. |DESCRIPTION=
|eff= local
____________________________________________________________________________________________


| unit '''customChat''' [channel, message] |SYNTAX=
|descr= Sends the chat message to the custom radio channel. The radio channel needs to be created on the server before hand, with [[radioChannelCreate]] command. Use [[clearRadio]] to clear chat history


|p1= unit: [[Object]] |PARAMETER1=
{{Feature|important|The unit must have an [[assignItem|assigned]] radio item (such as '''''"ItemRadio"''''') to see or transmit the messages. A radio item must have the property <syntaxhighlight lang="cpp" inline>simulation = "ItemRadio";</syntaxhighlight> in its [[CfgWeapons_Config_Reference#simulation.3D.22Weapon.22|CfgWeapons config]].}}


|p2= [channel, message]: [[Array]]  |PARAMETER2=
|s1= unit [[customChat]] [customChannelID, message]


|p3= channel: [[Number]] - custom radio channel id returned by [[radioChannelCreate]] command|PARAMETER3=
|p1= unit: [[Object]] - sender


|p4= message: [[String]] |PARAMETER4=
|p2= customChannelID: [[Number]] - [[Channel IDs|Custom channel ID]] returned by [[radioChannelCreate]] command


| [[Nothing]] |RETURNVALUE=
|p3= message: [[String]]


|r1= [[Nothing]]


|x1= <code>_unit [[customChat]] [1, "Hi, I am a custom chat message"];</code>|EXAMPLE1=
|x1= <sqf>_unit customChat [1, "Hi, I am a custom chat message"];</sqf>


|x2= <code>[[driver]] [[vehicle]] [[player]] [[sideChat]] "sideChat";
|x2= [[File:xChat.jpg|right]]
[[driver]] [[vehicle]] [[player]] [[globalChat]] "globalChat";
<sqf>
[[driver]] [[vehicle]] [[player]] [[groupChat]] "groupChat";
driver vehicle player sideChat "sideChat";
[[vehicle]] [[player]] [[vehicleChat]] "vehicleChat";
driver vehicle player globalChat "globalChat";
[[driver]] [[vehicle]] [[player]] [[commandChat]] "commandChat";
driver vehicle player groupChat "groupChat";
[[driver]] [[vehicle]] [[player]] [[customChat]] [1, "customChat"];
vehicle player vehicleChat "vehicleChat";
[[systemChat]] "systemChat";</code>
driver vehicle player commandChat "commandChat";
<br>[[Image:xChat.jpg]]|EXAMPLE1=
driver vehicle player customChat [1, "customChat"];
systemChat "systemChat";
</sqf>


____________________________________________________________________________________________
|seealso= [[globalChat]] [[groupChat]] [[vehicleChat]] [[commandChat]] [[sideChat]] [[systemChat]] [[radioChannelCreate]] [[customRadio]]
 
| [[globalChat]], [[groupChat]], [[vehicleChat]], [[commandChat]], [[sideChat]], [[systemChat]], [[radioChannelCreate]], [[customRadio]] |SEEALSO=
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 01:04, 17 November 2025

Hover & click on the images for description

Description

Description:
Sends the chat message to the custom radio channel. The radio channel needs to be created on the server before hand, with radioChannelCreate command. Use clearRadio to clear chat history
The unit must have an assigned radio item (such as "ItemRadio") to see or transmit the messages. A radio item must have the property simulation = "ItemRadio"; in its CfgWeapons config.
Groups:
Radio and ChatCustom Radio and Chat

Syntax

Syntax:
unit customChat [customChannelID, message]
Parameters:
unit: Object - sender
customChannelID: Number - Custom channel ID returned by radioChannelCreate command
message: String
Return Value:
Nothing

Examples

Example 1:
_unit customChat [1, "Hi, I am a custom chat message"];
Example 2:
xChat.jpg
driver vehicle player sideChat "sideChat"; driver vehicle player globalChat "globalChat"; driver vehicle player groupChat "groupChat"; vehicle player vehicleChat "vehicleChat"; driver vehicle player commandChat "commandChat"; driver vehicle player customChat [1, "customChat"]; systemChat "systemChat";

Additional Information

See also:
globalChat groupChat vehicleChat commandChat sideChat systemChat radioChannelCreate customRadio

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note