
   /*********************************************************************
   *********
   *   Server-Side   Buy   Script   (Version   2.2)   -   AMX   Mod   9.3
   Plugin                   *
   * (c) Copyright 2002-2003, JudicatorOmega
   (JudicatorOmega@hotmail.com)        *
   *
           *
   *  A  Counter-Strike  buy script that works from the server instead of
   using the *
   *  classic  scripting method or hack programs. This means that anybody
   can use  *
   * this buy script as long as they are playing in your server. The best
   reason *
   *  to use this buy script is because the buy menu will close instantly
   when it *
   *  it  comes  up. This should prevent you from having to close it when
   you have  *
   * a bad internet connection or a high
   ping.                                   *
   *
           *
   * Client
   Commands:                                                            *
   *  buy_usp
           *
   *  buy_glock18
           *
   *  buy_deagle
           *
   *  buy_p228
           *
   *  buy_elite
           *
   *  buy_fiveseven
           *
   *  buy_teampistol
           *
   *  buy_m3
           *
   *  buy_xm1014
           *
   *  buy_mp5navy
           *
   *  buy_tmp
           *
   *  buy_p90
           *
   *  buy_mac10
           *
   *  buy_ump45
           *
   *  buy_teamsmg
           *
   *  buy_ak47
           *
   *  buy_sg552
           *
   *  buy_m4a1
           *
   *  buy_aug
           *
   *  buy_lightrifle
           *
   *  buy_heavyrifle
           *
   *  buy_scout
           *
   *  buy_scout+
           *
   *  buy_awp
           *
   *  buy_awp+
           *
   *  buy_g3sg1
           *
   *  buy_sg550
           *
   *  buy_teamsniper
           *
   *  buy_m249
           *
   *  primaryammo
           *
   *  secondaryammo
           *
   *  buy_kevlar
           *
   *  buy_kevlar&helmet
           *
   *  buy_flashbang
           *
   *  buy_hegrenade
           *
   *  buy_smokegrenade
           *
   *  buy_defusekit
           *
   *  buy_nightvision
           *
   *
           *
   * Version
   History:                                                            *
   *  v2.2
           *
   *   -  Added  "buy_scout+" & "buy_awp+" commands. They buy a scout/awp
   and also *
   *     buy  a  deagle.  Thanks  to  my brother for suggesting this good
   idea.       *
   *   -  Fixed  the  "Client Commands" list above. It now shows the most
   important *
   *     commands such as "buy_lightrifle" &
   "buy_heavyrifle".                   *
   *   -  Added  many  new alternate commands, they are not listed above,
   but they  *
   *     might  be  used by people who are just guessing the command. For
   example, *
   *     the  official  command  is  "buy_mp5navy", but you can still use
   "buy_mp5". *
   *   -  New  default  command  names  for  the  HEGrenade, FlashBang, &
   SmokeGrenade, *
   *     and  Defuse  Kit.  However  the  old  command names may still be
   used.        *
   *  v2.0
           *
   *   -  Complete  plugin  re-write. This is outstanding compared to the
   old one!  *
   *     Not    a    single    thing   is   taken   from   the   original
   plugin.                   *
   *  v1.0
           *
   *   -     First     version.     Written     mostly    by    Spacedude
   (eayumns@nottingham.ac.uk)   *
   **********************************************************************
   ********/
   /*********************************************************************
   *********
   *   Includes & General
   Stuff                                                  *
   **********************************************************************
   ********/
   #include <amxmod>
   /*********************************************************************
   *********
   *   Plugin Initiation &
   Precache                                              *
   **********************************************************************
   ********/
   public plugin_init()
   {
       register_plugin("Server-Side Buy Script","2.00","JudicatorOmega")
       register_clcmd("buy_usp","buy_usp")
       register_clcmd("buy_glock18","buy_glock18")
       register_clcmd("buy_glock","buy_glock18")
       register_clcmd("buy_deagle","buy_deagle")
       register_clcmd("buy_p228","buy_p228")
       register_clcmd("buy_elite","buy_elite")
       register_clcmd("buy_elites","buy_elite")
       register_clcmd("buy_dual","buy_elite")
       register_clcmd("buy_dualies","buy_elite")
       register_clcmd("buy_fiveseven","buy_fiveseven")
       register_clcmd("buy_teampistol","buy_teampistol")
       register_clcmd("buy_m3","buy_m3")
       register_clcmd("buy_xm1014","buy_xm1014")
       register_clcmd("buy_mp5navy","buy_mp5navy")
       register_clcmd("buy_mp5","buy_mp5navy")
       register_clcmd("buy_tmp","buy_tmp")
       register_clcmd("buy_p90","buy_p90")
       register_clcmd("buy_mac10","buy_mac10")
       register_clcmd("buy_ump45","buy_ump45")
       register_clcmd("buy_teamsmg","buy_teamsmg")
       register_clcmd("buy_ak47","buy_ak47")
       register_clcmd("buy_ak","buy_ak47")
       register_clcmd("buy_sg552","buy_sg552")
       register_clcmd("buy_m4a1","buy_m4a1")
       register_clcmd("buy_m4","buy_m4a1")
       register_clcmd("buy_colt","buy_m4a1")
       register_clcmd("buy_aug","buy_aug")
       register_clcmd("buy_lightrifle","buy_lightrifle")
       register_clcmd("buy_lrifle","buy_lightrifle")
       register_clcmd("buy_heavyrifle","buy_heavyrifle")
       register_clcmd("buy_hrifle","buy_heavyrifle")
       register_clcmd("buy_scout","buy_scout")
       register_clcmd("buy_scout+","buy_scoutdeagle")
       register_clcmd("buy_awp","buy_awp")
       register_clcmd("buy_awp+","buy_awpdeagle")
       register_clcmd("buy_g3sg1","buy_g3sg1")
       register_clcmd("buy_sg550","buy_sg550")
       register_clcmd("buy_m249","buy_m249")
       register_clcmd("buy_primaryammo","buy_primaryammo")
       register_clcmd("primaryammo","buy_primaryammo")
       register_clcmd("priammo","buy_primaryammo")
       register_clcmd("buy_secondaryammo","buy_secondaryammo")
       register_clcmd("secondaryammo","buy_secondaryammo")
       register_clcmd("secammo","buy_secondaryammo")
       register_clcmd("buy_kevlar","buy_kevlar")
       register_clcmd("buy_kev","buy_kevlar")
       register_clcmd("buy_armor","buy_kevlar")
       register_clcmd("buy_kevlar&helmet","buy_kevhelm")
       register_clcmd("buy_kev&helm","buy_kevhelm")
       register_clcmd("buy_kevhelm","buy_kevhelm")
       register_clcmd("buy_armor&helmet","buy_kevhelm")
       register_clcmd("buy_armor&helm","buy_kevhelm")
       register_clcmd("buy_flashbang","buy_flashbang")
       register_clcmd("buy_flash","buy_flashbang")
       register_clcmd("buy_hegrenade","buy_hegrenade")
       register_clcmd("buy_he","buy_hegrenade")
       register_clcmd("buy_smokegrenade","buy_smokegrenade")
       register_clcmd("buy_smoke","buy_smokegrenade")
       register_clcmd("buy_defusekit","buy_defusekit")
       register_clcmd("buy_kit","buy_defusekit")
       register_clcmd("buy_nightvision","buy_nightvision")
       register_clcmd("buy_nv","buy_nightvision")
       return PLUGIN_CONTINUE
   }
   /*********************************************************************
   *********
   *   Plugin Commands &
   Functions                                               *
   **********************************************************************
   ********/
   public buy_usp(id)
   {
       if (get_user_money(id) < 500)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","1")
       engclient_cmd(id,"menuselect","1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo2")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_glock18(id)
   {
       if (get_user_money(id) < 400)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","1")
       engclient_cmd(id,"menuselect","2")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_deagle(id)
   {
       if (get_user_money(id) < 650)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","1")
       engclient_cmd(id,"menuselect","3")
       if (get_user_money(id) >= 40) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 40) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 40) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 40) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 40) engclient_cmd(id,"buyammo2")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_p228(id)
   {
       if (get_user_money(id) < 600)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","1")
       engclient_cmd(id,"menuselect","4")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_elite(id)
   {
       if (get_user_team(id) == 2)
       {
           client_print(id,print_chat,"[AMX]  Counter-Terrorists  are not
   allowed to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 1000)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","1")
       engclient_cmd(id,"menuselect","5")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_fiveseven(id)
   {
       if (get_user_team(id) == 1)
       {
           client_print(id,print_chat,"[AMX]  Terrorists  are not allowed
   to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 750)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","1")
       engclient_cmd(id,"menuselect","6")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_teampistol(id)
   {
       if (get_user_team(id) == 1) if (get_user_money(id) < 1000)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       if (get_user_team(id) == 2) if (get_user_money(id) < 750)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","1")
       if (get_user_team(id) == 1)
       {
           engclient_cmd(id,"menuselect","5")
           if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
           if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
           if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo2")
       }
       if (get_user_team(id) == 2)
       {
           engclient_cmd(id,"menuselect","6")
           if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
           if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo2")
       }
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_m3(id)
   {
       if (get_user_money(id) < 1700)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","2")
       engclient_cmd(id,"menuselect","1")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_xm1014(id)
   {
       if (get_user_money(id) < 3000)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","2")
       engclient_cmd(id,"menuselect","2")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 65) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_mp5navy(id)
   {
       if (get_user_money(id) < 1500)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","3")
       engclient_cmd(id,"menuselect","1")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_tmp(id)
   {
       if (get_user_team(id) == 1)
       {
           client_print(id,print_chat,"[AMX]  Terrorists  are not allowed
   to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 1250)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","3")
       engclient_cmd(id,"menuselect","2")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_p90(id)
   {
       if (get_user_money(id) < 2350)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","3")
       engclient_cmd(id,"menuselect","3")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 50) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_mac10(id)
   {
       if (get_user_team(id) == 2)
       {
           client_print(id,print_chat,"[AMX]  Counter-Terrorists  are not
   allowed to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 1400)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","3")
       engclient_cmd(id,"menuselect","4")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_ump45(id)
   {
       if (get_user_money(id) < 1700)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","3")
       engclient_cmd(id,"menuselect","5")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_teamsmg(id)
   {
       if (get_user_team(id) == 1) if (get_user_money(id) < 1400)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       if (get_user_team(id) == 2) if (get_user_money(id) < 1250)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","3")
       if (get_user_team(id) == 1)
       {
           engclient_cmd(id,"menuselect","4")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 25) engclient_cmd(id,"buyammo1")
       }
       if (get_user_team(id) == 2)
       {
           engclient_cmd(id,"menuselect","2")
           if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 20) engclient_cmd(id,"buyammo1")
       }
       if (get_user_money(id) >= 650)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_ak47(id)
   {
       if (get_user_team(id) == 2)
       {
           client_print(id,print_chat,"[AMX]  Counter-Terrorists  are not
   allowed to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 2500)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","1")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_sg552(id)
   {
       if (get_user_team(id) == 2)
       {
           client_print(id,print_chat,"[AMX]  Counter-Terrorists  are not
   allowed to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 3500)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","2")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_m4a1(id)
   {
       if (get_user_team(id) == 1)
       {
           client_print(id,print_chat,"[AMX]  Terrorists  are not allowed
   to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 3100)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","3")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_aug(id)
   {
       if (get_user_team(id) == 1)
       {
           client_print(id,print_chat,"[AMX]  Terrorists  are not allowed
   to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 3500)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","4")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_lightrifle(id)
   {
       if (get_user_team(id) == 1) if (get_user_money(id) < 2500)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       if (get_user_team(id) == 2) if (get_user_money(id) < 3100)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       if (get_user_team(id) == 1)
       {
           engclient_cmd(id,"menuselect","1")
           if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       }
       if (get_user_team(id) == 2)
       {
           engclient_cmd(id,"menuselect","3")
           if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       }
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_heavyrifle(id)
   {
       if (get_user_money(id) < 3500)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       if (get_user_team(id) == 1) engclient_cmd(id,"menuselect","2")
       if (get_user_team(id) == 2) engclient_cmd(id,"menuselect","4")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_scout(id)
   {
       if (get_user_money(id) < 2750)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","5")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_scoutdeagle(id)
   {
       if (get_user_money(id) < 2750)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","5")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650) if (get_user_money(id) < 1500)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       if (get_user_money(id) >= 1500)
       {
           engclient_cmd(id,"buy")
           engclient_cmd(id,"menuselect","1")
           engclient_cmd(id,"menuselect","3")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           if (get_user_money(id) < 1850)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1850)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_awp(id)
   {
       if (get_user_money(id) < 4750)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","6")
       if (get_user_money(id) >= 125) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_awpdeagle(id)
   {
       if (get_user_money(id) < 4750)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","6")
       if (get_user_money(id) >= 125) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650) if (get_user_money(id) < 1500)
       {
           engclient_cmd(id,"buyequip")
           engclient_cmd(id,"menuselect","1")
       }
       if (get_user_money(id) >= 1500)
       {
           engclient_cmd(id,"buy")
           engclient_cmd(id,"menuselect","1")
           engclient_cmd(id,"menuselect","3")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           engclient_cmd(id,"buyammo2")
           if (get_user_money(id) < 1850)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1850)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_g3sg1(id)
   {
       if (get_user_team(id) == 2)
       {
           client_print(id,print_chat,"[AMX]  Counter-Terrorists  are not
   allowed to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 5000)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","7")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_sg550(id)
   {
       if (get_user_team(id) == 1)
       {
           client_print(id,print_chat,"[AMX]  Terrorists  are not allowed
   to buy this")
           return PLUGIN_HANDLED
       }
       if (get_user_money(id) < 4200)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       engclient_cmd(id,"menuselect","8")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_teamsniper(id)
   {
       if (get_user_team(id) == 1) if (get_user_money(id) < 5000)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       if (get_user_team(id) == 2) if (get_user_money(id) < 4200)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","4")
       if (get_user_team(id) == 1)
       {
           engclient_cmd(id,"menuselect","7")
           if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 80) engclient_cmd(id,"buyammo1")
       }
       if (get_user_team(id) == 2)
       {
           engclient_cmd(id,"menuselect","8")
           if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
           if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       }
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_m249(id)
   {
       if (get_user_money(id) < 5750)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","5")
       engclient_cmd(id,"menuselect","1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 60) engclient_cmd(id,"buyammo1")
       if (get_user_money(id) >= 650)
       {
           if (get_user_money(id) < 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","1")
           }
           if (get_user_money(id) >= 1000)
           {
               engclient_cmd(id,"buyequip")
               engclient_cmd(id,"menuselect","2")
           }
       }
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_primaryammo(id)
   {
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","6")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_secondaryammo(id)
   {
       engclient_cmd(id,"buy")
       engclient_cmd(id,"menuselect","7")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_kevlar(id)
   {
       if (get_user_money(id) < 650)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buyequip")
       engclient_cmd(id,"menuselect","1")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_kevhelm(id)
   {
       if (get_user_money(id) < 1000)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buyequip")
       engclient_cmd(id,"menuselect","2")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_flashbang(id)
   {
       if (get_user_money(id) < 200)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buyequip")
       engclient_cmd(id,"menuselect","3")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_hegrenade(id)
   {
       if (get_user_money(id) < 300)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buyequip")
       engclient_cmd(id,"menuselect","4")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_smokegrenade(id)
   {
       if (get_user_money(id) < 300)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buyequip")
       engclient_cmd(id,"menuselect","5")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_defusekit(id)
   {
       if (get_user_money(id) < 200)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buyequip")
       engclient_cmd(id,"menuselect","6")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
   public buy_nightvision(id)
   {
       if (get_user_money(id) < 1250)
       {
           client_print(id,print_chat,"[AMX]   You  do  not  have  enough
   money")
           return PLUGIN_HANDLED
       }
       engclient_cmd(id,"buyequip")
       engclient_cmd(id,"menuselect","7")
       client_cmd(id,"slot10")
       return PLUGIN_HANDLED
   }
