PlayerAuthed() and LocalPlayer() not synced.

I’m pretty sure LocalPlayer() is not supposed to be a [NULL Entity] when the PlayerAuthed() hook is called, but it seems like it is now.

Does any of you guys have a clue on what other hooks I could use from the server to make sure players have their LocalPlayer() set?

After the “PlayerInitialSpawn” hook is called, call whatever functions you need a frame after.

Looked promising but it didn’t work, calling it on the next frame still returns the NULL Entity. I’m using a 2 seconds timer to make it work but I’m pretty sure it will vary depending on clients.

I don’t know if this will fit what you are trying, but it’s how I know when to start sending the client information.

[lua]local function OnPlayerLoaded(ent)
if ent == LocalPlayer() then

I put that in the client, and then just make a call to my hook on the server from the net.Receive.

This is one of the workarounds, I’m just wondering if there was any implemented server-side hooks that would fire once the player’s ents are loaded.

Not any built in. Just when the entity is created server side, which is well before the client is ready obviously.

EDIT: I just thought about PlayerLoadout. Maybe that would work even though it is called pretty late.