Personal tools

Lua/Server/Player/Functions/GetIP

From JC2-MP Documentation

< Lua‎ | Server‎ | Player
Jump to: navigation, search

Returns    string
Prototype    Player:GetIP()
Description    Returns the IP address of the player.


Example

function PlayerJoin(args)
	local ip = args.player:GetIP()
	Chat:Broadcast(args.player:GetName().." joined, their IP is "..ip, Color(255, 255, 255))
end
 
Events:Subscribe("PlayerJoin", PlayerJoin)