
   /*
   *  AMX Mod script.
   *
   * (c) Copyright 2003, ST4life
   * This file is provided as is (no warranties).
   */
   #include <amxmod>
   #include <geoip>
   public client_infochanged(id){
       if (is_user_connected(id)){
           new newname[33]
           get_user_info(id,"name",newname,32)
           check_name(id,newname)
       }
       return PLUGIN_CONTINUE
   }
   public check_name(id,username[]){
       new ip[32], country[3], stra[4], strb[33], pruef[5]
       get_user_ip(id,ip,31)
       if(geoip_code2(ip,country)){
           format(stra,4,"[%s]",country)
           parse(username,pruef,4)
           if(!equal(stra,pruef)){
               geoip_code2(ip,country)
               format(strb,32,"[%s]%s",country,username)
               set_user_info(id,"name",strb)
           }
       }
       return PLUGIN_CONTINUE
   }
   public plugin_init(){
       register_plugin("CountryNames","0.1","ST4life")
       return PLUGIN_CONTINUE
   }
