Thread: geoip functions
View Single Post
Evaldas
Member
Join Date: Jul 2005
Location: Lithuania
Old 05-19-2007 , 18:22   Re: geoip functions
Reply With Quote #3

hmm.., looks like i've found something. Let's say, if I would like to test it. The code should be that?

Code:
#include <sourcemod>
#include <console>
#include <geoip>

public Plugin:myinfo = 
{
	name = "IP Loger",
	author = "Evaldas",
	description = "TEST",
	version = "0.0.0.2",
	url = "http://www.lemita.eu/"
};

public OnClientPutInServer(client) {

	new String:authid[64];
	new String:name[32];
	new String:ipaddr[17];
	new String:country[3];

	GetClientAuthString(client, authid, 63);
	GetClientName(client, name, sizeof(name));
	GetClientIP(client, ipaddr, 16);
	GeoipCode2(ipaddr, country);

	LogToGame(" %s , %d , %s , %s", name, ipaddr, country, authid); 

}
__________________
Evaldas is offline