Tutorial How To Make/Develop TeamSpeak 3 Plugins

Laszl0w

Active Member
Joined
Oct 10, 2015
Messages
217
Likes
148
Points
88
Age
24
Location
Hungary
#21
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.
}
 
Joined
Oct 30, 2016
Messages
5
Likes
1
Points
35
Age
22
#22
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 :)
 

Nicer

Moderator
Developer
Joined
Apr 23, 2016
Messages
413
Likes
220
Points
107
Location
void
#23
Is there any .NET (C#) wrapper?
EDIT: Found it on download page :D :D :D gg
 
Joined
Oct 30, 2016
Messages
5
Likes
1
Points
35
Age
22
#24
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:
Joined
Jan 5, 2016
Messages
11
Likes
1
Points
35
Age
24
#25
Is it possible to add a "Set Channel Group" into my Lua Script? How?

--greetings defraqq--
 

Bluscream

Retired Staff
Contributor
Joined
May 8, 2015
Messages
925
Likes
889
Points
160
Location
Germany
#26
Not possible with LUA. Use python much easier anyway

Code:
schid = ts3.getCurrentServerConnectionHandlerID()
(error, dbid) = ts3.getClientVariableAsUInt64(schid, clientID, ts3defines.ClientPropertiesRare.CLIENT_DATABASE_ID)
ts3.requestSetClientChannelGroup(schid, [channelGroupID], self.channels, [dbid])
Source:
You do not have permission to view link Log in or register now.
 
Last edited by a moderator:

FarisDev

Someone loves to help people
Contributor
Joined
Jun 9, 2016
Messages
257
Likes
95
Points
92
Age
28
Location
Saudi Arabia, Dammam
#27
16 37 C:\Users\****\Desktop\pluginsdk\src\plugin.c [Error] teamspeak/public_errors.h: No such file or directory
? :D
 

indect

New Member
Joined
Jan 16, 2017
Messages
16
Likes
17
Points
18
#28
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

Someone loves to help people
Contributor
Joined
Jun 9, 2016
Messages
257
Likes
95
Points
92
Age
28
Location
Saudi Arabia, Dammam
#29
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
Joined
Apr 26, 2015
Messages
1,010
Likes
887
Points
176
#33
Did you even try ? What you said doesn't make sense ! It's a freaking ZIP file !
 

FarisDev

Someone loves to help people
Contributor
Joined
Jun 9, 2016
Messages
257
Likes
95
Points
92
Age
28
Location
Saudi Arabia, Dammam
#38
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.
 
Joined
Jan 5, 2016
Messages
11
Likes
1
Points
35
Age
24
#40
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