Radio Chat

Hello Facepunch.

I’m wondering if you could lead me in the right direction here, it concerns Darkrp and the radio chat. Now I hate the look of the radio chat and it’s annoying when you someone is talking in it because you don’t know there name. I’m wondering if you could help me make it so it says the players name next to radio, like this:

Radio [Name]: hello.

Now I sort of got an idea how to add it but I’m not sure, here is what I though would work, this is in main lua.

[LUA] local function SayThroughRadio(ply,args)
if not ply.RadioChannel then ply.RadioChannel = 1 end
if not args or args == “” then
Notify(ply, 1, 4, string.format(LANGUAGE.unable, “/radio”, “”))
return “”
end
local DoSay = function(text)
if text == “” then return end
for k,v in pairs(player.GetAll()) do
if v.RadioChannel == ply.RadioChannel then
TalkToPerson(v, Color(180,180,180,255), "Radio "… tostring(ply.RadioChannel), Color(180,180,180,255), text, ply)
end
end
end [/LUA]

I’m kind of confused where to add the names and help would be appreciated.



local function SayThroughRadio(ply,args)
	if not ply.RadioChannel then ply.RadioChannel = 1 end
	if not args or args == "" then
		Notify(ply, 1, 4, string.format(LANGUAGE.unable, "/radio", ""))
		return ""
	end
	local DoSay = function(text)
		if text == "" then return end
		for k,v in pairs(player.GetAll()) do
			if v.RadioChannel == ply.RadioChannel then
				TalkToPerson(v, Color(180,180,180,255), "Radio [".. ply:Name() .."]".. tostring(ply.RadioChannel), Color(180,180,180,255), text, ply)
			end
		end
	end 


Should work.