GetPlayerAddress

From GT-MP
Jump to: navigation, search
GetPlayerAddress
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

This function returns the IP address of the given player.


Syntax

API.getPlayerAddress(Client player);

Required Arguments

  • player: parameter input should be in Client type.

NOTE: This function returns data in string type.

Usage example(s)

/myip command which tells your IP address:

[Command("myip")]
public void CMD_IP(Client player)
{
    API.sendChatMessageToPlayer(player, "Your IP is: " + API.getPlayerAddress(player));
}

References