Gamemode.PlayerConnect

From GMod Wiki

Revision as of 03:20, 21 April 2011 by NightExcessive (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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