source code uploaded
This commit is contained in:
parent
b3c338bf16
commit
6920f32938
29
discord.sma
Normal file
29
discord.sma
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user