Immunity ir colorchat problema

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
Spag
Gana aktyvus vartotojas
Posts: 269
Joined: 2012 Dec 31 15:39

Immunity ir colorchat problema

Post 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.

Tetusis

Re: Immunity ir colorchat problema

Post 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

Spag
Gana aktyvus vartotojas
Posts: 269
Joined: 2012 Dec 31 15:39

Re: Immunity ir colorchat problema

Post 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...

Tetusis

Re: Immunity ir colorchat problema

Post 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

Spag
Gana aktyvus vartotojas
Posts: 269
Joined: 2012 Dec 31 15:39

Re: Immunity ir colorchat problema

Post 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

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

Re: Immunity ir colorchat problema

Post by aaarnas »

Code: Select all

stock client_print_color(id, iColor=DontChange, const szMsg[], any:...)
Palikau CS pasaulį ;/ . Nebepasiekiamas.

Spag
Gana aktyvus vartotojas
Posts: 269
Joined: 2012 Dec 31 15:39

Re: Immunity ir colorchat problema

Post 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.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest