I'm [B]not that great[/B] with clientside lua, and I quickly tried this.
[CODE]function GreenText( ply, text, public ) if (string.sub(text, 1, 1) == ">") then
return Color( 0,0,255 ) .. text;
end
end
hook.Add( "PlayerSay", "GreenText", GreenText );[/CODE]
Didn't work.
[CODE]18:49:04 Lua Error: [ERROR] lua/autorun/server/greentext.lua:3: attempt to concatenate a table value 1. v - lua/autorun/server/greentext.lua:3 2. unknown - lua/includes/modules/hook.lua:82[/CODE]
Any assistance?
What are you trying to do? Make all chat text green?
[code]
function GreenText( ply, text, public )
if(string.find(text,">")) then
chat.AddText(Color(0,255,0),text)
return true
end
end
hook.Add( "OnPlayerChat", "GreenText", GreenText );
[/code]
Sorry, you need to Log In to post a reply to this thread.