PHP код:
TSC_Connect("127.0.0.1", "9987");//IP вашего TS-сервера
TSC_Login("serveradmin", "password", "SAMP Server");//вам нужен ServerQuery аккаунт, введите имя учетной записи, пароль и имя здесь
Если вы хотите, чтобы закрыть соединение
PHP код:
public Testing() {
new ChannelName[32] = "Канал Alpha";
TSC_CreateChannel(ChannelName);
TSC_SetChannelDescription(ChannelName, "Мое описание канала!");
TSC_SetChannelPassword(ChannelName, "тутпароль");
format(ChannelName, sizeof(ChannelName), "Канал Beta");
TSC_SetChannelTalkPower(ChannelName, 100);
TSC_SetClientChannelGroup("p7qeehsJ6S31BBz1fVqO46Z8WjI=", 5, "Канал Gamma");
TSC_MoveClient("p7qeehsJ6S31BBz1fVqO46Z8WjI=", "Канал Gamma");
TSC_KickClient("p7qeehsJ6S31BBz1fVqO46Z8WjI=", KICK_TYPE_SERVER, "Ты не понравился сервер,наверно ты гей :/");
}
Вот также полный список всех нативов и коллбеков:
PHP код:
native TSC_Connect(ip[], port[]);
native TSC_Disconnect();
native TSC_Login(user[], pass[], nickname[]);
native TSC_ChangeNickname(nickname[]);
native TSC_CreateChannel(channelname[]);
native TSC_DeleteChannel(channelname[]);
native TSC_SetChannelName(channelname[], newchannelname[]);
native TSC_SetChannelDescription(channelname[], channeldesc[]);
native TSC_SetChannelPassword(channelname[], channelpasswd[]);
native TSC_SetChannelTalkPower(channelname[], talkpower);
native TSC_SetChannelSubChannel(channelname[], parentchannelname[]);
native TSC_MoveChannelBelowChannel(channelname[], parentchannelname[]);
native TSC_KickClient(uid[], kicktype, reason[]);
native TSC_BanClient(uid[], seconds, reason[]);
native TSC_MoveClient(uid[], channelname[]);
native TSC_SetClientChannelGroup(uid[], groupid, channelname[]);
native TSC_AddClientToServerGroup(uid[], groupid);
native TSC_RemoveClientFromServerGroup(uid[], groupid);
native TSC_ToggleClientTalkAbility(uid[], bool:toggle);
native TSC_PokeClient(uid[], msg[]);
native TSC_SendClientMessage(uid[], msg[]);
native TSC_SendChannelMessage(channelname[], msg[]);
native TSC_SendServerMessage(msg[]);
forward TSC_OnClientConnect(nickname[], uid[]);
forward TSC_OnClientDisconnect(nickname[], uid[]);
forward TSC_OnClientChannelMove(nickname[], uid[], channelname[]);
forward TSC_OnClientChannelText(nickname[], uid[], channelname[], msg[]);
forward TSC_OnClientServerText(nickname[], uid[], msg[]);