AutoBhop bug'as

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

AutoBhop bug'as

Post by Pukuotukas951 »

Turiu AutoBhop pluginą, kai padarai cvar kad bhop būtų no speed limit, tuomet kai paspaudi E raidę buttons, sustoji vietoj ir neina pajudėt. Čia tam plugine žiūrėjau tuos buttons bet nesuprantu kas ką daro kad taip atsitinka, kaip padaryti, kad nestabdytų taves? Nes pvz, kai cvar 0, bhopini su speed limtu bet nebugina E.
Attachments
amx_bhopas.sma
Štai čia tas pluginas. Bhop.
(5.45 KiB) Downloaded 711 times

User avatar
psychical
Viršininkas
Posts: 2094
Joined: 2011 Mar 12 22:19
Skype: tautvydas11
Location: Linksmakalnis
Contact:

Re: AutoBhop bug'as

Post by psychical »

Code: Select all

public CmdStart(id, uc_handle, seed){    if( g_bAlive[id]    &&  get_pcvar_num(g_pcvarBhopStyle)    &&  get_uc(uc_handle, UC_Buttons) & IN_USE    &&  pev(id, pev_flags) & FL_ONGROUND    )    {        static Float:fVelocity[3]        pev(id, pev_velocity, fVelocity)        fVelocity[0] *= 0.3        fVelocity[1] *= 0.3        fVelocity[2] *= 0.3        set_pev(id, pev_velocity, fVelocity)    }}
Čia problema. O kaip ją išspręsti, sugalvok pats.

Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

Re: AutoBhop bug'as

Post by Pukuotukas951 »

Ne, ne čia bėda man rodos o Player_Jump(id) , kaip manot? nes kai cvar 0 , button neveikia, kai ( cvar > 0 )= stabdo

User avatar
psychical
Viršininkas
Posts: 2094
Joined: 2011 Mar 12 22:19
Skype: tautvydas11
Location: Linksmakalnis
Contact:

Re: AutoBhop bug'as

Post by psychical »

Image

Aiškiai pasakiau, kur klaida, nes pačiam ta "klaida" buvo, o tu man dabar teigi, jog ne čia? Pirma pabandyk pažiūrėti, o tada rašyk atsakymą, jog klaida ne čia...

Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

Re: AutoBhop bug'as

Post by Pukuotukas951 »

Tai tipo gal:

Code: Select all

public CmdStart(id, uc_handle, seed){    if( g_bAlive[id]    &&  get_pcvar_num(g_pcvarBhopStyle)    &&  get_uc(uc_handle, UC_Buttons) & IN_USE    &&  pev(id, pev_flags) & FL_ONGROUND    )    {        static Float:fVelocity[3]        pev(id, pev_velocity, fVelocity)        fVelocity[0] *= 0.3        fVelocity[1] *= 0.3        fVelocity[2] *= 0.3    }}

Tetusis

Re: AutoBhop bug'as

Post by Tetusis »

&& get_uc(uc_handle, UC_Buttons) & IN_USE

Code: Select all

    public CmdStart(id, uc_handle, seed)    {        if( g_bAlive[id]        &&  get_pcvar_num(g_pcvarBhopStyle)        &&  pev(id, pev_flags) & FL_ONGROUND    )        {            static Float:fVelocity[3]            pev(id, pev_velocity, fVelocity)            fVelocity[0] *= 0.3            fVelocity[1] *= 0.3            fVelocity[2] *= 0.3            set_pev(id, pev_velocity, fVelocity)        }    }

Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

Re: AutoBhop bug'as

Post by Pukuotukas951 »

Tetusis wrote:&& get_uc(uc_handle, UC_Buttons) & IN_USE

Code: Select all

    public CmdStart(id, uc_handle, seed)    {        if( g_bAlive[id]        &&  get_pcvar_num(g_pcvarBhopStyle)        &&  pev(id, pev_flags) & FL_ONGROUND    )        {            static Float:fVelocity[3]            pev(id, pev_velocity, fVelocity)            fVelocity[0] *= 0.3            fVelocity[1] *= 0.3            fVelocity[2] *= 0.3            set_pev(id, pev_velocity, fVelocity)        }    }
ne, kažkas kito, dabar išvis pajudėti neina.


Dabar testinau kaip ir viskas tvarkoj, Tautvydai pažiūrėk:

Code: Select all

    public CmdStart(id, seed)    {        if( g_bAlive[id]        &&  get_pcvar_num(g_pcvarBhopStyle)        &&  pev(id, pev_flags) & FL_ONGROUND    )        {            static Float:fVelocity[3]            pev(id, pev_velocity, fVelocity)            fVelocity[0] *= 0.3            fVelocity[1] *= 0.3            fVelocity[2] *= 0.3        }    }

User avatar
psychical
Viršininkas
Posts: 2094
Joined: 2011 Mar 12 22:19
Skype: tautvydas11
Location: Linksmakalnis
Contact:

Re: AutoBhop bug'as

Post by psychical »

Code: Select all

register_forward(FM_CmdStart, "CmdStart")
Aš parašiau funkciją, kurioje yra problema... O tai, nereiškia, jog ją reikia redaguoti... Ją reikia panaikinti...

InvIs
Gana aktyvus vartotojas
Posts: 421
Joined: 2011 Aug 13 11:12
Skype: pksoldierlt
Location: ATOSTOGOSE

Re: AutoBhop bug'as

Post by InvIs »

Nėra logikos, tai išvis nelyskit į scriptingą :D Kam ten ta funkcija išvis įdėta?

Kai paspaudi E raidę ir jeigu cvaras == 1 ir jei esi ant žemės, tada žaidėją sustingdo? WHY?
ISVYKES

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest