Hc Chat Settings
10 replies



14.07.18 03:16:58 pm
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
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.
@
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



Maybe with this thread, you can use "temporally".

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.
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
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
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.
Maybe, desactived hc.chat and use other system of "tag CT/T":
Click here

edited 1×, last 14.07.18 08:25:07 pm
@
LoaderFRA: Dude i don't need that anyways thanks a lot for help try to help
Maybe @
Cure Pikachu: Or @
princeofpersia: will help me?

Maybe @


FRiendly boYy.
What do you mean by this?
Man Of Steel has written:
i might have the code that you need, send me a pm maybe i can help

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.
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
Inside
Search for function
Replace the whole function with the following
I tested, so it should work for you aswell.
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
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
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. ༼ つ ◕_◕ ༽つ



