Garry's Mod Wiki

Revision Difference

GM:PlayerAuthed#553128

<function name="PlayerAuthed" parent="GM" type="hook"> <ishook>yes</ishook>⤶ <description> Called after the player is authenticated by Steam. 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> </description> <realm>Server</realm> <predicted>No</predicted>⤶ <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>