Page 1 of 1

palietimai

Posted: 2011 Feb 06 14:08
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?

Re: palietimai

Posted: 2011 Feb 06 20:17
by aaarnas
Jau išsiaiškinai per skype ar dar klausimų yra ?

Re: palietimai

Posted: 2011 Feb 06 21:28
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ų?

Re: palietimai

Posted: 2011 Feb 06 21:36
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)    }}