#include #include #define FL_WATERJUMP (1<<11) // player jumping out of water #define FL_ONGROUND (1<<9) // At rest / on the ground new bool:wlaczyl[33] public plugin_init() { register_plugin("Super Bunny Hopper", "1.2", "Cheesy Peteza") register_cvar("sbhopper_version", "1.2", FCVAR_SERVER) register_clcmd("say /onbh","bunny",0) register_clcmd("say onbh","bunny",0) register_clcmd("say_team /onbh","bunny",0) register_clcmd("say_team onbh","bunny",0) register_clcmd("say /offbh","wyłącz",0) register_clcmd("say offbh","wyłącz",0) register_clcmd("say_team /offbh","wyłącz",0) register_clcmd("say_team offbh","wyłącz",0) register_cvar("bh_enabled", "0") register_cvar("bh_autojump", "1") register_cvar("bh_showusage", "1") } public bunny(id) { wlaczyl[id] = true } public client_PreThink(id) { if (!get_cvar_num("bh_enabled")) return PLUGIN_CONTINUE entity_set_float(id, EV_FL_fuser2, 0.0) // Disable slow down after jumping if (!get_cvar_num("bh_autojump")) return PLUGIN_CONTINUE if(wlaczyl[id]) { 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 } public wyłącz(id) { wlaczyl[id] = false }
Licze na + chyba ze nie o to chodzi
Cvary:
bh_enabled "1" bh_autojump "1" bh_showusage "1"