19.01.2018, 14:07
Quote:
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...
|
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); }