
   /* AMX Mod script.
   *
   * Teleport players
   *  by JustinHoMi (justin@justinmitchell.net)
   *  email: justin@justinmitchell.net
   *  web: www.modkillers.com
   *  irc: #modkillers (irc.gamesnet.net
   *
   * Usage: use admin_myorigin to store your origin
   *        and  admin_teleport  <authid, nick or #userid> will send them
   to the stored coords
   *
   */
   #include <amxmod>
   #include <amxmisc>
   new g_playerOrigin[33][3]
   new logfilename[256]
   public admin_myorigin(id,level,cid){
       if (!cmd_access(id,level,cid,1))
           return PLUGIN_HANDLED
       get_user_origin(id,g_playerOrigin[id])
       console_print(id,"Your  coords are x: %i y: %i z: %i and have been
   saved",
           g_playerOrigin[id][0],g_playerOrigin[id][1],g_playerOrigin[id]
   [2])
       return PLUGIN_HANDLED
   }
   public admin_teleport(id,level,cid){
       if (!cmd_access(id,level,cid,1))
           return PLUGIN_HANDLED
       new arg[32]
       read_argv(1,arg,31)
       new player = cmd_target(id,arg,5)
       if (!player) return PLUGIN_HANDLED
       set_user_origin(player,g_playerOrigin[id])
       new authid[16],name2[32],authid2[16],name[32]
       get_user_authid(id,authid,15)
       get_user_name(id,name,31)
       get_user_authid(player,authid2,15)
       get_user_name(player,name2,31)
       log_to_file(logfilename,"Cmd:       ^"%s<%d><%s><>^"      teleport
   ^"%s<%d><%s><>^"",
           name,get_user_userid(id),authid,
   name2,get_user_userid(player),authid2 )
       switch(get_cvar_num("amx_show_activity"))    {
       case     2:    client_print(0,print_chat,"ADMIN    %s:    teleport
   %s",name,name2)
       case 1:    client_print(0,print_chat,"ADMIN: teleport %s",name2)
       }
       console_print(id,"Client ^"%s^" teleported",name2)
       return PLUGIN_HANDLED
   }
   public plugin_init() {
       register_plugin("Teleport","0.9.3","JustinHoMi")
       register_clcmd("amx_myorigin","admin_myorigin",ADMIN_SLAY,"-  save
   your current origin for teleport")
       register_clcmd("amx_teleport","admin_teleport",ADMIN_SLAY,"<authid
   , nick or #userid>")
       get_time("addons/amx/logs/admin%m%d.log",logfilename,255)
       return PLUGIN_CONTINUE
   }
