Hook to run when joining a server

So im trying to run a net message when a player joins the server but the PlayerInitialSpawn hook seems to not work or im doing it wrong.

hook.Add("PlayerInitialSpawn", function(ply)
	if ply:GetPData("HSG_UID", 0) != 0 or ply:GetInfoNum("dontshowagain") then 

Any help or suggestions on another hook to use rather than this one is appreciated :slight_smile:

The second argument to hook.Add is a string, not a function.

[lua]hook.Add(‘PlayerInitialSpawn’, ‘Something’, function(ply) end)[/lua]

Oh my dear i forgot all about that xD