shape1
shape2
shape3
shape4
shape7
shape8

Discord на сервере


Cocolemunto

Чёрный список
11.06.2021
416
3
55
0
14
Discord Connector v0.1

Данный плагин позволит управлять ботом Discord из вашего мода.

Установка
Для начала вам необходимо создать бота.
  • Переходим сюда *тык*
  • Нажимаем "new application"
  • Вводим имя бота
  • Нажимаем "create application"
  • Нажимаем "create bot user"
  • Теперь у вас есть бот.

Что бы добавить данного бота к себе на сервер, скопируйте его id, вставьте в ссылку и перейдите по ней.
*тык*
Автор плагина: maddinat0r

new DCC_Channel:g_WelcomeChannelId;

public OnGameModeInit()
{
DCC_Connect("YOUR BOT TOKEN");
return 1;
}

public OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME + 1];
GetPlayerName(playerid, name, sizeof name);

if (_:g_WelcomeChannelId == 0)
g_WelcomeChannelId = DCC_FindChannelById("388423556721672192"); // Discord channel ID

new str[128];
format(str, sizeof str, "Player %s joined the server.", name);
DCC_SendChannelMessage(g_WelcomeChannelId, msg);
return 1;
}

public DCC_OnChannelMessage(DCC_Channel:channel, const author[], const message[])
{
new channel_name[32];
DCC_GetChannelName(channel, channel_name);

new str[145];
format(str, sizeof str, "[Discord/%s] %s: %s", channel_name, author, message);
SendClientMessageToAll(-1, str);
return 1;
}

Скачать можно для Linux(so)
Скачать можно для Windows(dll)
 

Вложения

  • discord-connector-0.1-win32.zip
    720,3 КБ · Просмотры: 2
  • вас воллен тинкен.zip
    367,2 КБ · Просмотры: 4