GetClientIP Function

Retrieves a client's IP address.

bool GetClientIP(int client, char[] ip, int maxlen, bool remport)


int client

Player index.

char[] ip

Buffer to store the client's ip address.

int maxlen

Maximum length of string buffer (includes NULL terminator).

bool remport

Remove client's port from the ip string (true by default).

Return Value

True on success, false otherwise.


If the client is not connected or the index is invalid.