Page 1 of 1

Spalvos

Posted: 2014 May 01 14:59
by the7n
Sveiki, gal kas galėtu į kodą įdėt tas spalvas kur čhate būna?
iš kitur neišeina pačiam niekaip įsidėt, gal kas galėtu pagelbėt? štai kodas:

Code: Select all

/* AMX Mod script* * (c) 2002-2003, DynAstY* This file is provided as is (no warranties).** Players with immunity won't be checked*/ #include <amxmodx>  new HIGHPING_MAX = 100 // set maximal acceptable pingnew HIGHPING_TIME = 10  // set in seconds frequency of ping checkingnew HIGHPING_TESTS = 5  // minimal number of checks before doing anything  new iNumTests[33] public plugin_init() {    register_plugin("High Ping Kicker","1.2.0","DynAstY")    if (HIGHPING_TIME < 15) HIGHPING_TIME = 15    if (HIGHPING_TESTS < 4) HIGHPING_TESTS = 4    return PLUGIN_CONTINUE} public client_disconnect(id) {    remove_task(id)    return PLUGIN_CONTINUE}    public client_putinserver(id) {    iNumTests[id] = 0    if (!is_user_bot(id)) {        new param[1]        param[0] = id        set_task(30.0, "showWarn", id, param, 1)    }    return PLUGIN_CONTINUE} kickPlayer(id) {    new name[32]    get_user_name(id, name, 31)    new uID = get_user_userid(id)    server_cmd("banid 1 #%d", uID)    client_cmd(id, "echo ^"Atsiprasome  bet jusu pingas siekia PING limita musu serveryje.^"; disconnect")    client_print(0, print_chat, "%s Buvo ismestas del per didelio pingo!", name)    return PLUGIN_CONTINUE}  public checkPing(param[]) {    new id = param[0]    if ((get_user_flags(id) & ADMIN_IMMUNITY) || (get_user_flags(id) & ADMIN_RESERVATION)) {        remove_task(id)        client_print(id, print_chat, "Pingo tikrinimas buvo isjungtas del jusu imuniteto")        return PLUGIN_CONTINUE    }    new p, l    get_user_ping(id, p, l)    if (p > HIGHPING_MAX)        ++iNumTests[id]    else        if (iNumTests[id] > 0) --iNumTests[id]    if (iNumTests[id] > HIGHPING_TESTS)        kickPlayer(id)    return PLUGIN_CONTINUE} public showWarn(param[]) {    client_print(param[0], print_chat, "Zaidejai su didesniu pingu negu %dms bus ismesti!", HIGHPING_MAX)    set_task(float(HIGHPING_TIME), "checkPing", param[0], param, 1, "b")    return PLUGIN_CONTINUE} 

Re: Spalvos

Posted: 2014 May 01 19:52
by ArtHa123
Kalbi apie spalvote teksta?

t.y.
client_print_color(id, print_chat, "^4Pingo tikrinimas buvo isjungtas ^3del jusu imuniteto")

Re: Spalvos

Posted: 2014 May 01 20:59
by the7n
Taip apie spalvota teksta, man kazkodel klaidas meta :fool:

Re: Spalvos

Posted: 2014 May 01 23:59
by sss
compile'iuok parsisiuntes plugina, ne su web compiler'iu, includes folder'yje turetum rasti kazka panasaus i colorchat.inc, ir atsidares ji pasiziurek ar yra ta funkcija su kuria print'ini, pats colorchat'as turi kaip include buti prirasytas paciame kode.

Re: Spalvos

Posted: 2014 May 02 02:33
by laimiukas3
pvz

Code: Select all

public connectmessage(id){    if(is_user_connected(id))    {    ChatColor(id, "!t[!g LALALA!t] !y LALALALLA !g LALALALA !y:)")    }} stock ChatColor(const id, const input[], any:...){        new count = 1, players[32]        static msg[191]        vformat(msg, 190, input, 3)            replace_all(msg, 190, "!g", "^4")        replace_all(msg, 190, "!y", "^1")        replace_all(msg, 190, "!t", "^3")            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();                        }                }        }}