
   /*
   * AMX MOD SCRIPT
   *
   * Zoom Detection v2.1 - Made By Calzinger (Idea: Dygear)
   *  This file is provided as is (no warranties).
   *
   * CVARs:
   *  cal_zoom 2/1/0
   *    2 = Announce with playername.
   *    1 = Announce without playername.
   *    0 = DO not announce.
   *
   * Changelog:
   *
   *  v2.1 -
   *    [FIXED] No longer will anounce a dead player.
   *  v2.0 -
   *    [ADDED] Announces playername customized through CVAR.
   *  v1.0 -
   *    [BUILD]
   *
   */
   #include <amxmod>
   #include <amxmisc>
   public zoomed_in(id) {
      if ( is_user_alive(id) ) {
         if (get_cvar_num("cal_zoom") == 2) {
            new name[32]
            get_user_name(id,name,31)
            set_hudmessage(222,  70,0,  -1.0, 0.4, 1, 2.0, 1.0, 1.0, 1.0,
   8)
            show_hudmessage(0,"Warning: %s has zoomed in.",name)
         }
         else if (get_cvar_num("cal_zoom") == 1) {
            set_hudmessage(222,  70,0,  -1.0, 0.4, 1, 2.0, 1.0, 1.0, 1.0,
   8)
            show_hudmessage(0,"Warning: A user has zoomed in.")
         }
      }
      return   PLUGIN_CONTINUE
   }
   public plugin_init() {
      register_plugin("Zoom Detection Plugin","2.1","Calzinger")
      register_event("SetFOV","zoomed_in","b","1<90")
      register_cvar("cal_zoom","1")
      return   PLUGIN_CONTINUE
   }
