Results 1 to 5 of 5
Thread: LUA script issues
-
05-08-2012, 07:36 #1
-= TeamSpeak User =-
- Join Date
- Aug 2012
- Posts
- 2
LUA script issues
Hello, so I can't seem to find any support on this and the documentation for LUA is less than available in regards to TS3. I'm fairly new to LUA language, but I am having an issue with a script to just return all clients name, next to their idle time.
That is what I have, however the issue I am having is that it is returning this:Code:local clients, error = ts3.getClientList(serverConnectionHandlerID) for i=1, #clients do ts3.requestClientVariables(serverConnectionHandlerID, clients[i]) local name, nameError = ts3.getClientVariableAsString(serverConnectionHandlerID, clients[i], ts3defs.ClientProperties.CLIENT_NICKNAME) local iTime, idleError = ts3.getClientVariableAsString(serverConnectionHandlerID, clients[i], ts3defs.ClientProperties.CLIENT_IDLE_TIME) ts3.printMessage(serverConnectionHandlerID, name .. ": " ..iTime,1) end
This is for all clients as well, even checking manually the idle times are not zero.[WS]Teddy: 0
Any support for this would be much appreciated.
-
05-08-2012, 08:15 #2
-= TeamSpeak Fanatic =-
- Join Date
- Jan 2010
- Location
- Germany
- Posts
- 2,038
I am not sure but I don't think you can get the Idle Time for any client but your own.
-
06-08-2012, 05:09 #3
-= TeamSpeak User =-
- Join Date
- Aug 2012
- Posts
- 2
Well, even while testing it to get my own, it still is returning zero.
I tried changing it to do it when OnUpdateClientEvent fires:Code:CLIENT_IDLE_TIME = 11, -- internal use
and still getting the same issue as before returning zero.Code:local function onUpdateClientEvent(serverConnectionHandlerID, clientID) ts3.requestClientVariables(serverConnectionHandlerID, clientID) local name, nameError = ts3.getClientVariableAsString(serverConnectionHandlerID, clientID, ts3defs.ClientProperties.CLIENT_NICKNAME) local iTime, idleError = ts3.getClientVariableAsString(serverConnectionHandlerID, clientID, ts3defs.ClientProperties.CLIENT_IDLE_TIME) ts3.printMessage(serverConnectionHandlerID, name .. ": " ..iTime,1) end
-
06-08-2012, 18:25 #4
-= TeamSpeak Fanatic =-
- Join Date
- Jan 2010
- Location
- Germany
- Posts
- 2,038
Well as the Comment behind the definition suggests it is for internal use by TeamSpeak only and not exported to LUA.
-
08-10-2012, 15:39 #5
-= TeamSpeak Lover =-
- Join Date
- Nov 2010
- Location
- Poland
- Posts
- 49
i think idle time is stored by
Code:getConnectionVariableAsUInt64(serverConnectionHandlerID, clientID, flag)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[outdated] Init Script (Modified the old TS2 Server Script)
By skuemmel in forum Linux / FreeBSDReplies: 2Last Post: 21-12-2009, 08:32 -
TS Script
By Suizido in forum [TeamSpeak 2] Addons & ScriptsReplies: 2Last Post: 06-06-2008, 19:08 -
Server Start Script issues
By spencerjw in forum [TeamSpeak 2] Server SupportReplies: 7Last Post: 23-02-2006, 19:06 -
search script / suche script
By Michael_Jim in forum [TeamSpeak 2] Addons & ScriptsReplies: 1Last Post: 31-05-2005, 20:27 -
[start script] shell script for crontab
By grizwald in forum [TeamSpeak 2] Server SupportReplies: 4Last Post: 24-11-2004, 10:59


Reply With Quote