samp.directory
← Скрипты и библиотеки

XenoX352/discord-webhook-open.mp

Discord Webhook connects with gamemode using the open source pawnraknet api

Библиотека★ 3обновлён июнь 2026 г.MITPawn
Открыть на GitHub

README.md


About

Discord Webhook is a lightweight Pawn include that lets your SA:MP or open.mp server send beautifully formatted embed messages directly to a Discord channel.
Powered by the Pawn Requests plugin, it offers a clean and straightforward API with zero bloat.

Whether you need to log admin actions, announce server events, or display player statistics, this system gets the job done with minimal configuration.


Features

  • Rich embed messages – title, description, colour, fields, footer.
  • Customisable bot username and avatar per request.
  • Inline fields for compact information display.
  • Lightweight and fast – no extra dependencies besides Requests.
  • Compatible with SA:MP 0.3.7 and open.mp.
  • Clean, well‑documented code that’s easy to extend.

Requirements

  • Pawn Requests plugin (download)
  • SA:MP server 0.3.7+ or open.mp
  • Basic Pawn scripting knowledge

Installation

SA:MP (0.3.7 / 0.3.DL)

  1. Download the latest Pawn Requests plugin.
  2. Place requests.dll (Windows) or requests.so (Linux) into your server’s plugins/ folder.
  3. Place requests.inc into your pawno/include/ folder.
  4. Add requests to the plugins line in server.cfg.
  5. Copy discord-webhook.inc into your pawno/include/ folder.

open.mp

  1. Download the latest Pawn Requests plugin.
  2. Place requests.dll / requests.so into your server’s plugins/ folder.
  3. Place requests.inc into your qawno/include/ folder.
  4. Add requests to the legacy_plugins array in config.json.
  5. Copy discord-webhook.inc into your qawno/include/ folder.

Quick Start

Include the library in your script and send an embed with one line:

#include <discord-webhook>

public OnGameModeInit()
{
    SendDiscordEmbed(
        "https://discord.com/api/webhooks/1234567890/abcdef",
        "My SA:MP Bot",
        "https://i.imgur.com/myavatar.png",
        "Server Started",
        "The server is now online!",
        0x00FF00,
        "Info|Everything is running smoothly",
        "My SA:MP Server"
    );
    return 1;
}

Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью