
   /* AMX Mod script.
   *
   * (c) Copyright 2002, versus666
   * This file is provided as is (no warranties).
   *
   */
   #include <amxmod>
   /* cvar:
   *  set max. frequency of chating
   *  amx_flood_time < time in sec. >
   */
   new  floodsounds[5][]  = {"scientist/beenaburden", "scientist/repeat",
                      "scientist/shutup2",            "scientist/shutup",
   "scientist/announcer"};
   new Float:flooding[33]
   public check_flooding(id){
       new Float:max_chat = get_cvar_float("amx_flood_time")
       if (max_chat){
           new Float:ntime = get_gametime()
           if (flooding[id] > ntime) {
               client_print(id,print_notify,"**  Arretez  de  flooder  le
   serveur !! **")
               client_cmd(id, "spk %s", floodsounds[random_num(1,5)]);
               flooding[id] = ntime + max_chat * 5.0
               return PLUGIN_HANDLED
           }
           flooding[id] = ntime + max_chat
       }
       return PLUGIN_CONTINUE
   }
   public plugin_init() {
       register_plugin("Anti Flood with sound","0.8","default")
       register_clcmd("say","check_flooding")
       register_clcmd("say_team","check_flooding")
       register_cvar("amx_flood_time","0.75")
       return PLUGIN_CONTINUE
   }
