• DarkRP Comms coloring
    1 replies, posted
Having some trouble I've been able to get the /Comms, and player name to take one color, but i would like the Players Name/Nickname be their job color while the Comms keeps it's own seperate color. I've been playing around with it for a while, and have come up fruitless. The DarkRp coding has got me stumped local function comms(ply, args)    if args == "" then         DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))         return ""     end     local DoSay = function(text)         if text == "" then             DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))             return         end         for k,v in pairs(player.GetAll()) do             local col = Color( 249, 230, 22, 255 )             local team = team.GetColor(Ply:Team())             DarkRP.talkToPerson(v, col, DarkRP.getPhrase("comms") .. " " .. ply:Nick(), Color(255, 255, 255, 255), text, ply)         end     end     return args, DoSay end DarkRP.defineChatCommand("coms", comms, 1.5) DarkRP.defineChatCommand("comms", comms, 1.5)
You already had the solution in there, you just didn't use it. Here you go: local function comms(ply, args) if args == "" then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", "")) return "" end local DoSay = function(text) if text == "" then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", "")) return end for k,v in pairs(player.GetAll()) do local col = Color( 255, 255, 255, 255 ) -- Other Color local teamcol = team.GetColor(ply:Team()) -- Team Color DarkRP.talkToPerson(v, teamcol, DarkRP.getPhrase("comms") .. " " .. ply:Nick(), col, text, ply) end end return args, DoSay end DarkRP.defineChatCommand("coms", comms, 1.5) DarkRP.defineChatCommand("comms", comms, 1.5)
Sorry, you need to Log In to post a reply to this thread.