Page 1 of 1

Visada bhop

Posted: 2012 Apr 27 21:47
by TETYYS
Reikia plugino, kuris padarytų, kad visi serve esantys žaidėjai visalaika bhopintų t.y. niekada nestovėtų ant žemės.

Re: Visada bhop

Posted: 2012 Apr 27 22:27
by newb
Cia gi epic failas. Paeit net normalei neis xD

Re: Visada bhop

Posted: 2012 Apr 28 06:04
by TETYYS
Tai aš to ir noriu. Reikės strafint.

Re: Visada bhop

Posted: 2012 Apr 28 10:30
by newb

Code: Select all

#include <amxmodx>#include <amxmisc>#include <engine> #define FL_WATERJUMP    (1<<11)#define FL_ONGROUND (1<<9) new bhop[33] public plugin_init() {    register_concmd("amx_bhop", "cmdBhop", ADMIN_SLAY, "<name or #userid> to enable/disable bhop")} public cmdBhop(id, level, cid) {    if (!cmd_access(id, level, cid, 2))        return PLUGIN_HANDLED        new arg[32]        read_argv(1, arg, charsmax(arg))        new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)        if (!player)        return PLUGIN_HANDLED        new name[33]    get_user_name(player, name, charsmax(name))        if(bhop[player]) {        bhop[player] = false        console_print(id, "[AMXX] Bunny hop disabled on %s", name)                // Kokie nors chat messages    } else {        bhop[player] = true        console_print(id, "[AMXX] Bunny hop enabled on %s", name)                // Ir cia    }     return PLUGIN_HANDLED} public client_disconnect(id) {    bhop[id] = false} public client_PreThink(id) {    if (!bhop[id] || !is_user_alive(id))        return PLUGIN_CONTINUE        entity_set_float(id, EV_FL_fuser2, 0.0)        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}
Su amx_bhop nickas ijungt/isjungt.

Re: Visada bhop

Posted: 2012 Apr 28 10:34
by Fly3r
Taigi galima vietoj bhop[33] kurt bhop ir tikrinti su bitų operacijomis.

Re: Visada bhop

Posted: 2012 Apr 28 10:40
by newb
Neturejau as laiko ten zaist su optimizacija. Tuo labiau kas zino kaip naudotis bhopu lakstys per mapa dar greiciau nei paprasti.