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); + } +}