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
c=string.char(169)
chat={}
rv_chats={}
color={"255020000","000140255","000140255"}
function empchat(id)
chat[tonumber(id)]=nil
end
addhook("join","rv_join")
function rv_join(id)
rv_chats[id] = {"","","",""}
end
addhook("join","rv_leave")
function rv_leave(id)
rv_chats[id] = {"","","",""}
end
addhook("say","rv_say")
function rv_say(id,txt)
if chat[id] then
	if rv_chats[id][1]=="" then
		rv_chats[id][1]=txt
	elseif rv_chats[id][2]=="" then
		rv_chats[id][2]=txt
	elseif rv_chats[id][3]=="" then
		rv_chats[id][3]=txt
	elseif rv_chats[id][4]=="" then
		rv_chats[id][4]=txt
	end
return 1
end
chat[id]=id
timer(3000, "empchat", tostring(id))
	local team=player(id,"team")
	local dead=""
	if game("sv_gamemode")~=1 then
		if player(id,"health")<=0 then
			dead=""..c.."255220000*DEAD*"
		end	
		if team~=0 then
			msg(c..""..color[team]..""..player(id,"name")..""..dead..": "..c.."255220000"..txt)
		else
			msg(c.."255220000"..player(id,"name").." *DEAD*: "..txt)
		end
	else
		if player(id,"health")<=0 then
			for _, pl in pairs(player(0,"table")) do
				if player(pl,"health")<=0 then
					msg2(pl,c..""..color[team]..""..player(id,"name")..""..c.."255220000*DEAD*: "..txt)
				end
			end
		elseif team~=0 then
			msg(c..""..color[team]..""..player(id,"name")..": "..c.."255220000"..txt)
		else
			for _, pl in pairs(player(0,"table")) do
				if player(pl,"health")<=0 then
					msg2(id,c.."255220000"..player(id,"name").." *DEAD*: "..txt)
				end
			end
		end
	end
	return 1
end
addhook("ms100","rv_ms100")
function rv_ms100()
for _, id in ipairs(player(0,"table")) do
	if not player(id,"bot") then
		if chat[id]==nil then
			if rv_chats[id][1]~="" then
				txt=rv_chats[id][1]
				rv_say(id,txt)
				rv_chats[id][1]=""
			elseif rv_chats[id][2]~="" then
				txt=rv_chats[id][2]
				rv_say(id,txt)
				rv_chats[id][2]=""
			elseif rv_chats[id][3]~="" then
				txt=rv_chats[id][3]
				rv_say(id,txt)
				rv_chats[id][3]=""
			elseif rv_chats[id][4]~="" then
				txt=rv_chats[id][4]
				rv_say(id,txt)
				rv_chats[id][4]=""
			end
		end
	end
end
end