
   /* AMX Mod script.
   *
   * WonID Logger Plugin
   *  by |SNap|
   *
   * Based on Lastname plugin
   *  by JustinHoMi
   */
   #include <amxmod>
   new logdir[32] = "wonid"
   public client_connect(id){
       new authid[17],name[33]
       get_user_authid(id,authid,16)
       get_user_name(id,name,32)
       new logfile[64]
       format(logfile,255,"%s/%s",logdir,authid);
       write_file(logfile,name,-1);
       return PLUGIN_CONTINUE
   }
   public client_infochanged(id){
       if (is_user_connected(id)){
           new newname[33], oldname[33]
           get_user_info(id, "name", newname,32)
           get_user_name(id,oldname,32)
           if (!equal(oldname,newname)){
               new authid[17]
               get_user_authid(id,authid,16)
               new logfile[64]
               format(logfile,255,"%s/%s",logdir,authid);
               write_file(logfile,newname,-1);
            }
       }
       return PLUGIN_CONTINUE
   }
   public plugin_init(){
       register_plugin("WonID Logger","0.9.2","|SNap|")
       return PLUGIN_CONTINUE
   }
