Colored chat msgs from concommad.Add

This is my code atm

server file

[lua]concommand.Add(“ulx”, function(ply)
ply:PlayerMsg( Color(255,255,255), “This server doesnt use ULX admin mod.” )
end)

concommand.Add(“xgui”, function(ply)
ply:PlayerMsg( Color(255,255,255), “This server doesnt use ULX admin mod.” )
end)[/lua]
shared file

[lua]if SERVER then
AddCSLuaFile()
local PLAYER = FindMetaTable(“Player”)
util.AddNetworkString( “ColoredMessage” )
function BroadcastMsg(…)
local args = {…}
net.Start(“ColoredMessage”)
net.WriteTable(args)
net.Broadcast()
end

function PLAYER:PlayerMsg(...)
	local args = {...}
	net.Start("ColoredMessage")
	net.WriteTable(args)
	net.Send(self)
end

elseif CLIENT then
net.Receive(“ColoredMessage”,function(len)
local msg = net.ReadTable()
chat.AddText(unpack(msg))
chat.PlaySound()
end)
end[/lua]

For some reason the PlayerMsg function isnt working I don’t know what’s wrong.

Thanks in advance,
Kirby.

what happens when you run the code?

when i run the code client side it gives this error,


Player [1][Kirby] ERR: Stylek Burmington:6: attempt to call method 'PlayerMsg' (a nil value)
  1. unknown - Stylek Burmington:6
   2. unknown - lua/includes/modules/concommand.lua:54


and when i run it server side it just doesnt register the concommand

Anything on startup?

nothing on startup, its very strange