#pragma semicolon 1
ConVar g_hConVars[5];
int g_hBuffInt[3];
float g_hBuffFloat[2];
public Plugin myinfo =
{
name = "Roun End Bhoping",
author = "Saints",
description = "Round End Gravity",
version = "1.2",
}
public void OnPluginStart()
{
static const char sConVars[][] = {"sv_enablebunnyhopping","sv_autobunnyhopping","sv_airaccelerate","sv_staminajumpcost","sv_staminalandcost"};
for (int i; i <= 4; i++)
{
g_hConVars[i] = FindConVar(sConVars[i]);
g_hConVars[i].Flags &= ~FCVAR_NOTIFY;
}
HookEvent("round_start", RoundStart, EventHookMode_PostNoCopy);
HookEvent("round_end", RoundEnd, EventHookMode_PostNoCopy);
}
public void RoundEnd(Event hEvent, const char[] sName, bool bDontBroadcast)
{
g_hBuffInt[0] = GetConVarInt(g_hConVars[0]);
g_hConVars[0].SetInt(1);
g_hBuffInt[1] = GetConVarInt(g_hConVars[1]);
g_hConVars[1].SetInt(1);
g_hBuffInt[2] = GetConVarInt(g_hConVars[2]);
g_hConVars[2].SetInt(999);
g_hBuffFloat[0] = GetConVarFloat(g_hConVars[3]);
g_hConVars[3].SetInt(0);
g_hBuffFloat[1] = GetConVarFloat(g_hConVars[4]);
g_hConVars[4].SetInt(0);
PrintToChatAll(" \x04Автобаннихоп активирован.");
}
public void RoundStart(Event hEvent, const char[] sName, bool bDontBroadcast)
{
g_hConVars[0].SetInt(g_hBuffInt[0]);
g_hConVars[1].SetInt(g_hBuffInt[1]);
g_hConVars[2].SetInt(g_hBuffInt[2]);
g_hConVars[3].SetFloat(g_hBuffFloat[0]);
g_hConVars[4].SetFloat(g_hBuffFloat[1]);
PrintToChatAll(" \x02Автобаннихоп отключен.");
}