
   /* AMX Mod Script
   *
   * Neobind
   *
   * 2003 - Lazy <the_lazy_one_09@hotmail.com>
   *
   *  Allows  admins to bind NeoTF keys to a client, or the client can do
   it themselves
   *
   * New Admin Commands: amx_neobind <target>
   * New Client Commands: neobindme, say !neobindme
   *
   *  Notes:  This  plugin  assigns  the  following  binds on the client,
   however, a warning message
   * is displayed to them that they must accept to continue.
   *
   * p        _special2
   * \        buildspecial2
   * l        +hook
   * k        buildspecial
   * o        detspecial
   * v        tele
   *
   * Bind keys taken from the AdminMod NeoBind plugin
   */
   #include <amxmod>
   #include <amxmisc>
   public plugin_init( )
   {
       register_plugin( "NeoBind", "1.0", "Lazy" )

       register_concmd(  "amx_neobind", "ADMINCMD_NEOBIND", ADMIN_LEVEL_F
   )

       register_clcmd( "neobindme", "CL_NEOBIND", 0, "" )
       register_clcmd( "say", "HandleSay", 0, "" )

       register_menucmd(  register_menuid(  "Bind  NeoTF  Keys?" ), 1023,
   "getkeys" )

       return PLUGIN_CONTINUE
   }
   public UTIL_ShowBind( id )
   {
       new Text[ 512 ]
       format(  Text,  512,  "The  following keys have been bound to your
   keyboard...^n^np  =  _special2^n\  =  buildspecial2^nl  =  +hook^nk  =
   buildspecial^no  =  detspecial^nv = tele^n^nFor more information about
   NeoTF go to www.planetneotf.com" )

       show_motd( id, Text, "NeoTF Keys" )

       return PLUGIN_HANDLED
   }
   public UTIL_Menu( id )
   {
       new MenuBody[ 256 ]
       format(  MenuBody,  256,  "Bind NeoTF Keys?^n-----------^nThe keys
   p  \  l  k  o  v^nare  about  to be bound to^nyour keyboard, if you do
   not agree^npress 2 now.^n^n1. Agree^n2. Disagree" )

       show_menu( id, ( 1 << 0 ) | ( 1 << 1 ), MenuBody )

       return PLUGIN_HANDLED
   }
   public getkeys( id, key )
   {
       if ( key == 0 )
       {
           client_cmd( id, "bind p _special2" )
           client_cmd( id, "bind \ buildspecial2" )
           client_cmd( id, "bind l +hook " )
           client_cmd( id, "bind k buildspecial" )
           client_cmd( id, "bind o detspecial" )
           client_cmd( id, "bind v tele" )

           UTIL_ShowBind( id )
       }

       return PLUGIN_HANDLED
   }
   public ADMINCMD_NEOBIND( id, level, cid )
   {
       new arg[ 32 ]

       if ( ! cmd_access( id, level, cid, 2 ) )
       {
           return PLUGIN_HANDLED
       }

       read_argv( 1, arg, 32 )

       new pID = cmd_target( id, arg, 8 )

       if ( ! pID ) { return PLUGIN_HANDLED; }

       UTIL_Menu( pID )

       return PLUGIN_HANDLED
   }
   public CL_NEOBIND( id )
   {
       UTIL_Menu( id )

       return PLUGIN_HANDLED
   }
   public HandleSay( id )
   {
       new arg[ 256 ]

       read_args( arg, 256 )
       remove_quotes( arg )

       if ( equali( arg, "!neobindme" ) )
       {
           UTIL_Menu( id )
       }

       return PLUGIN_CONTINUE
   }
