Hey,
If you are intersted how to make use of the new cvar "sv_autobunnyhopping" different for each client (not all clients will have autobhop) you might wanna take a pick of this snippet.
Btw sorry for old syntax
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
public Plugin myinfo =
{
name = "",
author = "Ofir",
description = "",
version = "1.0",
url = "steamcommunity.com/id/OfirGal1337"
};
new Handle:gh_AutoBhop = INVALID_HANDLE;
new Handle:gh_EnableBhop = INVALID_HANDLE;
new bool:gb_ClientAutoBhop[MAXPLAYERS+1];
public void OnPluginStart()
{
gh_AutoBhop = FindConVar("sv_autobunnyhopping");
gh_EnableBhop = FindConVar("sv_enablebunnyhopping");
SetConVarBool(gh_AutoBhop, false);
SetConVarBool(gh_EnableBhop, true);
RegConsoleCmd("sm_auto", Command_Auto);
}
public void OnClientConnected(client)
{
gb_ClientAutoBhop[client] = false;
}
public Action Command_Auto(int client, int args)
{
gb_ClientAutoBhop[client] = !gb_ClientAutoBhop[client];
if(gb_ClientAutoBhop[client])
{
PrintToChat(client, "enabled");
SendConVarValue(client, gh_AutoBhop, "1");
}
else
{
PrintToChat(client, "disabled");
SendConVarValue(client, gh_AutoBhop, "0");
}
return Plugin_Handled;
}
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tickcount, &seed, mouse[2])
{
if (gb_ClientAutoBhop[client] && IsPlayerAlive(client))
{
if (buttons & IN_JUMP)
{
if (!(GetEntityFlags(client) & FL_ONGROUND))
{
if (!(GetEntityMoveType(client) & MOVETYPE_LADDER))
{
if (GetEntProp(client, Prop_Data, "m_nWaterLevel") <= 1)
{
buttons &= ~IN_JUMP;
}
}
}
}
}
}
Other Method by Shavit:
https://github.com/shavitush/bhoptim...ed3f6f1f9be76f