Page 1 of 2

Jump block

Posted: 2012 Apr 05 11:40
by InvIs
Yra kokia funkcija, kuri neleistų žaidėjui šokinėti?

Re: Jump block

Posted: 2012 Apr 05 20:39
by Fly3r
Štai taip.

Code: Select all

 #include <amxmodx>#include <fakemeta> public plugin_init(){          register_forward(FM_CmdStart, "fw_CmdStart")}public fw_CmdStart(id, handle){          set_uc(handle, UC_Buttons, get_uc(handle, UC_Buttons) &~ IN_JUMP)}

Re: Jump block

Posted: 2012 Apr 06 13:56
by hleV
Fly3r wrote:Štai taip.
Ot ir ne.

Re: Jump block

Posted: 2012 Apr 06 14:03
by InvIs
Neveikia išties. Nereikia tada JUMP block.

Galbūt eina užblokuoti ėjimą atbulu? (Backwards)

Re: Jump block

Posted: 2012 Apr 06 14:16
by hleV

Code: Select all

#include <amxmodx>#include <engine> public client_PreThink(client)    if (is_user_alive(client) && entity_get_int(client, EV_INT_button) & IN_BACK && ~entity_get_int(client, EV_INT_oldbuttons) & IN_BACK)        client_cmd(client, "-back");

Re: Jump block

Posted: 2012 Apr 06 14:40
by newb
hleV wrote:

Code: Select all

#include <amxmodx>#include <engine> public client_PreThink(client)    if (is_user_alive(client) && entity_get_int(client, EV_INT_button) & IN_BACK && ~entity_get_int(client, EV_INT_oldbuttons) & IN_BACK)        client_cmd(client, "-back");
Bet taip irgi blokuoja ne iskarto o po ~0.5 sec, o jei 20 fps bus tai isvis 2sec dar galesi eit, bent man taip buvo kai uzsibugino cs ir mazai fps buvo.

Re: Jump block

Posted: 2012 Apr 06 14:45
by hleV
Nu žinau, čia lievas būdas, bet gero būdo nežinau.

Re: Jump block

Posted: 2012 Apr 06 15:33
by InvIs
O man reikia gero būdo, kuris iškarto užblokuotų ėjimą atgal. Na tiek to, nėra tragedija, kad nėra būdų tai padaryti. :)

Re: Jump block

Posted: 2012 Apr 06 16:45
by aaarnas
O jei ne pre_think'e tikrinti, o server_frame ?

Re: Jump block

Posted: 2012 Apr 06 17:07
by InvIs
Kad kiek parašyta, užblokuoti žaidėjų judesių neina :?