Tutorial How To Make/Develop TeamSpeak 3 Plugins

Laszl0w

Well-Known Member
Oct 10, 2015
217
149
143
Code:
void  ts3plugin_onClientMoveEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, const char* moveMessage)
{
   anyID myID;
   ts3Functions.getClientID(serverConnectionHandlerID, &myID);
   if(clientID==myID)
   {
   ts3Functions.requestSendChannelTextMsg(serverConnectionHandlerID,"Im using AvRape Remaked from R4P3.NET",newChannelID, NULL);//This is only when you joining any channel.
   }
//This is when any other client switching between channels.
}
 
Oct 30, 2016
5
1
35
the event fires for all users you can see.

For the movemessage just test it yourself and print it :D

Ah thanks for the info!

Code:
void  ts3plugin_onClientMoveEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, const char* moveMessage)
{
   anyID myID;
   ts3Functions.getClientID(serverConnectionHandlerID, &myID);
   if(clientID==myID)
   {
   ts3Functions.requestSendChannelTextMsg(serverConnectionHandlerID,"Im using AvRape Remaked from R4P3.NET",newChannelID, NULL);//This is only when you joining any channel.
   }
//This is when any other client switching between channels.
}

And thank you for the example and description :)

I feel like it's a good community here, I shall take a look around soon :)
 

Najsr

Moderator
TeamSpeak Developer
Apr 23, 2016
483
249
167
Is there any .NET (C#) wrapper?
EDIT: Found it on download page :D :D :D gg
 
Oct 30, 2016
5
1
35
Is there any .NET (C#) wrapper?
EDIT: Found it on download page :D :D :D gg
Good luck, I took a peek and it was more of a headache to even get the example plugin working out of the directory its stored in. If you move it and try to correct the file paths for all the linked files in the project, it just wouldn't work :/ I'm finding it easier using the C SDK to be honest.

Though I do have a question for the others if you're able to help? I'm trying to get the ID of a channel that another client is in, but it's never successful. I think the code is correct since I basically took these function snippets from the sample plugin. My calloc() is successful but ts3Functions.getChannelOfClient() never assigns anything to *invokersChannelID. I know the fromID is set because I can succesfully PM the client. Any ideas?
Code:
// Move to the channel that the user is in
invokersChannelID = calloc(1, sizeof(uint64));
ts3Functions.getChannelOfClient(serverConnectionHandlerID, fromID, invokersChannelID);
ts3Functions.createReturnCode(pluginID, returnCode, RETURNCODE_BUFSIZE);
if(ts3Functions.requestClientMove(serverConnectionHandlerID, myID, *invokersChannelID, "", returnCode) != ERROR_ok) {
    ts3Functions.logMessage("Error requesting client move", LogLevel_INFO, "Plugin", serverConnectionHandlerID);
}

EDIT:
Just had a thought, does my the client running the plugin need to be subscribed to the channel that the user I'm trying to locate is in?
EDIT 2:
Aha, that was the issue! Nevermind lol :)
 
Last edited:

Bluscream

Retired Staff
Contributor
May 8, 2015
967
934
211
Last edited by a moderator:

FarisDev

L oryh brx
Contributor
Jun 9, 2016
277
111
107
16 37 C:\Users\****\Desktop\pluginsdk\src\plugin.c [Error] teamspeak/public_errors.h: No such file or directory
? :D
 

indect

New Member
Jan 16, 2017
16
17
18
16 37 C:\Users\****\Desktop\pluginsdk\src\plugin.c [Error] teamspeak/public_errors.h: No such file or directory
? :D
You're missing a file as the error message tells you. Did you open the project solution file in VS? Does the file it says in the message really exist?
 

FarisDev

L oryh brx
Contributor
Jun 9, 2016
277
111
107
I just open the project on dev C++, the file exists and It's good btw I don't know why he is telling me no such file or directory.
 

ehthe

Retired Staff
Contributor
Apr 26, 2015
1,028
896
216
Did you even try ? What you said doesn't make sense ! It's a freaking ZIP file !
 

FarisDev

L oryh brx
Contributor
Jun 9, 2016
277
111
107
Hello, there's problem can some one tell me how to fix it ?
Cannot open source file all .h cannot open
someone help me please.
 

defraqq

Member
Jan 5, 2016
11
1
35
Ok guys... i explain how to create a self installer for ts3.

First create a folder named plugins, copy ur .dll into it
Create a .ini textfile and put it next to ur plugins folder and open it.
This text needs to stand in there:
Name = test
Type = Plugin
Author = test
Version = 1.1
Platforms = win32, win64
Description = test

Save and close.
Select the folder plugins and .ini file, rightclick example: Winrar -> create a .zip file.
Than rename it: .zip to -> .ts3_plugin

Finish. Double click it for checking if its working.

Greetings from Mobilephone c:
 
Top