Help with OnPlayerChangedTeam

Hi, i am trying to make my hitlist display a hud automatically when the player becomes a hitman, and dissappears when not. I really need help. All my other code looks fine but im stuck on this. Im trying to make it so when a player switches from ANY job to a hitman, the hud shows up. Im pretty sure i did this completely wrong, But if you can give me some code that does what i need when the player changes to hitman that would be great


function OnPlayerChangedTeam( ply, *, 31 )
net.Start("cn_hitmanList");
net.Send(client);
end;

[lua]hook.Add(“OnPlayerChangedTeam”, “HitmanList”, function(ply)
net.Start(“cn_hitmanList”);
net.Send(ply);
end)[/lua]

I’m going to assume you have checks in your “cn_hitmanList” that checks if the player’s a hitman or not.

yea thats exactly what ive done. But im getting no results. I have this in my client and its still not working


net.Receive("cn_hitmanList", function(length)
if (LocalPlayer():Team() == TEAM_HITMAN) then
		createHitList();
end;
end);

[editline]8th September 2013[/editline]

-Bump- Still need help

-Bump- I still need help