20.02.2017, 12:01
Код:
public TSC_OnClientConnect(clientid, nickname[]) { TSC_PokeClient(clientid, "Welcome!"); TSC_SendClientMessage(clientid, "Welcome!"); return 1; }
public TSC_OnClientConnect(clientid, nickname[]) { TSC_PokeClient(clientid, "Welcome!"); TSC_SendClientMessage(clientid, "Welcome!"); return 1; }
TSC_SendClientMessage(TSC_GetClientIdByUid("K+fJTkRtARxyUJczCELIxGBvI9Q="), "привет");
ID: 1538 Text: error while executing "sendtextmessage targetmode=1 target=1 msg=привет": invalid parameter
if(Voip[playerid] == false) return SCM(playerid, COLOR_GREY,"You have not activated your Voip label. (Hint: /channel on)"); Update3DTextLabelText(voiplabel[playerid], 0xE91616FF, "Channel: 1"); SendNearbyMessage(playerid, 20.0, 0xE91616FF, "**%s Has switched to the channel 1.**", ReturnName(playerid, 0), params); }
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...
|
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); }
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); } |