function Color(r,g,b)
	if not r then r = 0 end
	if not g then g = 0 end
	if not b then b = 0 end
	local r,g,b = tostring(r),tostring(g),tostring(b)
	while string.len(r) < 3 do r = "0"..r end
	while string.len(g) < 3 do g = "0"..g end
	while string.len(b) < 3 do b = "0"..b end
	if string.len(r) == 3 and string.len(g) == 3 and string.len(b) == 3 then
		return "©"..r..g..b
	end
	return "©255255255"
end

function msgc(txt,r,g,b)
	msg(Color(r,g,b)..txt)
end

function msgc2(id,txt,r,g,b)
	if id and player(id, "exists") then
		msg2(id, Color(r,g,b)..txt)
	end
end

function ServerMSG(txt)
	msgc("[Server] "..txt, 0, 255, 100)
end

function ServerBroadcast(txt)
	msgc("[SERVER BROADCAST] "..txt, 255, 100)
end

function ServerMSG2(id,txt)
	if id and player(id, "exists") then
		msgc2(id, "[Server] "..txt, 0, 255, 100)
	end
end

function ErrorMSG(id,txt)
	if id and player(id, "exists") then
		msgc2(id, "[Error] "..txt, 255, 0, 0)
	end
end

function printc(txt,r,g,b)
	print(Color(r,g,b)..txt)
end