
   /* AMXMOD script.
   *
   * (c) Copyright 2000-2002, RAV
   * This file is provided as is (no warranties).
   *
   * Changelog
   *
   * Version 1.1 - Initial Build
   * Version 1.2 - Case sensitivity ignored
   * Version 1.3 - Block dead talking to living
   *  Version  1.4 - Removed ADMIN_USER flags & Show Info window added on
   command "say chatinfo"
   * Version 1.5 - Bug Fixes
   *
   * Command ptalk < part of nick > < message >
   */
   #include <amxmod>
   public chat_info(id){
       show_motd(id,"This  plugin  allows  you  to be private message any
   player,  you cannot message players that are still alive^n^nWritten by
   Rav","Private Chat V 1.4")
       return PLUGIN_HANDLED
   }
   public p_talk(id)
   {
      if (read_argc() < 3) {
         client_print(id,print_console,"[AMX] Usage: ptalk < part of nick
   > < message >")
         return PLUGIN_HANDLED
      }
      new text[32],name[32]
      read_args(text,32)
      parse(text,name,32)
      new priv = find_player("bl",name)
      if (priv == 0){
         client_print(id,print_console,"[AMX]  Client  with  that part of
   nick not found")
         return PLUGIN_HANDLED
      }
      if (is_user_alive(priv)==1)    {
         client_print(id,print_console,"[AMX]  %s  is  alive,  you cannot
   talk to him!",priv)
         return PLUGIN_HANDLED
           }
      new length = strlen(name)
      get_user_name(priv,name,32)
      new message[192]
      read_args(message,192)
      new name2[32]
      get_user_name(id,name2,32)
      register_clcmd("say chatinfo","chat_info")
      client_print(id,print_chat,"(%s) %s
   :   %s",name,name2,message[length])
      client_print(priv,print_chat,"(%s):   %s",name2,message[length])
      return PLUGIN_HANDLED
      }
   public plugin_init()
   {
      register_plugin("Private Talk","1.5","Rav")
      register_clcmd("ptalk","p_talk")
      register_clcmd("say chatinfo","chat_info")
      return PLUGIN_CONTINUE

   }
