bhop

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

bhop

Post by aurimasko »

kaip pasidaryti, kad galima būtų bhopint ištisai? na kaip su tuo alias scriptu. kažkur buvau radęs pluginą tokį, bet dabar neberandu ;/

User avatar
Vebsteris
Jau po truputį tampa savu
Posts: 195
Joined: 2011 Aug 20 14:08

Re: bhop

Post by Vebsteris »

Code: Select all

#include <amxmodx>#include <engine> #define FL_WATERJUMP    (1<<11) // player jumping out of water#define FL_ONGROUND (1<<9)  // At rest / on the ground public plugin_init() {    register_plugin("Super Bunny Hopper", "1.2", "Cheesy Peteza")    register_cvar("sbhopper_version", "1.2", FCVAR_SERVER)     register_cvar("bh_enabled", "1")    register_cvar("bh_autojump", "1")    register_cvar("bh_showusage", "1")} 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 // 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} public client_authorized(id)    set_task(30.0, "showUsage", id) public showUsage(id) {    if ( !get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )        return PLUGIN_HANDLED     if ( !get_cvar_num("bh_autojump") ) {        client_print(id, print_chat, "[AMX] Bunny hopping is enabled on this server. You will not slow down after jumping.")    } else {        client_print(id, print_chat, "[AMX] Auto bunny hopping is enabled on this server. Just hold down jump to bunny hop.")    }    return PLUGIN_HANDLED}
I think this is what your looking for.

User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

Re: bhop

Post by aurimasko »

nelabai veikia

User avatar
rotosas
Gana aktyvus vartotojas
Posts: 225
Joined: 2011 Mar 19 18:56
Skype: rotosas
Location: Vilnius

Re: bhop

Post by rotosas »

Gali su client cmd uždėti žaidėjams tuos alias.
Image
Image
Jei padėjau, nepagailėk ir nepatingėk paspaust +KARMA. :)

User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

Re: bhop

Post by aurimasko »

galiu, bet man reikia tokio būdo kaip parodė vebsteris tik kad veiktų..


alfre
Gana aktyvus vartotojas
Posts: 259
Joined: 2011 May 13 14:01
Skype: alfredasxl996
Contact:

Re: bhop

Post by alfre »

public client_PreThink(id)
{
if(is_user_alive(id))
{
new oldbuttons = get_user_oldbutton(id);


oldbuttons &= ~IN_JUMP;
entity_set_int(id, EV_INT_oldbuttons, oldbuttons);
}
}
}
is dr plugin

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests