Page 1 of 1

print

Posted: 2012 Mar 14 16:02
by nuodas159
Sveiki, kaip padaryti ,kad nebuti kaip paspaudus viena mygtuka ir ji uzlaikes su print komanda priflodina chata zaidime, kaip padaryti ,kad uzlaikes ar paspaudes viena karta parasytu?

Re: print

Posted: 2012 Mar 15 00:08
by hleV
Patikrink, ar tarp oldbuttons (pev_oldbuttons su Fakemeta, EV_INT_oldbuttons su Engine) nėra to mygtuko, kurį spaudžia.

Pvz.:

Code: Select all

if (entity_get_int(client, EV_INT_button) & IN_USE && ~entity_get_int(client, EV_INT_oldbuttons) & IN_USE){    // Paspaude +use}

Re: print

Posted: 2012 Mar 15 08:17
by nuodas159
hleV wrote:Patikrink, ar tarp oldbuttons (pev_oldbuttons su Fakemeta, EV_INT_oldbuttons su Engine) nėra to mygtuko, kurį spaudžia.

Pvz.:

Code: Select all

if (entity_get_int(client, EV_INT_button) & IN_USE && ~entity_get_int(client, EV_INT_oldbuttons) & IN_USE){    // Paspaude +use}
Yra Bet tik taip:

Code: Select all

     entity_set_int(victim, EV_INT_button, entity_get_int(id,EV_INT_button) & ~IN_JUMP) 

Re: print

Posted: 2012 Mar 15 13:17
by hleV
Aš tau kątik parodžiau, ką daryt. Jeigu nemoki, tai rodyk visą savo kodą.

Re: print

Posted: 2012 Mar 15 15:48
by nuodas159

Code: Select all

 public fw_PlayerPreThink(id, iPlayer){    if(!is_user_alive(id))        return PLUGIN_HANDLED        static Float: velocity[3], Float: Time    static button, flag, oldbutton     button = pev(id, pev_button)    oldbutton = pev(id, pev_oldbuttons);     flag = pev(id, pev_flags)    Time = get_gametime()        if(gInfected[id])    {        switch(iClass[id])        {            case 3: // smoker            {                if (!g_bFreezeTime && (button & IN_USE) && (flag & FL_ONGROUND))                {                    static Float: cooldown                    cooldown = get_pcvar_float(cvar_dragcd)                                        if (Time - cooldown > g_LastDrag[id] && (!g_hook[id]) && p_team[id] == 1 && iClass[id] == 3)                    {                        drag_start(id)                        g_LastDrag[id] = Time                    }                }                if(!g_bFreezeTime && (!(button & IN_USE)) && (oldbutton & IN_USE))                    drag_end(id)            }         }    }    return FMRES_IGNORED}   

Re: print

Posted: 2012 Mar 15 16:22
by hleV
Nieko nesako man tavo ištraukos iš kodo.