It's written with C# and I used Microsoft .Net Framework v2.0.40607. Download it from here.
Other thing I used is the great .NET Wrapper for using Team Speak SDK functions from .Net. The wrapper is made by James Mimeault and I used revision 02/22/2005. Get the wrapper from here. The file is named TSRemote.zip, unzip it to somewhere.
To compile the plugin, put the source code (you'll find it from below) of TSPlugin to file named as TSPlug.cs and copy TSRemote.cs to the same directory. Next open TSRemote.cs to text editor and change line
namespace YourNameSpaceHere
to
namespace TSPlug
and save file.
The C#-compiler comes with .NET Framework and should be in folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607. Add this to path to use the compiler (csc.exe) from anywhere. But of course it's possible to use it by entering the whole path with the compiler file name while compiling.
Now, go to command prompt and to the folder containing files TSPlug.cs and TSRemote.cs. To Compile type the following command and press enter:
csc /target:library *.cs
Or if you didn't add framework directory to the system path, use the following string instead:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\csc.exe /target:library *.cs
And after a little bit of waiting you'll find file TSPlug.dll from the same directory. Copy DLL-file to plugins\ -directory under your LCD Smartie directory. Also copy file TSRemote.dll from directory client_sdk under your team speak directory to the plugins directory.
In LCD Smartie I have following config on TS screen:
line 1:
$dll(TSPlug,1,param1,param2)
Continue on next line is on for lines 1 and 2.
Line 4:
$dll(TSPlug,2,param1,param2)
Center the text if wanted.
I hope it works and there are not so bad typos on this message.
And finally, here is the source code for TSPlugin:
Code: Select all
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace TSPlug
{
public class LCDSmartie
{
private bool bOpen = false;
public LCDSmartie()
{
if (TSRemote.Open() == 0)
{
bOpen = true;
}
}
public string function1(string param1, string param2)
{
try
{
string strPlayers = "Not connected to TS";
if (bOpen)
{
TSRemote.TtsrPlayerInfo[] tpia = TSRemote.Players;
strPlayers = tpia.Length.ToString();
strPlayers += " ";
for (int index = 0; index < tpia.Length; index++)
{
strPlayers += tpia[index].NickName;
strPlayers += "|";
}
}
return strPlayers;
}
catch (Exception e)
{
return e.Message;
}
}
public string function2(string param1, string param2)
{
try
{
string strSpeakers = "Not connected to TS";
if (bOpen)
{
int[] iSpeakers = TSRemote.SpeakerIds;
strSpeakers = iSpeakers.Length.ToString() + " ";
for (int index = 0; index < iSpeakers.Length; index++)
{
TSRemote.TtsrPlayerInfo tpi = TSRemote.GetPlayerInfo(iSpeakers[index]);
strSpeakers += tpi.NickName + "|";
}
}
return strSpeakers;
}
catch (Exception e)
{
return e.Message;
}
}
}
}