Bunnyi steamid'ye ayarlayabilirmisiniz. sadece id'ye bağlı olan kişi bunny yapabilsin.
SteamID özel BunnyHop

#include <amxmodx>
#include <reapi>
new const g_szAuthIds[][] =
{
"STEAM_0:0:123456789",
"STEAM_0:0:123456789",
"STEAM_0:0:123456789"
};
/* If you wanna speed limit, please delete // from the beginning of define. Example: #define PREVENT_MEGABUNNY_JUMPING
Attention please! Do not change #if defined - #endif commands. Yours sincerely. */
//#define PREVENT_MEGABUNNY_JUMPING
new bool:bh_enabled;
new cvar_bh_enabled;
new HookChain:HC_Jump;
new iSize;
public plugin_init() {
register_plugin("BunnyHop", "1.3", "PurposeLess");
DisableHookChain((HC_Jump = RegisterHookChain(RG_CBasePlayer_Jump, "@CBasePlayer_Jump", .post=false)));
cvar_bh_enabled = create_cvar("bh_enabled", "1", _, "Enable / Disable BunnyHop", true, 0.0, true, 1.0);
bind_pcvar_num(cvar_bh_enabled, bh_enabled);
hook_cvar_change(cvar_bh_enabled, "@bh_enabled");
iSize = sizeof(g_szAuthIds);
}
public plugin_cfg()
{
if(bh_enabled)
{
EnableHookChain(HC_Jump);
}
}
@bh_enabled(pcvar, const old_value[], const new_value[])
{
str_to_num(new_value) ? EnableHookChain(HC_Jump) : DisableHookChain(HC_Jump);
}
@CBasePlayer_Jump(const id)
{
if(~get_entvar(id, var_flags) & FL_ONGROUND)
{
return;
}
static szAuthId[64], i;
get_user_authid(id, szAuthId, charsmax(szAuthId));
for(i = 0; i < iSize; i++) {
if(equal(szAuthId, g_szAuthIds[i][0])) {
new Float:velocity[3];
get_entvar(id, var_velocity, velocity);
#if defined PREVENT_MEGABUNNY_JUMPING
PM_PreventMegaBunnyJumping(id, velocity);
#endif
velocity[2] = 268.0;
set_entvar(id, var_velocity, velocity);
}
}
}
#if defined PREVENT_MEGABUNNY_JUMPING
PM_PreventMegaBunnyJumping(const id, Float:velocity[3])
{
#define BUNNYJUMP_MAX_SPEED_FACTOR 1.2
new Float:maxscaledspeed = BUNNYJUMP_MAX_SPEED_FACTOR * Float:get_entvar(id, var_maxspeed);
if(maxscaledspeed <= 0.0)
{
return;
}
new Float:speed = vector_length(velocity);
if(speed <= maxscaledspeed)
{
return;
}
new Float:fraction = (maxscaledspeed / speed) * 0.8;
velocity[0] *= fraction;
velocity[1] *= fraction;
velocity[2] *= fraction;
}
#endif
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/