PDA

View Full Version : Whisperlist Unity3d



sdrnavin
October 2nd, 2016, 10:36 AM
I want to have a mainchannel and 10 subchannels, this main channel has to speak to all subchannels.I thought whisperlist will do this, I tried like this,



public void Speaktoall(bool Sstatus)
{
uint64 scHandlerID = ts3_client.GetServerConnectionHandlerID();
if (Sstatus)
{
List<uint64> Allchanels = ts3_client.GetChannelList();// All channels in server
uint64[] TempChannels = new uint64[Allchanels.Count];
for (int t = 0; t < Allchanels.Count; t++)
{
TempChannels[t] = Allchanels[t];
print("Whispher to " + Allchanels[t]);
// print(ts3_client.GetChannelVariableAsString(TempCh annels[t-2],ChannelProperties.CHANNEL_NAME)+ " - Client count " + ts3_client.GetChannelClientList(scHandlerID, TempChannels[t-2]).Count);
}
ts3_client.RequestClientSetWhisperList(scHandlerID , 0, TempChannels, null);
}
else
{
ts3_client.RequestClientSetWhisperList(scHandlerID , 0,null, null);
}
}



But its not working. Can anyone help me on this

Alex_G
October 13th, 2016, 09:43 AM
Hello sdrnavin,

there is current a issue with the whisper lists inside the unity3d plugin.

I will upload a example project soon.

Regards,
Alex G.

Alex_G
October 20th, 2016, 06:50 AM
Hello sdrnavin,



//Attaching functions to the TeamSpeak callbacks.
TeamSpeakCallbacks.onIgnoredWhisperEvent += onIgnoredWhisperEvent;

private static void onIgnoredWhisperEvent(uint64 serverConnectionHandlerID, anyID clientID)
{
/*
* Add sending client to whisper allow list so own client will hear the voice data.
* It is sufficient to add a clientID only once, not everytime this event is called.
* However it won't hurt to add the same clientID to the allow list repeatedly, but is is not necessary.
*/
Debug.Log("Enter onIgnoredWhisperEvent");
ts3_client.AllowWhispersFrom(serverConnectionHandl erID, clientID);
}


// an example how to use whisper list
private void whisperlist()
{
// ID of the client whose whisper list is modified. If set to 0, the own client is modified (same as setting to own client ID).
ushort _clientID = 0;

// Array of channel IDs, terminated ! with 0. These channels will be added to the whisper list.
// To clear the list, pass NULL or an empty array.
ulong[] _targetChannelIDArray = new ulong[2];
_targetChannelIDArray[0] = 1; // 1 = Channel 1
_targetChannelIDArray[1] = 0;

// Array of client IDs, terminated ! with 0. These clients will be added to the whisper list.
// To clear the list, pass NULL or an empty array.
ushort[] _targetClientIDArray = null;

ts3_client.RequestClientSetWhisperList(_clientID, _targetChannelIDArray, _targetClientIDArray);
}



Regards,
Alex G.