Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

A hook like `NetworkIDValidated` that passes the player object #2490

Open wrefgtzweve opened 1 month ago

wrefgtzweve commented 1 month ago

Currently PlayerAuthed sorta does this job however, by the time the hook runs the player hasn't been validated by steam and could thus lead to issues. Having hook that fires when a player is authed by steam and has a valid player object would be great for having a reliable "ready" hook. A good usecase would be in adminmods which currently use PlayerAuthed which could be a vurnability. It'd be nice to also still run for bots for consistency so it could be used as a more "universal" player ready hook.

Srlion commented 1 month ago

Gonna drop this here incase someone passes by https://gist.github.com/Srlion/ab4a0c6c41e0684c4bf6d2ae007c992f If someone could modify it to be used globally as this is just taken from my addon