English Hc Chat Settings

10 replies
Goto Page
To the start Previous 1 Next To the start
14.07.18 03:16:58 pm
Up
Man Of Steel
User
Offline Off
Hi everyone,

Guys, anybody can help me?
i want to change some Chat settings in Hc Admin Script, i hope somebody will help me

i want, if VIP or high rank than that change his chat colors so only their Message Color change and tag color always show in White and Players name color show according their team colors

Example: if Player (VIP Or High rank than that) playing in terrorist team and if he will send message so his name show in Terrorist team color and tag show in white color and if he change his chat colors so only Message Color change.

Please help
FRiendly boYy.
14.07.18 04:49:59 pm
Up
LoaderFRA
User
Offline Off
Look in folder/hc.config Setting: Chat
Source: file archive/HC Admin script.
14.07.18 06:03:46 pm
Up
Baloon
GAME BANNED
Offline Off
@user LoaderFRA: he wants code, not how to do it.
14.07.18 06:52:39 pm
Up
Man Of Steel
User
Offline Off
Yes i need code
@user LoaderFRA: There nothing about Chat in hc.config
"Maybe"
FRiendly boYy.
14.07.18 07:26:03 pm
Up
LoaderFRA
User
Offline Off
@user Man Of Steel: Oh... I check and i found in folder hc/modules/chat.lua
Maybe with this thread, you can use "temporally".
> This thread
14.07.18 07:51:29 pm
Up
Man Of Steel
User
Offline Off
Hey But where is code there? i want terrorist and counter terrorist own separate colors to show.

Maybe all work in this code, i changed some setting but players team colors always change together when i change my chat colour.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
function hc.chat.say_hook(p, text)
    if text == "rank" then
        return 0
    end

    local team = player(p, "team")

    if team == hc.SPEC or tonumber(game("sv_gamemode")) == hc.NORMAL and
            player(p, "health") == 0 then
    -- Spectating players and dead players in normal mode can't talk
    -- to living players.
        return 0
    end

    hc.chat.check_for_smileys(p, text)

    if hc.is_vip(p) then
        local colour_name = hc.get_player_property(p, hc.chat.COLOUR_PROP_NAME)
        local colour

        if colour_name then
            colour = hc.chat.COLOURS[colour_name]
            if colour and type(colour) == "table" then
                colour = colour[team]
            elseif not colour or colour == "nil" then
                return 0
            end
        else
            return 0
        end

        local title = colour .. player(p, "name")
        local show_tag = hc.get_player_property(p, hc.chat.TAG_PROP_NAME)

        if show_tag == nil or show_tag == hc.chat.ON then
            local tag = hc.chat.SAY_TAGS[hc.get_level(p)]
            title = title .. " ©255255255»" .. tag .. "«" .. colour

        end

        text = hc.strip_end(text, "[©@]C", 2)

        if player(p, "health") == 0 then
            msg(title .. " *DEAD*: " .. text)
        else
            msg(title .. ": " .. text)
        end
        return 1
    end
    return 0
end
FRiendly boYy.
14.07.18 08:15:03 pm
Up
LoaderFRA
User
Offline Off
Maybe, desactived hc.chat and use other system of "tag CT/T":
> Click here
edited 1×, last 14.07.18 08:25:07 pm
15.07.18 02:39:46 pm
Up
Man Of Steel
User
Offline Off
@user LoaderFRA: Dude i don't need that anyways thanks a lot for help try to help

Maybe @user Cure Pikachu: Or @user princeofpersia: will help me?
FRiendly boYy.
16.07.18 02:49:28 pm
Up
apex2d
User
Offline Off
What do you mean by this?
user Man Of Steel has written:
Hey But where is code there? i want terrorist and counter terrorist own separate colors to show.

Maybe all work in this code, i changed some setting but players team colors always change together when i change my chat colour.


i might have the code that you need, send me a pm maybe i can help
Eat Sleep Conquer Repeat. www.Radeon2D.forumid.net
16.07.18 05:37:06 pm
Up
Man Of Steel
User
Offline Off
if you saw Fws Servers hc admin script so you know about that.
FRiendly boYy.
22.05.19 10:00:32 am
Up
G3tWr3ck3d
User
Offline Off
Inside
Code:
1
hc/modules/chat.lua


Search for function
Code:
1
hc.chat.say_hook(p, text)


Replace the whole function with the following

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function hc.chat.say_hook(p, text)
    if text == "rank" then
        return 0
    end

    local team = player(p, "team")

    hc.chat.check_for_smileys(p, text)

    if hc.is_vip(p) then
        local colour_name = hc.get_player_property(p, hc.chat.COLOUR_PROP_NAME)
        local colour

        if colour_name then
            colour = hc.chat.COLOURS[colour_name]
            if colour and type(colour) == "table" then
                colour = colour[team]
            elseif not colour or colour == "nil" then
                    colour = hc.SPEC_YELLOW
            end
        else
            return 0
        end

          local title = hc.WHITE

        local show_tag = hc.get_player_property(p, hc.chat.TAG_PROP_NAME)
                    
        if show_tag == nil or show_tag == hc.chat.ON then
            local tag = hc.chat.SAY_TAGS[hc.get_level(p)]
               
               title = title .. "»" .. tag .. "« " .. hc.user.COLOURS[team] .. player(p, "name")
          elseif show_tag == nil or show_tag == hc.chat.ON and colour == "nil" then
               title = title .. "»" .. tag .. "« " .. hc.user.COLOURS[team] .. player(p, "name")
          elseif show_tag == nil or show_tag == hc.chat.OFF then
               title = hc.user.COLOURS[team] .. player(p, "name")
        end

        text = hc.strip_end(text, "[©@]C", 2)

          if team == hc.SPEC or tonumber(game("sv_gamemode")) == hc.NORMAL and 
               player(p, "health") == 0 then
               -- Spectating players and dead players in normal mode can't talk
               -- to living players.               
               return 0
          else
               msg(title .. ": " .. colour .. text)
          end
        return 1
    end
    return 0
end


I tested, so it should work for you aswell.
edited 1×, last 22.05.19 04:58:43 pm
Mess with the best, die like the rest. ༼ つ ◕_◕ ༽つ
To the start Previous 1 Next To the start