Raised This Month: $ Target: $400
 0% 

show_country_connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 11-02-2011 , 02:49   show_country_connect
Reply With Quote #1

Wrote the following code to refer to

http://www.amxmodx.org/funcwiki.php?go=func&id=487
http://www.amxmodx.org/funcwiki.php?go=func&id=154

However, it fails to compile

What do I do?

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

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

public client_connect(id)
{
	new name[32]
	new authid[32]
	new ip[]
	new country[]

	get_user_name(id, name, 31)
	get_user_authid(id, authid, 31)
	get_user_ip(id, ip)
	geoip_country(ip[], country)

	client_print(0, print_chat, "%s (%s) has connected to the server from %s", name, authid, country)
}

public client_disconnect(id) 
{
	new name[32]
	new authid[32]
	new ip[]
	new country[]

	get_user_name(id, name, 31)
	get_user_authid(id, authid, 31)
	get_user_ip(id, ip)
	geoip_country(ip[], country)

	client_print(0, print_chat, "%s (%s) has disconnected to the server from %s", name, authid, country)
}
RuRuRu612754 is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 11-02-2011 , 05:28   Re: show_country_connect
Reply With Quote #2

PHP Code:
geoip_country(ipcountry
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 11-02-2011 , 09:15   Re: show_country_connect
Reply With Quote #3

drekes

Thanks for answer

However, the error at compile time

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

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

public client_connect(id)
{
	new name[32]
	new authid[32]
	new ip[]
	new country[]

	get_user_name(id, name, 31)
	get_user_authid(id, authid, 31)
	get_user_ip(id, ip)
	geoip_country(ip, country)

	client_print(0, print_chat, "%s (%s) has connected to the server from %s", name, authid, country)
}

public client_disconnect(id) 
{
	new name[32]
	new authid[32]
	new ip[]
	new country[]

	get_user_name(id, name, 31)
	get_user_authid(id, authid, 31)
	get_user_ip(id, ip)
	geoip_country(ip, country)

	client_print(0, print_chat, "%s (%s) has disconnected to the server from %s", name, authid, country)
}
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 14:19.


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