Page 1 of 1

Immunity ir colorchat problema

Posted: 2013 May 17 13:02
by Spag
Viena problema yra tokia, kad tas target tikrina ar žaidėjas turi immunity ar ne, jeigu turi tai neleidžia naudoti komandos. Prašau ko nors paaiškinti kokie ten turi būti argumentai ir kaip naudoti tokią komandą, kad veiktų visiems?

code:

Code: Select all

    new target[32]    read_argv(1, target, 31)        new player = cmd_target(id, target)        if(!player)        return PLUGIN_HANDLED

Kita problema, funkcijoje

Code: Select all

public Text(Param[])
neveikia colorchat visiškai nereguoja į !t, !n, !g tiesiog sudeda tarpus dvigubus kur šitie parašyti ir fsio.

stockas:

Code: Select all

stock client_printc(const id, const input[], any:...){    new count = 1, players[32];    static msg[191];    vformat(msg, 190, input, 3);        replace_all(msg, 190, "!g", "^x04"); // Green Color    replace_all(msg, 190, "!n", "^x01"); // Default Color    replace_all(msg, 190, "!t", "^x03"); // Team Color        if (id) players[0] = id; else get_players(players, count, "ch");    {        for (new i = 0; i < count; i++)        {            if (is_user_connected(players[i]))            {                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);                write_byte(players[i]);                write_string(msg);                message_end();            }        }    }}

eilutė:

Code: Select all

client_printc(player, "!glala!tlal!na")

Su colorchat pirmą kartą man tokios problemos, niekada nebūdavo, taip atsitiko kai įdėjau į tą funkciją... Kitose funkcijose colorchat šitam plugine veikia, bet toje kur nurodžiau - neveikia.

Re: Immunity ir colorchat problema

Posted: 2013 May 17 15:25
by Tetusis
tingiu gilintis kadangi nenaudoju, paprasciausiai include'a atsisiusk ir nematysi problemu. - 7 geguzes 2013 metu - https://forums.alliedmods.net/showthread.php?p=851160

Re: Immunity ir colorchat problema

Posted: 2013 May 17 15:54
by Spag
Tetusis wrote:tingiu gilintis kadangi nenaudoju, paprasciausiai include'a atsisiusk ir nematysi problemu. - 7 geguzes 2013 metu - https://forums.alliedmods.net/showthread.php?p=851160
nesuprantu. Nu parsisiunčiau tą include, įsimečiau į savo plugin naudoju dabar taip be stockų jokių:

Code: Select all

client_print_color(player, "%L", LANG_PLAYER, "TEXT_1")

ir kompileris meta error'ą dėl 2 argumento...

Re: Immunity ir colorchat problema

Posted: 2013 May 17 16:38
by Tetusis
.: Stock Version :.

DON'T USE STOCK VERSION, SEEMS TO HAVE PROBLEM WITH ML
If you prefer to use a stock version that doesn't need an extra plugin to work, follow the following link :Stock Version

Re: Immunity ir colorchat problema

Posted: 2013 May 17 16:45
by Spag
Tetusis wrote:
.: Stock Version :.

DON'T USE STOCK VERSION, SEEMS TO HAVE PROBLEM WITH ML
If you prefer to use a stock version that doesn't need an extra plugin to work, follow the following link :Stock Version
na dabar parsisiunčiau šitą include: http://forums.alliedmods.net/showpost.p ... stcount=90

ir įsidėjau į savo pluginą, savo plugine ištryniau visus stock su color.. ir naudoti

Code: Select all

client_print_color(player, "%L", LANG_PLAYER, "TEXT_1")
?????? bet šitaip irgi meta error dėl 2 argumento

Re: Immunity ir colorchat problema

Posted: 2013 May 17 20:45
by aaarnas

Code: Select all

stock client_print_color(id, iColor=DontChange, const szMsg[], any:...)

Re: Immunity ir colorchat problema

Posted: 2013 May 17 22:52
by Spag
aaarnas wrote:

Code: Select all

stock client_print_color(id, iColor=DontChange, const szMsg[], any:...)
ačiū, susitvarkiau. O kaip dėl to immunity target? Kad leistų visiems žaidėjams naudoti tam tikrą komandą, nu visiem žaidėjam kuriuos pasirenki.