Raised This Month: $ Target: $400
 0% 

Get the Country


Post New Thread Reply   
 
Thread Tools Display Modes
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
Nyuszy
Senior Member
Join Date: Apr 2009
Old 11-27-2011 , 04:00   Re: Get the Country
Reply With Quote #2

where did you tested the plugin?
Nyuszy is offline
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 11-28-2011 , 00:21   Re: Get the Country
Reply With Quote #3

Nyuszy

Is my server.
RuRuRu612754 is offline
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 11-28-2011 , 15:19   Re: Get the Country
Reply With Quote #4

Try compile your plugin with THIS.
__________________


T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 11-28-2011 , 23:54   Re: Get the Country
Reply With Quote #5

T-z3P

Player (STEAM_0:0:123456) from error

Some
Player (STEAM_0:0:123456) from Japan
This normally works

Some
Player (STEAM_0:0:123456) from error
This errer works
RuRuRu612754 is offline
Reply



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