admin chat

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

admin chat

Post by laimiukas3 »

gal kas galit padeti noriu padaryti kad pvz tam tikra flaga turinciam zaidejui pvz ADMIN_BAN ne hud o jau dhud didelem raidem zinute butu


Code: Select all

public cmdSayChat(id, level){    if (!access(id, level))    {        return PLUGIN_CONTINUE    }        new said[6], i = 0    read_argv(1, said, charsmax(said))        while (said[i] == '@')    {        i++    }        if (!i || i > 3)    {        return PLUGIN_CONTINUE    }        new message[192], a = 0    read_args(message, charsmax(message))    remove_quotes(message)        switch (said[i])    {        case 'r': a = 1        case 'g': a = 2        case 'b': a = 3        case 'y': a = 4        case 'm': a = 5        case 'c': a = 6        case 'o': a = 7    }        new n, s = i    if (a)    {        n++        s++    }    while (said[s] && isspace(said[s]))    {        n++        s++    }         new name[MAX_NAME_LENGTH], authid[32], userid        get_user_authid(id, authid, charsmax(authid))    get_user_name(id, name, charsmax(name))    userid = get_user_userid(id)        log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + n])    log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + n], "en", g_Colors[a])        if (++g_msgChannel > 6 || g_msgChannel < 3)    {        g_msgChannel = 3    }        new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0        set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)     switch (get_pcvar_num(amx_show_activity))    {        case 3, 4:        {            new players[MAX_PLAYERS], plrsnum, pl            get_players(players, plrsnum, "ch")            for(new j; j<plrsnum; j++)            {                pl = players[j]                 if (is_user_admin(pl))                {                    show_hudmessage(pl, "%s :   %s", name, message[i + n])                    client_print(pl, print_notify, "%s :   %s", name, message[i + n])                }                else                {                    show_hudmessage(pl, "%s", message[i + n])                    client_print(pl, print_notify, "%s", message[i + n])                }            }        }        case 2:        {            show_hudmessage(0, "%s :   %s", name, message[i + n])            client_print(0, print_notify, "%s :   %s", name, message[i + n])        }        default:        {            show_hudmessage(0, "%s", message[i + n])            client_print(0, print_notify, "%s", message[i + n])        }    }     return PLUGIN_HANDLED}
Image
Image
Image

Terror
Senbūvis
Posts: 1086
Joined: 2015 Feb 27 19:29
Location: Alytus

Re: admin chat

Post by Terror »

Kiek pamenu tai
show_hudmessage i show_dhudmessage

User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

Re: admin chat

Post by laimiukas3 »

Terror wrote:Kiek pamenu tai
show_hudmessage i show_dhudmessage
ne ne as ne apie tai as noriu kad tam tikra flaga turinciam pvz admin level ten px m rasytu dhud o va paprastam tarkim ten admin level h rasytu hud :D
vienu zodziu big boos rasytu didelem raidem jo pakalikai mazom
Last edited by laimiukas3 on 2017 Jan 30 16:51, edited 1 time in total.
Image
Image
Image

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: admin chat

Post by DYaGesS »

Parašiau tau į skype galimai sprendimą šitos situacijos.
Padėjau? +rep

luxuks
Jau po truputį tampa savu
Posts: 186
Joined: 2014 Jun 18 17:20
Skype: lukas.luxuks

Re: admin chat

Post by luxuks »

DYaGesS wrote:Parašiau tau į skype galimai sprendimą šitos situacijos.
Galetumet vis delto pasidalint savo sprendimu ir cia.

FrankJScott
Gana aktyvus vartotojas
Posts: 324
Joined: 2024 Apr 04 22:28
Skype: asfasf

Excellent Product Site

Post by FrankJScott »

Please try Google before asking about Great Product Website 4be26f4

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests