#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#define PLUGIN_VERSION "3.0.0"
public Plugin:myinfo = {
name = "Stop Spamming Commands",
author = "antrax_RTF",
description = "Block Spamming Commands",
version = PLUGIN_VERSION,
url = "itd"
};
new lastUsedTime[MAXPLAYERS + 1];
public OnPluginStart() {
RegConsoleCmd("status", Command_Status);
RegConsoleCmd("ping", Command_Status);
RegConsoleCmd("heartbeat", Command_Status);
RegConsoleCmd("groundlist", Command_Status);
RegConsoleCmd("es_version", Command_Status);
HookEvent("round_start", GameStart);
}
new WelcomeMessage = 1; // Change to 0 to disable welcome message (Not Recommended)
new RoundMessage = 1; // Change to 0 to disable reminder messages each round
public Action:Command_Status(client, args) {
if(lastUsedTime[client] > GetTime() - 10) {
return Plugin_Handled;
}
lastUsedTime[client] = GetTime();
return Plugin_Continue;
}
public OnClientPostAdminCheck(client)
{
if (WelcomeMessage == 1)
{
PrintToChat(client, "\x03 TEXT Linija 1 \x03");
PrintToChat(client, "\x03 TEXT LINIJA 2 \x03");
}
}
public Action:GameStart(Handle:Event, const String:Name[], bool:Broadcast)
{
if (RoundMessage == 1)
{
PrintToChatAll("\x03 TEXT SVAKE RUNDE \x03");
}
}