#include <sourcemod>
#define PLUGIN_NEV "Bot kirúgó"
#define PLUGIN_LERIAS "Bot kirúgó"
#define PLUGIN_AUTHOR "Nexd"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_URL "steelclouds.clans.hu"
public Plugin myinfo =
{
name = PLUGIN_NEV,
author = PLUGIN_AUTHOR,
description = PLUGIN_LERIAS,
version = PLUGIN_VERSION,
url = PLUGIN_URL
};
ConVar g_Cvar_bot_quota = null;
int g_bot_quota;
int g_max_players;
public OnConfigsExecuted()
{
g_Cvar_bot_quota = FindConVar("bot_quota");
g_bot_quota = GetConVarInt(g_Cvar_bot_quota);
g_max_players = GetMaxClients();
}
public OnClientPutInServer(client)
{
if(!IsFakeClient(client))
return;
if(g_bot_quota < GetConVarInt(g_Cvar_bot_quota))
SetConVarInt(g_Cvar_bot_quota, g_bot_quota);
int i, count;
for(i = 1; i<=g_max_players; i++)
if(IsClientInGame(i) && GetClientTeam(i)>1)
count++;
if(count<=g_bot_quota)
return;
char name[32]
if(!GetClientName(client, name, 31))
return;
ServerCommand("bot_kick %s", name);
}