From 6920f32938ca053ccb0638efee66b892ca1d87c2 Mon Sep 17 00:00:00 2001 From: bacalhau Date: Mon, 30 Dec 2024 14:45:00 +0000 Subject: [PATCH] source code uploaded --- discord.sma | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 discord.sma diff --git a/discord.sma b/discord.sma new file mode 100644 index 0000000..3f685d0 --- /dev/null +++ b/discord.sma @@ -0,0 +1,29 @@ +#include +#include + +// Config +#define DISCORD_URL "https://discord.gg/mJZXm3F67a" + +// global round count +new g_RoundCount = 0; + +public plugin_init() +{ + register_plugin("Discord URL Messenger", "1.0", "bacalhau") + + register_logevent("on_new_round", 2, "1=Round_Start"); +} + +// Evento disparado no inĂ­cio de cada ronda +public on_new_round() +{ + // counts rounds + g_RoundCount++; + + // sends link every 2 rounds + if (g_RoundCount % 2 == 0) + { + // prints chat message + client_print(0, print_chat, "[SERVER] JOIN OUR COMMUNITY: %s", DISCORD_URL); + } +}