{"name":"directSay","title":"directSay","type":"command","url":"https://community.bistudio.com/wiki/directSay","revid":376774,"updated":"2025-11-17T00:05:11Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends given audio message to the direct channel. Command operates just like xxxxRadio commands, but the sound is played over direct channel and is independent of fadeSound. The message is defined in CfgRadio in the description.ext file or config radio protocol or a kbAddTopic. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec). Use clearRadio to clear chat history\n\n> [!NOTE]\n> When transmitting unit gets killed, transmission will be interrupted. However when receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit directSay radioName","params":[{"name":"unit","type":"Object","description":"unit to transmit","type_expr":"Object"},{"name":"radioName","type":"String","description":"class name from CfgRadio","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"radioName"}}],"examples":[{"code":["player directSay configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]},{"text":"An equivalent of a ***directChat*** command:\n\n```sqf\n[player, \"Hello there\", 30] call {\n    params [\"_unit\", \"_text\", \"_distance\"];\n    [_unit, _text] remoteExec [\"globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < _distance }];\n};\n```\n\nA function can be made for localisation purpose:\n\n```sqf\n/* TAG_fnc_globalChat */\nparams [\n    [\"_unit\", objNull, [objNull]],\n    [\"_text\", \"\", [\"\"]]\n];\n\n_unit globalChat (_text call BIS_fnc_localize);\n```\n\n```sqf\n// usage\n[player, \"STR_HelloThere\"] remoteExec [\"TAG_fnc_globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < 30 }];\n```","code":["[player, \"Hello there\", 30] call {\n\tparams [\"_unit\", \"_text\", \"_distance\"];\n\t[_unit, _text] remoteExec [\"globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < _distance }];\n};","/* TAG_fnc_globalChat */\nparams [\n\t[\"_unit\", objNull, [objNull]],\n\t[\"_text\", \"\", [\"\"]]\n];\n\n_unit globalChat (_text call BIS_fnc_localize);","// usage\n[player, \"STR_HelloThere\"] remoteExec [\"TAG_fnc_globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < 30 }];"]}],"see_also":["sideRadio","groupRadio","customRadio","vehicleRadio","globalRadio","commandRadio"],"notes":[{"user":"Killzone_Kid","date":"2016-12-03T21:32:00Z","text":"To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial), prefix the full filename including file extension with #.\nFor example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer directSay \"#MySound.ogg\";\n```"}]}