It will work only for units in the same group. In init for each playable unit:
nul = [this] execVM "radiocheck.sqf"
If you need it to JIP combatible then you need to add that code line to your init.sqf/sqs instead.
Script radiocheck.sqf
if (isPlayer _this) then
{
_grp = group player;
while {TRUE && alive player} do
{
waitUntil {{player distance _x < 5 && alive _x && "MAP_RADIO" in weapons _x && _x != player && alive player} count units _grp > 0};
radioID = player addAction["Use Radio","PCP\Client\DlgControl.sqs", [], 0, false, false, ""];
waitUntil {{player distance _x < 5 && alive _x && "MAP_RADIO" in weapons _x && _x != player && alive player} count units _grp < 1};
player removeAction radioID;
};
};
Hopefully, the dialog will open quickly enough to prevent multiple instances i.e. player clicks on the actio nagain beore dialog has opened.