Help! darkrp Warning: Unhandled usermessage 'OnPlayerChangedTeam'

Hello!
When i trying use clientside hook “OnPlayerChangetTeam” and when Im trying to change team, i got message in the console “Warning: Unhandled usermessage ‘OnPlayerChangedTeam’”.
I need help how to fix this.

My example (simple timer):



local h = 0
local m = 0
local s = 0
local hh = 0
local mm = 0
local ss = 0
function timer(ply, bef, aft)
	if aft == TEAM_CITIZEN then
		timer.Create( "seconds", 1, 0, function() if s >= 59 then s = -1 end s = s + 1 if string.len(s) <= 1 then ss = "0" else ss = "" end end)
		timer.Create( "minutes", 60, 0, function() if m >= 59 then m = -1 end m = m + 1 if string.len(m) <= 1 then mm = "0" else mm = "" end end)
		timer.Create( "hours", 3600, 0, function() h = h + 1 if string.len(h) <= 1 then hh = "0" else hh = "" end end )
	end
	if bef == TEAM_CITIZEN then
		timer.Remove( "seconds" )
		timer.Remove( "minutes" )
		timer.Remove( "hours" )
		hh, mm, ss, h, m, s = 0, 0, 0, 0, 0, 0
	end
end
hook.Add( "OnPlayerChangedTeam", "simple", timer)


The error doesn’t matter, but your code doesnt make sense – you are creating the timers then immediately removing them since your if-statement checks are the same.

oh, sorry, i have a mistake. I’ve edited that

First at all, why are you calling your function timer
You are overriding global timers , doing timer.Create after that will cause errors?