Garry's Mod Wiki

Garry's Mod Wiki

Description

Called when a player spawns.

This is not called clientside for the local player or in single-player.

Members

number userid
The UserID the player has.

Examples

Example

This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "player_spawn" ) hook.Add( "player_spawn", "player_spawn_example", function( data ) local id = data.userid // Same as Player:UserID() // Called when the player spawns initially or respawns. end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...