| fatalerror23 |
09-12-2012 16:19 |
[someone could fix this plugin]
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <engine>
#define PLUGIN "Vip BunnyHop EvL.G"
#define VERSION "1.0"
#define AUTHOR "CS Online BR"
#define ADMIN_ACCESS ADMIN_RESERVATION
#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
new pCvar_AdminVIP
new g_has_bhop[33]
new bool:has_Used[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /bhop", "cmdBhop", ADMIN_ACCESS);
register_clcmd("say_team /bhop", "cmdBhop", ADMIN_ACCESS);
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
pCvar_AdminVIP = register_cvar( "amx_adminvip", "1" );
public cmdBhop(id) {
if (has_flag(id, "b"))
{
if(g_has_bhop[id])
{
g_has_bhop[id]=0
client_print(id, print_center, "[ EvL.G ] Voce acabou de desativar o Bunny Hop")
return PLUGIN_HANDLED
}
else if(!g_has_bhop[id])
{
g_has_bhop[id]=1
client_print(id, print_center, "[ EvL.G ] Voce acabou de ativar o Bunny Hop")
return PLUGIN_HANDLED
}
}
return PLUGIN_HANDLED
}
public client_PreThink(id) {
if (has_flag(id, "b"))
{
if(!g_has_bhop[id])
return PLUGIN_CONTINUE
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
}
it's many errors in the console and I can help
thanks
|