Change the color of ..ply:Nick()?

With this code, both (PM) and the name are the color of the person’s job. I want the (PM) to be a certain RGB color but the ply:Nick() to be the color of the job, seems easy, but I can’t get it to work.


	DarkRP.talkToPerson(target, col, "(PM) "..ply:Nick(), Color(255,255,255,255), msg, ply)
		DarkRP.talkToPerson(ply, col, "(PM) "..ply:Nick(), Color(255,255,255,255), msg, ply)

Doing it like this just messes it up.


     DarkRP.talkToPerson(target, Color(255,255,255,255), "(PM) ", col, ply:Nick(), Color(255,255,255,255), msg, ply)
		DarkRP.talkToPerson(ply, Color(255,255,255,255), "(PM) ", col, ply:Nick(), Color(255,255,255,255), msg, ply)

what is col?

team.GetColor(ply:Team())

If I’m reading right, it’s ordered as string, color, string, color - so you’re setting ply:Nick() to Color(255,255,255)

The issue is that I believe talkToPerson only takes an entity, colour, string, colour, string, entity. Your first works because it fits that format, the 2nd has 3 colours and 3 strings.

chat.AddText takes a variable amount of arguments so it would work on the client if you took the entities off the start and finish.

Modifying the existing method would probably break a bunch of stuff, but you could always look at it and make your own implementation that allows for a variable amount of arguments by just sending a table with them in + the entities first and last, then looping through it and setting the message up.