Raised This Month: $ Target: $400
 0% 

show country chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 12-02-2011 , 22:23   show country chat
Reply With Quote #1

Hi.

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

new countries[33][46]
new ips[33][30]

public plugin_init()
{
	register_clcmd("say", "cmdSay")
}

public client_connect(id)
{
	get_user_ip(id, ips[id], charsmax(ips))
	geoip_country(ips[id], countries[id], charsmax(countries))
}

public cmdSay(id)
{
	new message2[200]
	read_args(message2, charsmax(message2))
		
	new name[32]
	get_user_name(id, name, 31)

	new country[46]
	copy(country, charsmax(country), countries[id])
			
	client_print(0, print_chat, "[%s] %s : %s", country, name, message2[1])
}
The result is like this.

[Japan] Player : Hello
Player : Hello

The original chat "Player : Hello" Please tell me how to delete the

Last edited by RuRuRu612754; 12-02-2011 at 22:23.
RuRuRu612754 is offline
 


Thread Tools
Display Modes

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:30.


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