I need help in changing the ttt_radio commands a different color
so if someone calls ttt_radio innocent the chat would be green and if someone call ttt_radio traitor it would be red.
i really need help with this
/gamemode/terrortown/gamemode/cl_voice.lua
[CODE]
local function RadioMsgRecv()
local sender = net.ReadEntity()
local msg = net.ReadString()
local param = net.ReadString()
if not (IsValid(sender) and sender:IsPlayer()) then return end
GAMEMODE:PlayerSentRadioCommand(sender, msg, param)
-- if param is a language string, translate it
-- else it's a nickname
local lang_param = LANG.GetNameParam(param)
if lang_param then
if lang_param == "quick_corpse_id" then
-- special case where nested translation is needed
param = GetPTranslation(lang_param, {player = net.ReadString()})
else
param = GetTranslation(lang_param)
end
end
local text = GetPTranslation(msg, {player = param})
-- don't want to capitalize nicks, but everything else is fair game
if lang_param then
text = util.Capitalize(text)
end
if sender:IsDetective() then
AddDetectiveText(sender, text)
else
chat.AddText(sender,
COLOR_WHITE,
": " .. text)
end
end
net.Receive("TTT_RadioMsg", RadioMsgRecv)
[/CODE]
i believe that this is the function i have to edit
Sorry, you need to Log In to post a reply to this thread.