SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 16/05/2013, 10:13 PM   #11
Scenario
Godfather
 
Scenario's Avatar
 
Join Date: Feb 2010
Location: Heaven
Posts: 8,132
Reputation: 701
Default Re: Teamspeak Connector

I feel like this plugin would be MUCH more useful if you could determine the amount of the people in your channel, the name of the people in your channel, your channel name, and possibly even get messages sent between members of the channel.

Nevertheless, nice job!
Scenario is offline   Reply With Quote
Old 16/05/2013, 10:36 PM   #12
chneubeul
Big Clucker
 
Join Date: May 2009
Posts: 56
Reputation: 0
Default Re : Teamspeak Connector

Nice job ! :O i will test it, i've many idea to use it
chneubeul is offline   Reply With Quote
Old 16/05/2013, 11:57 PM   #13
Matt
Huge Clucker
 
Matt's Avatar
 
Join Date: Mar 2012
Location: Chicago, IL, USA
Posts: 386
Reputation: 32
Default Re: Teamspeak Connector

nice work on this, but you should add more features to it.
__________________
Matt is offline   Reply With Quote
Old 17/05/2013, 04:04 AM   #14
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 521
Reputation: 122
Default Re: Teamspeak Connector

Use
Code:
enum _:ChannelTypes {
	CHANNEL_TYPE_PERMANENT = 1,
	CHANNEL_TYPE_SEMI_PERMANENT = 2,
	CHANNEL_TYPE_TEMPORARY = 3
};

enum _:KickTypes {
	KICK_TYPE_CHANNEL = 1,
	KICK_TYPE_SERVER = 2
};
or
Code:
enum {
	CHANNEL_TYPE_PERMANENT = 1,
	CHANNEL_TYPE_SEMI_PERMANENT = 2,
	CHANNEL_TYPE_TEMPORARY = 3
};

enum {
	KICK_TYPE_CHANNEL = 1,
	KICK_TYPE_SERVER = 2
};

This way, you'll never have to clear the tag (using _. Also there is no need for "= 2", "= 3". They increment automatically.
__________________
I'm no longer visiting these forums. BlueG, you can suck my dick.
Dan.. is offline   Reply With Quote
Old 17/05/2013, 11:03 AM   #16
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 894
Reputation: 479
Default AW: Re: Teamspeak Connector

Quote:
Originally Posted by OrMisicL View Post
Nice job, but i've noticed something, almost in every native you send the command then receive the answer,
so if this plugin gets connected with an external server, it'll lag the local one, since the recv function hangs the server until an answer is received, i know that its only designed to work with local servers so there is no such a problem

my suggestion is that if you run the Receive function on a seperated thread, and everytime a response is received you check for errors and use a callback to pass it to scripts, something like "TSC_OnError" maybe ?

apart that good work
But then every result has to be called in an extra callback in the script, it would work like BlueG's MySQL plugin Well, I think I can configure the socket to set a max_timeout value, so the recv-function will abort if it takes too long. And that's not the biggest problem. Imagine, I want to know what channel user X is currently in. I send the query to require the information, then receive it. Without any threading and callback calling, I get immediatly the current channel. But with threading and callbacks I could get the information, that user X is in channel Y, but it took so long to get that information, that user X has already switched channels and is now in channel Z. So I would get a wrong, outdated information. That's why I don't want to use threads.

Quote:
Originally Posted by Kar View Post
Nice! Really, is there any possible way to retrieve messages sent by teamspeak users?
You can't get the messages send in a channel or server, but users can send offline messages to the admin account which was used to log in and these messages can be retrieved, but I don't think this is useful. (or maybe it is useful?)

Quote:
Originally Posted by RealCop228 View Post
I feel like this plugin would be MUCH more useful if you could determine the amount of the people in your channel, the name of the people in your channel, your channel name, and possibly even get messages sent between members of the channel.

Nevertheless, nice job!
list of people in a channel: possible
channel name: you would have to know the exact channelid to get the name, is this really important?
messages: not possible


