2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Returns the current radio / chat / marker channel.
|
2015-01-12 04:02:33 +00:00
|
|
|
*
|
2015-09-18 13:40:51 +00:00
|
|
|
* Arguments:
|
|
|
|
* None
|
2015-01-12 04:02:33 +00:00
|
|
|
*
|
2015-09-18 13:40:51 +00:00
|
|
|
* Return Value:
|
|
|
|
* The current channel ("group", "side", "global", "command", "vehicle", "direct", "custom_X") <STRING>
|
|
|
|
*
|
|
|
|
* Public: Yes
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-03-28 05:55:46 +00:00
|
|
|
#define CHANNELS ["global", "side", "command", "group", "vehicle", "direct"]
|
|
|
|
#define CHANNELS_LOCALIZED [localize "str_channel_global", localize "str_channel_side", localize "str_channel_command", localize "str_channel_group", localize "str_channel_vehicle", localize "str_channel_direct"]
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
private _currentChannel = currentChannel;
|
2015-03-28 05:55:46 +00:00
|
|
|
|
|
|
|
if (_currentChannel < count CHANNELS) then {
|
|
|
|
_currentChannel = CHANNELS select _currentChannel;
|
|
|
|
} else {
|
|
|
|
_currentChannel = format ["custom_%1", _currentChannel - count CHANNELS - 1];
|
|
|
|
};
|
|
|
|
|
|
|
|
_currentChannel
|