/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#define PLUGIN "Auto Bhop menu"
#define VERSION "1.0"
#define AUTHOR "qKKKJ"
new g_bhop[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /bhop", "ShowMenu")
}
public client_connect(id)
{
g_bhop[id] = false
}
public ShowMenu(id)
{
new menu = menu_create("Auto bhop", "b_hand");
menu_additem(menu, "Igen", "", 0);
menu_additem(menu, "Nem", "", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public b_hand(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id);
return PLUGIN_HANDLED;
}
new command[6], name[64], access, callback;
menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
switch(item)
{
case 0: g_bhop[id] = true
case 1: g_bhop[id] = false
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public client_PreThink(id) {
if(g_bhop[id] == true)
{
entity_set_float(id, EV_FL_fuser2, 0.0)
if (entity_get_int(id, EV_INT_button) & 2) {
new flags = entity_get_int(id, EV_INT_flags)
if (flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
return PLUGIN_CONTINUE
if ( !(flags & FL_ONGROUND) )
return PLUGIN_CONTINUE
new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)
velocity[2] += 250.0
entity_set_vector(id, EV_VEC_velocity, velocity)
entity_set_int(id, EV_INT_gaitsequence, 6)
}
}
return PLUGIN_CONTINUE
}