Gamemode.PlayerConnect

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePlayerConnect
SyntaxGM:PlayerConnect( String name, String address )
DescriptionCalled whenever a player connects.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerConnect]Gamemode.PlayerConnect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionAlerts when a player joins
Used onNewerShared.png
Code
function GM:PlayerConnect( name, address ) 
    print( "Player " .. name .. " has joined from ip " .. address )
end 
Outputa message is printed to the console when a player joins with that player's information.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox