{"name":"commandRadio","operator":null,"title":"commandRadio","type":"command","url":"https://community.bistudio.com/wiki/commandRadio","revid":325178,"updated":"2022-07-01T14:34:30Z","groups":["Radio and Chat","Sounds"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"description":"Sends the audio message to the command radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. 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).\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages.\n> A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.\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 commandRadio radioName","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"unit to transmit","types":["Object"],"since":null,"text":"unit: Object - unit to transmit"},{"name":"radioName","type":"String","optional":false,"default":null,"description":"class name from CfgRadio","types":["String"],"since":null,"text":"radioName: String - class name from CfgRadio"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"radioName","types":["String"]}},{"syntax":"[side, identity] commandRadio radioName","since":null,"effect":null,"exec":null,"params":[{"name":"side","type":"Side","optional":false,"default":null,"description":"side to which the transmission will be played","types":["Side"],"since":null,"text":"side: Side - side to which the transmission will be played"},{"name":"identity","type":"String","optional":false,"default":null,"description":"class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:\n- \"Base\"\n- \"HQ\"\n- \"PAPA_BEAR\"\n- \"AirBase\"\n- \"BLU\"\n- \"OPF\"\n- \"IND\"\n- \"IND_G\"","types":["String"],"since":null,"text":"identity: String - class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:\n- \"Base\"\n- \"HQ\"\n- \"PAPA_BEAR\"\n- \"AirBase\"\n- \"BLU\"\n- \"OPF\"\n- \"IND\"\n- \"IND_G\""},{"name":"radioName","type":"String","optional":false,"default":null,"description":"class name from CfgRadio","types":["String"],"since":null,"text":"radioName: String - class name from CfgRadio"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"[side, identity]","types":["Array"]},"right":{"text":"radioName","types":["String"]}}],"examples":[{"text":"```sqf\n_soldierOne commandRadio \"messageOne\";\n```","code":["_soldierOne commandRadio \"messageOne\";"]},{"text":"```sqf\nplayer commandRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));\n```","code":["player commandRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]},{"text":"```sqf\n[west, \"Base\"] commandRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));\n```","code":["[west, \"Base\"] commandRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["sideRadio","groupRadio","customRadio","vehicleRadio","globalRadio","directSay","commandChat"],"notes":[{"user":"Nikita320106","date":"2010-06-24T08:55:00Z","text":"*example:*\n\n```sqf\n_unit commandRadio \"SentCmdHide\";\n```\n\nradio command from CA_Dubbing config should work"},{"user":"Killzone_Kid","date":"2016-12-03T21:33: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 commandRadio \"#MySound.ogg\";\n```"}],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Radio and Chat","Command Group: Sounds","Introduced with Arma 2 version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}