Code:
#pragma semicolon 1
#define DEBUG
#define PLUGIN_AUTHOR "SZOKOZ/EXE KL"
#define PLUGIN_VERSION "1.00"
#include <sourcemod>
#pragma newdecls required
bool g_bRoundStarted;
public Plugin myinfo =
{
name = "Bots No Shoot",
author = PLUGIN_AUTHOR,
description = "Prevents bots from shooting before round starts.",
version = PLUGIN_VERSION,
url = "szokoz.eu"
};
public void OnPluginStart()
{
HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);
HookEvent("round_end", Event_RoundEnd, EventHookMode_PostNoCopy);
}
public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
g_bRoundStarted = true;
}
public Action Event_RoundEnd(Event event, const char[] name, bool dontBroadcast)
{
g_bRoundStarted = false;
}
public Action OnPlayerRunCmd(int client, int& buttons, int& impulse,
float vel[3], float angles[3], int& weapon, int& subtype, int& cmdnum,
int& tickcount, int& seed, int mouse[2])
{
if (IsFakeClient(client) && !g_bRoundStarted)
{
buttons &= ~IN_ATTACK;
return Plugin_Changed;
}
return Plugin_Continue;
}
__________________