*EDIT* I know there are a lot of plugins that do similar things, but I decided to write my own because I disliked many of the current ones. Also, it helps me learn small

.
Still learning, but I'm working on code to detect, then display a users country based on say input from a user. It is just for fun, but I would like to get it functioning.
For example: A user types '/country playername' in all chat, then I want it to display the user country to everyone. I guess I'm still retarded cause I can't get it to work

.
Code:
#include <amxmodx>
#include <amxmisc>
#include <geoip>
public plugin_init() {
register_plugin("Show Country","1.0","eXist`")
register_clcmd("say /country","showCountry",0,"Shows a users Country")
}
public showCountry(id) {
//Checks for flags m or s :: I know its weird, don't ask :D.
if((get_user_flags(id) & ADMIN_LEVEL_A) || (get_user_flags(id) & ADMIN_LEVEL_G)){
new args[128], name[33], target, userip[17], usercountry[46], msg[128]
read_argv(2,args,127)
target = cmd_target(id,args,2)
get_user_name(target,name,32)
get_user_ip(target,userip,16,1)
geoip_country(userip,usercountry,45)
set_hudmessage(255,255,255,-1.0,0.35,0,6.0,12.0,0.1,0.2,4)
format(msg,127,"%s is from %s",name,usercountry)
show_hudmessage(0,msg)
}
}