Raised This Month: $ Target: $400
 0% 

show_country_connect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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