In this distance player's can hear each other :

And in this distance player's can't hear each other :

Please if sombody can make this just post it here i really need it !
 
   
  CS2D
 CS2D  Scripts
 
Scripts  Distance chat
 Distance chat Distance chat
 Distance chat 
  1
 1  
 


 
   
 function radiusmsg(words, x, y, radiusx, radiusy)
	print(words)
	if not (radiusx and radiusy) then radiusx, radiusy = 128, 128 end
	local x1, y1, x2, y2 = x-radiusx, y-radiusy, x+radiusx, y+radiusy
	for _, v in ipairs(player(0, 'table')) do
		if player(v, 'x') >= x1 and player(v, 'x') <= x2 and player(v, 'y') >= y1 and player(v, 'y') <= y2 then
			msg2(v,words)
		end
	end
	return 1
end
addhook("say","rmsg")
function rmsg(id,txt)
	text = "©255255000"..player(id,"name").." : "..txt
	radiusmsg(text, player(id, 'x'), player(id, 'y'), radiusx, radiusy)
	return 1
end
 
   
  1
 1  
 