Garry's Mod Wiki

Revision Difference

GM:PlayerAuthed#562823

<function name="PlayerAuthed" parent="GM" type="hook"> <description> Called after the player gets their <page>Player:UniqueID</page> set for the first time. This hook will also be called in singleplayer. See also <page>GM:NetworkIDValidated</page>⤶ ⤶ <bug issue="3026"><page>Global.CurTime</page> returns 0 in this hook.</bug>⤶ Called after the player gets their <page>Player:UniqueID</page> set for the first time. This hook will also be called in singleplayer.⤶ ⤶ See <page>GM:NetworkIDValidated</page> for a hook that is called with the player's SteamID is validated by Steam. </description> <realm>Server</realm> <args> <arg name="ply" type="Player">The player</arg> <arg name="steamid" type="string">The player's SteamID</arg> <arg name="uniqueid" type="string">The player's UniqueID</arg> </args> </function> <example> <code> hook.Add( "PlayerAuthed", "JoinNotification", function( ply, steamid, uniqueid ) print( ply:Name() .. " has been authenticated as " .. steamid .. "." ) end ) </code> <output> ``` Player1 has been authenticated as STEAM_0:1:12345678. ``` </output> </example>