#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
public Plugin:myinfo =
{
name = "Bhop [Mod Size]",
author = "Dragonfly",
description = "Plugin with lots of features for BunnyHop's servers.",
version = "1.1",
url = ""
};
public OnPluginStart()
{
HookEvent("player_jump", Event_player_jump);
HookEvent("player_spawn", Event_player_spawn);
}
public Action:Event_player_jump(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(client)
{
SetEntPropFloat(client, Prop_Send, "m_flStamina", 0.0);
}
return Plugin_Continue;
}
public Action:Event_player_spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(client)
{
SetEntProp(client, Prop_Data, "m_CollisionGroup", 2);
}
return Plugin_Continue;
}
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
if (IsPlayerAlive(client))
{
if (buttons & IN_JUMP)
{
if (!(GetEntityFlags(client) & FL_ONGROUND))
{
if (!(GetEntityMoveType(client) & MOVETYPE_LADDER))
{
new iType = GetEntProp(client, Prop_Data, "m_nWaterLevel");
if (iType <= 1)
{
buttons &= ~IN_JUMP;
}
}
}
}
}
return Plugin_Continue;
}