getPlayerChannel: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - " " to " ") |
Killzone Kid (talk | contribs) No edit summary |
||
| (16 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|version1= 1.42 | |||
|1.42 | |||
|arg= global | |arg= global | ||
| Line 9: | Line 8: | ||
|gr1= Radio and Chat | |gr1= Radio and Chat | ||
| Returns channel number for given player, '''provided that player is | |descr= Returns channel number for given player, '''provided that player is SPEAKING''', otherwise -1. Having mic on is not enough, player has to make a sound. There are several limitations to this command: | ||
* It does not work on dedicated server, the return is always -1, only client can detect other client talking. | * It does not work on dedicated server, the return is always -1, only client can detect other client talking. | ||
* Prior to Arma 3 v2.01.146856 did not detect when someone talked on direct chat at all anywhere. | * Prior to Arma 3 v2.01.146856 did not detect when someone talked on direct chat at all anywhere. | ||
* The client on which command is executed has to able to receive transmission before the transmission channel can be detected. For example if a player is not in the same group as a speaker and the speaker speaks on Group Channel, the player cannot hear the speaker and therefore cannot detect what channel the speaker is on. | * The client on which command is executed has to able to receive transmission before the transmission channel can be detected. For example if a player is not in the same group as a speaker and the speaker speaks on Group Channel, the player cannot hear the speaker and therefore cannot detect what channel the speaker is on. | ||
In short, this command mimics the speaking icon from the UI. Correspondence between channel and number: | In short, this command mimics the speaking icon from the UI. Correspondence between channel and number: | ||
{{{!}} class | {{{!}} class="wikitable align-center" | ||
! colspan | ! colspan="13" {{!}} [[Channel IDs|channel ID]] number correspondence | ||
{{!}}- | {{!}}- | ||
{{!}} | {{!}} {{n/a}} | ||
{{!}} Global | {{!}} Global | ||
{{!}} Side | {{!}} Side | ||
| Line 25: | Line 24: | ||
{{!}} Direct | {{!}} Direct | ||
{{!}} Custom1 | {{!}} Custom1 | ||
{{!}} | {{!}} rowspan="2" {{!}} .. | ||
{{!}} | |||
{{!}} Custom10 | {{!}} Custom10 | ||
{{!}} {{GVI|arma3|2.22|size= 0.75}} Custom11 | |||
{{!}} rowspan="2" {{!}} .. | |||
{{!}} Custom50 | |||
{{!}}- | {{!}}- | ||
{{!}} -1 | {{!}} -1 | ||
| Line 43: | Line 38: | ||
{{!}} 5 | {{!}} 5 | ||
{{!}} 6 | {{!}} 6 | ||
{{!}} 15 | {{!}} 15 | ||
{{!}} 26 | |||
{{!}} 65 | |||
{{!}}} | {{!}}} | ||
| [[getPlayerChannel]] player | |s1= [[getPlayerChannel]] player | ||
|p1= player: [[Object]] | |p1= player: [[Object]] | ||
| [[Number]] - [[Channel IDs|channel ID]] | |r1= [[Number]] - [[Channel IDs|channel ID]] | ||
|x1= < | |x1= <sqf>private _channelID = getPlayerChannel player;</sqf> | ||
|seealso= [[setCurrentChannel]] | |seealso= [[setCurrentChannel]] [[currentChannel]] [[enableChannel]] [[channelEnabled]] [[radioChannelCreate]] [[radioChannelInfo]] | ||
}} | }} | ||
Latest revision as of 02:44, 23 November 2025
Description
- Description:
- Returns channel number for given player, provided that player is SPEAKING, otherwise -1. Having mic on is not enough, player has to make a sound. There are several limitations to this command:
- It does not work on dedicated server, the return is always -1, only client can detect other client talking.
- Prior to Arma 3 v2.01.146856 did not detect when someone talked on direct chat at all anywhere.
- The client on which command is executed has to able to receive transmission before the transmission channel can be detected. For example if a player is not in the same group as a speaker and the speaker speaks on Group Channel, the player cannot hear the speaker and therefore cannot detect what channel the speaker is on.
channel ID number correspondence N/A Global Side Command Group Vehicle Direct Custom1 .. Custom10
2.22 Custom11
.. Custom50 -1 0 1 2 3 4 5 6 15 26 65 - Groups:
- Radio and Chat
Syntax
- Syntax:
- getPlayerChannel player
- Parameters:
- player: Object
- Return Value:
- Number - channel ID
Examples
- Example 1:
Additional Information
- See also:
- setCurrentChannel currentChannel enableChannel channelEnabled radioChannelCreate radioChannelInfo
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note