Quote:
Originally Posted by Dan.. View Post
Use
Code:
enum _:ChannelTypes {
	CHANNEL_TYPE_PERMANENT = 1,
	CHANNEL_TYPE_SEMI_PERMANENT = 2,
	CHANNEL_TYPE_TEMPORARY = 3
};

enum _:KickTypes {
	KICK_TYPE_CHANNEL = 1,
	KICK_TYPE_SERVER = 2
};
or
Code:
enum {
	CHANNEL_TYPE_PERMANENT = 1,
	CHANNEL_TYPE_SEMI_PERMANENT = 2,
	CHANNEL_TYPE_TEMPORARY = 3
};

enum {
	KICK_TYPE_CHANNEL = 1,
	KICK_TYPE_SERVER = 2
};

This way, you'll never have to clear the tag (using _:). Also there is no need for "= 2", "= 3". They increment automatically.
Thanks, I was to lazy to update the include and reupload it again because of the example, I will change it in the next update.


If you have other suggestions feel free to post them here.
maddinat0r is offline   Reply With Quote
Old 17/05/2013, 11:12 AM   #17
OrMisicL
Huge Clucker
 
OrMisicL's Avatar
 
Join Date: Mar 2013
Location: Under the bed
Posts: 358
Reputation: 176
Default Re: Teamspeak Connector

If you send the query to request the information, then you hang the samp main thread until a response is received, it'll lag the server

Quote:
Originally Posted by Pain123 View Post
Without any threading and callback calling, I get immediatly the current channel. But with threading and callbacks I could get the information, that user X is in channel Y, but it took so long to get that information, that user X has already switched channels and is now in channel Z. So I would get a wrong, outdated information. That's why I don't want to use threads.
why you would get a wrong information on a separated thread ? you get the response as fast as you do it without threads, it simply wont lag the server
__________________
Insane rhythm based level
Video
OrMisicL is offline   Reply With Quote
Old 17/05/2013, 11:23 AM   #18
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 894
Reputation: 479
Default AW: Teamspeak Connector

I meant that if the Teamspeak server takes too long to answer a request, without threading the server would lag and with threading I could get a wrong information. So I think it is better to abort a long request and stick with the unthreaded solution. (and maybe call a TSC_Error callback, I like that idea)
maddinat0r is offline   Reply With Quote
Old 17/05/2013, 11:49 AM   #19
OrMisicL
Huge Clucker
 
OrMisicL's Avatar
 
Join Date: Mar 2013
Location: Under the bed
Posts: 358
Reputation: 176
Default Re: AW: Teamspeak Connector

Quote:
Originally Posted by Pain123 View Post
I meant that if the Teamspeak server takes too long to answer a request, without threading the server would lag and with threading I could get a wrong information. So I think it is better to abort a long request and stick with the unthreaded solution. (and maybe call a TSC_Error callback, I like that idea)
Well, thats ok if you abort long requests, but it'll depend on how much time it'll wait before the request gets aborted
__________________
Insane rhythm based level
Video
OrMisicL is offline   Reply With Quote
Old 17/05/2013, 02:29 PM   #20
Gigi-The-Beast
Huge Clucker
 
Join Date: Jan 2010
Posts: 286
Reputation: 25
Default Re: Teamspeak Connector

Nice job man!
Will you consider implementing a way of manipulating with connected clients?
This way we would be able to change the clients' permissions from the server! With that option we could assign players the appropriate groups within the server when the player joins an organisation or gang. It would be awesome
Gigi-The-Beast is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SA-MP W/ TeamSpeak PrawkC Screenshots and Videos 8 05/02/2013 08:58 AM
Teamspeak P<3TS Everything and Nothing 6 04/08/2012 12:26 AM
[Map] Connector Gas Tellken Maps 4 01/06/2012 03:04 AM
PSU connector help! patchkinson Everything and Nothing 3 20/03/2010 09:24 PM


All times are GMT. The time now is 12:30 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.