DarkRP OOC Chat Problem

Anyone willing to help me with this?

I am trying to make it so that the (OOC) tag when you talk in ooc is Green.

i am getting this error

[gamemodes\DarkRP\gamemode\main.lua:1643] ‘)’ expected near ‘col’

[lua]local function OOC(ply, args)
if GetConVarNumber(“ooc”) == 0 then
Notify(ply, 1, 4, string.format(LANGUAGE.disabled, “OOC”, “”))
return “”

local DoSay = function(text)
	if text == "" then return "" end
	local col = team.GetColor(ply:Team())
	local col2 = Color(255,255,255,255)
	local lol = Color(0,132,0,255)
	if not ply:Alive() then
		col2 = Color(255,255,255,255)
		col = col2
	for k,v in pairs(player.GetAll()) do
		TalkToPerson(v, lol, "(OOC) "col, ..ply:Name(), col2, text, ply)
return args, DoSay

AddChatCommand("//", OOC, true)
AddChatCommand("/a", OOC, true)
AddChatCommand("/ooc", OOC, true)[/lua]

TalkToPerson(v, lol, "(OOC) "col, …ply:Name(), col2, text, ply)

Change to:

TalkToPerson(v, lol, "(OOC) "…col, …ply:Name(), col2, text, ply)

-Chessnut got it I think-

tryed that but got this error

[gamemodes\DarkRP\gamemode\main.lua:1643] unexpected symbol near ‘…’

I was wrong before, you used the function right. I didn’t realize that team.GetColor() was correct. Just use your original code. Besides it wasn’t even what was going on, according to the function source posted here: http://www.facepunch.com/threads/1000149?p=24776113&viewfull=1#post24776113, you need to add a ‘,’ after the OOC string. “col” would be a parameter for the second color input for TalkToPerson(), so it needs to be formatted as a parameter.

i tryed doing it and got this error

[gamemodes\DarkRP\gamemode\main.lua:1643] unexpected symbol near ‘…’

and i did [lua]TalkToPerson(v, lol, "(OOC) ", col, …ply:Name(), col2, text, ply)[/lua]

I don’t see a string near …ply:Name(). You can’t concatenate blank space. Remove the “…”.

Ok it kinda works.

it looks like this tho


like if i type something it dosnt show up

What do you mean? Speak specifically, I cannot read your mind.

Sorry i ment to say type.

I honestly don’t know what’s causing that. Try building on the function again, this time only work with what’s given (the “col” and “col2” variables should be enough for what you’re trying to do).


If it still breaks after that, I don’t know what to tell you. I hope someone else will be able to figure it out.