Raised This Month: $ Target: $400
 0% 

Get the Country


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 11-24-2011 , 03:49   Get the Country
Reply With Quote #1

Code:
#include <amxmodx>
#include <geoip>

new name[32]
new authid[32]
new countries[33][46]
new ips[33][30]

public plugin_init()
{
	register_plugin("PLUGIN", "VERSION", "AUTHOR")
}

public client_connect(id)
{
	get_user_name(id, name, 31)
	get_user_authid(id, authid, 31)
	get_user_ip(id, ips[id], charsmax(ips))
	geoip_country(ips[id], countries[id], charsmax(countries))

	new country[46]
			
	copy(country, charsmax(country), countries[id])

	client_print(0, print_chat, "%s (%s)  from %s", name, authid, country)
}
Result:
Player (STEAM_0:0:123456) from error

What should I do?
RuRuRu612754 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode