awesome, i shall use this to communicate between my lols test server and my main sexy server
edit: imma claimin this new pageeeeee
also i love how u write variable=nil when ur done using it! its a good practice, especially in java
addhook("say","savetext") function savetext(id,t) 	local f=assert(io.open("/root/cs2d/chat.txt","r")) --change the address, just a placeholder 	local txt=f:read() 	f:close() 	f=assert(io.open("/root/cs2d/chat.txt","w")) 	f:write("["..game("sv_name").."] "..player(id,"name")..": "..t.."\n"..txt) 	f:close() 	f=nil 	txt=nil end
lastline="" addhook("second","parsemessages") function parsemessages() 	local f=assert(io.open("/root/cs2d/chat.txt")) 	local txt=f:read("*line") 	if txt~=lastline then 		msg(txt) 		lastline=txt 	end end
addhook("say","savetext") function savetext(id,t) 	local f=assert(io.open("/root/cs2d/chat.txt","a+")) 	f:write("["..game("sv_name").."] "..player(id,"name")..": "..t.."\n"..txt) 	f:close() end addhook("second","cleartext") function cleartext() 	local f=assert(io.open("/root/cs2d/chat.txt","w")) 	f:write("") 	f:close() end
addhook("second","parsemessages") function parsemessages() 	local f=assert(io.open("/root/cs2d/chat.txt")) 	local txt=f:read() 	msg(txt) 	lastline=txt end
--writing to other server --in a say hook function(id,txt) if string.sub(txt,1,1)~="!" and string.sub(txt,1,1)~="@" then 	local f=assert(io.open("test/chat.lua","a+")) 	local team="" 	if player(id,"team")==1 then team="©255064064" 	elseif player(id,"team")==2 then team="©064064255" end 	f:write(team.."["..game("sv_name").."] "..player(id,"name")..": "..txt.."\n") 	f:close() end --reading from other server --in a second hook function() for line in io.lines("test/chatz.lua") do 	msg(line) end local f=assert(io.open("test/chatz.lua","w")) f:write("") f:close() --other server --writing to original server --in a say hook function(id,txt) if string.sub(txt,1,1)~="!" and string.sub(txt,1,1)~="@" then 	local f=assert(io.open("chatz.lua","a+")) 	local team="" 	if player(id,"team")==1 then team="©255064064" 	elseif player(id,"team")==2 then team="©064064255" end 	f:write(team.."["..game("sv_name").."] "..player(id,"name")..": "..txt.."\n") 	f:close() end --reading from original server --in a second hook function() for line in io.lines("chat.lua") do 	msg(line) end local f=assert(io.open("chat.lua","w")) f:write("") f:close()