GM:PlayerConnect

From Garry's Mod
Jump to: navigation, search
 GM:PlayerConnect( )

Contents

Description

Executes when a player connects to the server.

Arguments

string name

Players name

Arguments

string ip

Players IP Address

Examples

Example

prints a message to the chatbox when a player joins the game

function GM:PlayerConnect( name, ip )
	PrintMessage( HUD_PRINTTALK, name .. " has joined the game." )
end

Output:

if a person with the name "Garry :D" joins the game, a message in the chatbox will say "Garry :D has joined the game."
Personal tools
Navigation