Garry's Mod Wiki

Player:IPAddress

  string Player:IPAddress()

Description

Returns the player's IP address and connection port in ip:port form

Returns Error! for bots.

Returns

1 string ip
The player's IP address and connection port

Example

Prints the player's IP and port

Output: 192.168.1.101:27005