palietimai

Š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

palietimai

Post by aurimasko »

Turiu kodą:

Code: Select all

 public touch(toucher, touched) {        static team_toucher, team_touched        team_toucher = get_user_team(toucher)        team_touched = get_user_team(touched)                if(team_toucher == 2 && team_touched == 1 )        {            static flags            flags = entity_get_int(touched, EV_INT_flags)                        if(!(flags & FL_FROZEN)) entity_set_int(touched, EV_INT_flags, flags | FL_FROZEN)                       }        else if(team_toucher == 1 && team_touched == 1)         {            static flags            flags = entity_get_int(touched, EV_INT_flags)                        if(flags & FL_FROZEN) entity_set_int(touched, EV_INT_flags, flags & ~FL_FROZEN)          }    }}   
Jis daro, kad jeigu CT paliečia T tai teroristas negali judėti, o jeigu T atliečia T vėl gali judėti..

Kaip sužinoti kada liks 1 nepagautas teroristas ir kada visi sugaudyti?

User avatar
aaarnas
Vyr. diskusijų administratorius
Posts: 3891
Joined: 2010 Aug 31 13:21
Skype: fiarno
Contact:

Re: palietimai

Post by aaarnas »

Jau išsiaiškinai per skype ar dar klausimų yra ?
Palikau CS pasaulį ;/ . Nebepasiekiamas.

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

Re: palietimai

Post by aurimasko »

na o kaip yra:

Code: Select all

 public touch(touched,toucher){    new Tplayers[32], Tpnum, Ttempid;    get_players(Tplayers,Tpnum,"ae","TERRORIST")        for( new i; i<Tpnum; i++ )    {        Ttempid = Tplayers[i];                if(cl_forezen[Ttempid]) count++                if(count == Tpnum-1)        {            //veikimo kodas        }else{                       //kaip padaryti kad jeigu count != Tpnum-1) tai tam kuris dar neužšaldytas duotų kažkokių galių?        }    }    }   

kaip padaryti kad jeigu count != Tpnum-1) tai tam kuris dar neužšaldytas duotų kažkokių galių?

User avatar
aaarnas
Vyr. diskusijų administratorius
Posts: 3891
Joined: 2010 Aug 31 13:21
Skype: fiarno
Contact:

Re: palietimai

Post by aaarnas »

Code: Select all

public touch(touched,toucher){    static Tplayers[32], Tpnum, Ttempid, id    get_players(Tplayers,Tpnum,"ae","TERRORIST")        for( new i; i<Tpnum; i++ )    {        Ttempid = Tplayers[i];                if(cl_forezen[Ttempid]) count++        else id = Ttempid    }        if(count == Tpnum-1)    {        super_galios(id)    }}
Palikau CS pasaulį ;/ . Nebepasiekiamas.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests