GetClientIP

Last Updated2013-08-01
Created At2007-02-27

Retrieves a client's IP address.

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

Parameters

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

bool True on success, false otherwise.

Error

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