SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/01/2018, 02:07 PM   #321
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 898
Reputation: 481
Default Re: Teamspeak Connector

Quote:
Originally Posted by Kegy5 View Post
Is there a possibility to check the channel group of a client when he isn't in the channel? When i set the channel group at login, there is no check ability, so i just can do TSC_SetClientChannelGroup, but the client will always get settet again to the group every login, even if he already is in it, its pretty disturbing...
No, but you can check if a client already has the group id set before actually setting it:
Code:
const MY_CHANNEL_GROUP_ID = 123;
const MY_CHANNEL_ID = 321;

// ...

new channelid = TSC_GetClientChannelId(clientid);
TSC_QueryClientData(clientid, CLIENT_CHANNEL_GROUP_ID, "OnChannelGroupRetrieved", "dd", clientid, channelid);

// ...

public OnChannelGroupRetrieved(clientid, channelid)
{
	new channel_group_id = TSC_GetQueriedDataAsInt();
	if (channelid == MY_CHANNEL_ID && channel_group_id != MY_CHANNEL_GROUP_ID)
		TSC_SetClientChannelGroup(clientid, MY_CHANNEL_GROUP_ID, channelid);
}
maddinat0r is offline   Reply With Quote
Old 19/01/2018, 03:23 PM   #322
Kegy5
Little Clucker
 
Join Date: Dec 2009
Location: Germany
Posts: 2
Reputation: 0
Default Re: Teamspeak Connector

Quote:
Originally Posted by maddinat0r View Post
No, but you can check if a client already has the group id set before actually setting it:
Code:
const MY_CHANNEL_GROUP_ID = 123;
const MY_CHANNEL_ID = 321;

// ...

new channelid = TSC_GetClientChannelId(clientid);
TSC_QueryClientData(clientid, CLIENT_CHANNEL_GROUP_ID, "OnChannelGroupRetrieved", "dd", clientid, channelid);

// ...

public OnChannelGroupRetrieved(clientid, channelid)
{
	new channel_group_id = TSC_GetQueriedDataAsInt();
	if (channelid == MY_CHANNEL_ID && channel_group_id != MY_CHANNEL_GROUP_ID)
		TSC_SetClientChannelGroup(clientid, MY_CHANNEL_GROUP_ID, channelid);
}
The problem is, the client need to be in the channel, i would like to check without that the client need to be there

//edit:
Ok, it works, changed a few things and now is all fine.
Thanks

Last edited by Kegy5; 19/01/2018 at 04:18 PM.
Kegy5 is offline   Reply With Quote
Old 09/02/2018, 11:53 AM   #323
PgMNA
Little Clucker
 
Join Date: Nov 2017
Location: Pakistan,Karachi
Posts: 27
Reputation: 1
Default Re: Teamspeak Connector

i am gonna try this
PgMNA is offline   Reply With Quote
Old 03/07/2018, 06:24 PM   #324
Neom
Banned
 
Join Date: Jun 2018
Posts: 70
Reputation: 0
Default Re: Teamspeak Connector

Cool +REP
Neom is offline   Reply With Quote
Old 21/07/2018, 08:49 AM   #325
Markus001
Little Clucker
 
Join Date: Nov 2011
Posts: 3
Reputation: 0
Default Re: Teamspeak Connector

how is the command established: TSC_MoveClient
Markus001 is offline   Reply With Quote
Old 08/09/2018, 07:04 PM   #326
Markus001
Little Clucker
 
Join Date: Nov 2011
Posts: 3
Reputation: 0
Default Re: Teamspeak Connector

[TS3Bot Error 2]error while reading: End of file
Markus001 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
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 08:53 PM.


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