Hola me encontre este plugin que es para que cuando escribes /jumpmenu sale un menu para escojer activarte o desactivarte el bunny, lo que yo quiero es que cuando empiese cada ronda salga una votacion sobre si quieren bunny o no pero no e podido >.< espero me puedan ayudar.
PHP Code:
#include <amxmodx>
#include <engine>
#define PLUGIN "Jump Menu Modified"
#define VERSION "2.1b"
#define AUTHOR "v3x"
#define MAX_PLAYERS 33
public plugin_init()
{
register_plugin(PLUGIN , VERSION , AUTHOR);
register_clcmd("say /jumpmenu" , "ClCmd_JumpMenu");
register_clcmd("jumpmenu" , "ClCmd_JumpMenu");
}
enum
{
JUMP_REGULAR = 0,
JUMP_BUNNY,
}
new g_iJumpType[33];
public client_putinserver(id)
g_iJumpType[id] = JUMP_REGULAR;
public client_disconnect(id)
g_iJumpType[id] = JUMP_REGULAR;
public ClCmd_JumpMenu(id)
{
new menu = menu_create("Select your jump type:" , "menuHandler_Jump");
menu_additem(menu , "Bunnyhop" , "" , 0);
menu_additem(menu , "Regular" , "" , 0);
menu_setprop(menu , MPROP_EXIT , MEXIT_ALL);
menu_display(id , menu , 0);
new arg[21];
read_argv(0 , arg , 20);
if(!contain(arg , "say"))
return PLUGIN_CONTINUE;
return PLUGIN_HANDLED;
}
public menuHandler_Jump(id , menu , item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new szCommand[6] , szName[64];
new access , callback;
menu_item_getinfo(menu , item , access , szCommand , 5 , szName , 63 , callback);
if(equal(szName , "Bunnyhop"))
{
client_print(id , print_chat , "[AMXX] Bunnyhop enabled");
g_iJumpType[id] = JUMP_BUNNY;
menu_destroy(menu); return PLUGIN_CONTINUE;
}
else
{
client_print(id , print_chat , "[AMXX] Regular jumping enabled");
g_iJumpType[id] = JUMP_REGULAR;
menu_destroy(menu); return PLUGIN_CONTINUE;
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public client_PreThink(id)
{
if(!is_user_alive(id) || !g_iJumpType[id])
return PLUGIN_CONTINUE;
entity_set_float(id, EV_FL_fuser2, 0.0) // Disable slow down after jumping
// Code from CBasePlayer::Jump (player.cpp) Make a player jump automatically
if (entity_get_int(id, EV_INT_button) & 2) { // If holding jump
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) // Play the Jump Animation
}
return PLUGIN_CONTINUE;
}