30 lines
603 B
Plaintext
30 lines
603 B
Plaintext
#include <amxmodx>
|
|
#include <fakemeta>
|
|
|
|
// 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);
|
|
}
|
|
}
|