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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
addhook("say","cs2d_emojis_public")
addhook("sayteam","cs2d_emojis_private")
EMOJIS = {
["omg"] = "O_o",
[":)"] = "Slightly_Smiling_Face",
["^_^"] = "Beaming_Face_With_Smiling_Eyes",
[":D"] = "Grinning_Face_With_Smiling_Eyes",
[":("] = "Frowning_Face With_Open_Mouth",
[";)"] = "Winking_Face",
["xD"] = "Grinning_Squinting_Face",
[":P"] = "Face_With_Tongue",
[":'("] = "Crying_Face",
[";("] = "Loudly_Crying_Face",
["Dx"] = "Tired_Face",
["T_T"] = "Loudly_Crying_Face",
[":O"] = "Face_With_Open_Mouth",
["O_o"] = "O_o",
[":/"] = "Confused_Face",
[":S"] = "Woozy_Face",
[">:D"] = "Smiling_Face With_Horns",
[">_<"] = "Tired_Face",
[">:("] = "Angry_Face",
["<3"] = "Red_Heart",
["cs2d"] = "gametitle",
["CS2D"] = "gametitle",
[":|"] = "Neutral_Face",
["-_-"] = "Expressionless_Face"
}
function cs2d_emojis_public(id,txt)
if player(id,"health") > 0 then
if player(id,"team") == 1 then
msg("\169255025000"..player(id,"name")..":\169255220000"..cs2d_emojis_check(txt))
else
msg("\169050150255"..player(id,"name")..":\169255220000"..cs2d_emojis_check(txt))
end
else
if player(id,"team") == 1 then
msg("\169255025000"..player(id,"name").."\169255220000 *MUERTO*:"..cs2d_emojis_check(txt))
elseif player(id,"team") == 2 then
msg("\169050150255"..player(id,"name").."\169255220000 *MUERTO*:"..cs2d_emojis_check(txt))
else
msg("\169255220000"..player(id,"name").." *MUERTO*:"..cs2d_emojis_check(txt))
end
end
return 1
end
function cs2d_emojis_private(id,txt)
if player(id,"health") > 0 then
if player(id,"team") == 1 then
for _,id2 in pairs(player(0,"team1")) do
msg2(id2,"\169255025000"..player(id,"name").."\169255220000 (Equipo):"..cs2d_emojis_check(txt))
end
else
for _,id2 in pairs(player(0,"team2")) do
msg2(id2,"\169050150255"..player(id,"name").."\169255220000 (Equipo):"..cs2d_emojis_check(txt))
end
end
else
if player(id,"team") == 1 then
for _,id2 in pairs(player(0,"team1")) do
msg2(id2,"\169255025000"..player(id,"name").."\169255220000 (Equipo) *MUERTO*:"..cs2d_emojis_check(txt))
end
elseif player(id,"team") == 2 then
for _,id2 in pairs(player(0,"team2")) do
msg2(id2,"\169050150255"..player(id,"name").."\169255220000 (Equipo) *MUERTO*:"..cs2d_emojis_check(txt))
end
else
msg("\169255220000"..player(id,"name").." (Equipo) *MUERTO*:"..cs2d_emojis_check(txt))
end
end
return 1
end
function cs2d_emojis_check(txt)
txt_return = ""
for word in string.gmatch(txt, "[^%s]+") do
local emoji = EMOJIS[word];
if (emoji) then
txt_return = txt_return .." \174gfx/sexystandart/Quick_&_Reaxter_Emojis/"..emoji..".png"
else
txt_return = txt_return.." "..word
end
end
return txt_return
end