
   /*
   ======================================================================
   ==========
   AMX Mod Plugin
   http://amxmod.net
   ----------------------------------------------------------------------
   ----------
   Name    : Unlimited Nades
   Author : Freecode <Freecode@hotmail.com>
   ----------------------------------------------------------------------
   ----------
   Unlimited Nades v 2.0
       Created by Freecode
       Unlimited Nades
       ================
       Make a player/Team/all have unlimited nades. That right. You never
       run out of nades.
       USAGE
       =====

       amx_nade <name|@TEAM|*(all)>
       amx_unnade <name|@TEAM|*(all)>

       Releases:
       ========
       2003-10-18    version 1.0:
                     First version
       2003-10-18    version 2.0:
                     Added STEAM support.

       TO DO
       =====
       Nothing :)
   ----------------------------------------------------------------------
   ----------
   Installation :
   - Extract file nade.amx to directory addons/amx/plugins
   - Open addons/amx/plugins/plugins.ini
   - Add a line containing : nade.amx
   ====================================================================
   */
   #include <amxmod>
   #include <amxmisc>
   //-------------------------------------------------------------------
   public givenade(id)
   {
      new arg[32]
      read_argv(1, arg, 31)
      if(arg[0] == '@')
      {
         new users[32], inum
         get_players(users, inum, "ae", arg[1])
         if(inum == 0)
         {
            console_print(id, "No users in such team")
            return PLUGIN_HANDLED
         }
         for(new i = 0; i < inum; ++i)
         {
            new parmt[1]
            parmt[0] = users[i]
            set_task(0.2,"nadet",1,parmt,1,"b")
            console_print(id,"%s  Team  will  get  unlimited  nades  in a
   sec..",arg)
         }
      }
      else if(arg[0] == '*')
      {
         set_task(0.2,"nadeall",2,"",1,"b")
         console_print(id,"Everyone will get unlimited nades in a sec..")
      }
      else
      {
         new uid = cmd_target(id, arg, 5)
         if(!uid) return PLUGIN_HANDLED
         new parm[1]
         parm[0] = uid
         set_task(0.2,"nade",3,parm,1,"b")
         console_print(id,"%s will get unlimited nades in a sec..",arg)
      }
      return PLUGIN_HANDLED
   }
   //-------------------------------------------------------------------
   public unnade(id)
   {
      new arg[32]
      read_argv(1, arg, 31)
      if(arg[0] == '@')
      {
         new users[32], inum
         get_players(users, inum, "ae", arg[1])
         if(inum == 0)
         {
            console_print(id, "No users in such team")
            return PLUGIN_HANDLED
         }
         for(new i = 0; i < inum; ++i)
         {
            remove_task(1,0)
            console_print(id,"%s    Team    stoped    getting   unlimited
   nades.",arg)
         }
      }
      else if(arg[0] == '*')
      {
         remove_task(2,0)
         console_print(id,"Everyone stoped getting unlimited nades.")
      }
      else
      {
         new uid = cmd_target(id, arg, 5)
         if(!uid) return PLUGIN_HANDLED
         remove_task(3,0)
         console_print(id,"%s stoped getting unlimited nades.",arg)
      }
      return PLUGIN_HANDLED
   }
   //-------------------------------------------------------------------
   public nadeall()
   {
      new players[32], inum
      get_players(players,inum)
      for(new a=0;a<inum;++a)
      {
         new wpn[32];
         new num;
         get_user_weapons(players[a],wpn,num)
         for (new i = 0;i < num ;i++)
         {
            if (wpn[i] != CSW_HEGRENADE)
            {
               give_item(players[a],"weapon_hegrenade")
            }
         }
      }
      return PLUGIN_HANDLED;
   }
   //-------------------------------------------------------------------
   public nade(parm[])
   {
      new uid = parm[0]
      new wpn[32]
      new num
      get_user_weapons(uid,wpn,num)
      for (new i = 0;i < num ;i++)
      {
         if (wpn[i] != CSW_HEGRENADE)
         {
            give_item(uid,"weapon_hegrenade")
         }
      }
   }
   //-------------------------------------------------------------------
   public nadet(parmt[])
   {
      new wpn[32]
      new num
      get_user_weapons(parmt[0],wpn,num)
      for (new i = 0;i < num ;i++)
      {
         if (wpn[i] != CSW_HEGRENADE)
         {
            give_item(parmt[0],"weapon_hegrenade")
         }
      }
   }
   //-------------------------------------------------------------------
   public plugin_init()
   {
      register_plugin("Unlimited Nades","2.0","Freecode")
      register_clcmd("amx_nade","givenade",ADMIN_KICK,"<name/@TEAM/*(all)
   >")
      register_clcmd("amx_unnade","unnade",ADMIN_KICK,"<name/@TEAM/*(all)
   >")
   }
