parse("mp_wpndmg scout 60")
parse("mp_wpndmg claw 40")
parse("mp_deathdrop 0")
parse("sv_gm 5")
parse("sv_fow 1")
parse("mp_infammo 0")
parse("mp_wpndmg sg550 40")

addhook("spawn", "nachtderuntoten")
function nachtderuntoten(id)
if player(id,"team") == 1 then
parse("speedmod "..id.." -5")
elseif player(id,"team") == 2 then
parse("setmaxhealth "..id.." 100")
parse("setmoney "..id.." 0")
end
end

addhook("second","healsystem")
function healsystem()
for id=1,32 do
if player(id,"exists") then
parse("sethealth "..id.." "..player(id,"health")+10)
end
end
end

addhook("minute","zombieadd")
function zombieadd()
parse("bot_add_t")
end

addhook("endround","botkick")
function botkick()
parse("bot_remove_all")
end

addhook("startround","antifreeze")
function antifreeze()
parse("bot_freeze 0")
end

addhook("use","gunbuy")
function gunbuy(id,event,data,x,y)
     if (x == 17 and y == 11) then
          menu(id,"M1A1 Carbine Menu,Buy|500 Pts.")
     elseif (x == 25 and y == 8) then
          menu(id,"Kar98k Menu,Buy|200 Pts.")
     elseif (x == 49 and y == 26) then
          menu(id,"Thompson Menu,Buy|1200 Pts.")
     elseif (x == 41 and y == 29) then
          menu(id,"Trench gun Menu,Buy|1500 Pts.")
     elseif (x == 35 and y == 13) then
          if (player(id,"money")>999) then
               parse("setmoney "..id.." "..(player(id,"money") - 1000))
               parse("trigger a2")
          end
     elseif (x == 38 and y == 9) then
          if (player(id,"money")>2999) then
               parse("setmoney "..id.." "..(player(id,"money") - 3000))
               local c=math.random(1,13)
               if c==1 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 22")
               elseif c==2 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 22")
               elseif c==3 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 20")
               elseif c==4 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 20")
               elseif c==5 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 20")
               elseif c==6 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 10")
               elseif c==7 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 10")
               elseif c==8 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 31")
               elseif c==9 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 31")
               elseif c==10 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 47")
               elseif c==11 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 46")
               elseif c==12 then
                    parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
                    parse("equip "..id.." 40")
               elseif c==13 then
                    parse("equip "..id.." 54")
               end
          end
     elseif (x == 45 and y == 8) then
          menu(id,"Ammo menu,Buy ammo|200 Pts.")
     end
end

addhook("menu","gunbuymenu")
function gunbuymenu(id,title,key)
if (title == "M1A1 Carbine Menu") then
if (key == 1) then
local money = player(id,"money")
if money>499 then
parse("setmoney "..id.." "..(player(id,"money") - 500))
parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
parse("equip "..id.." 37")
end
end
end

if (title == "Kar98k Menu") then
if (key == 1) then
local money = player(id,"money")
if money>199 then
parse("setmoney "..id.." "..(player(id,"money") - 200))
parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
parse("equip "..id.." 34")
end
end
end

if (title == "Thompson Menu") then
if (key == 1) then
local money = player(id,"money")
if money>1199 then
parse("setmoney "..id.." "..(player(id,"money") - 1200))
parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
parse("equip "..id.." 30")
end
end
end

if (title == "Trench gun Menu") then
if (key == 1) then
local money = player(id,"money")
if money>1499 then
parse("setmoney "..id.." "..(player(id,"money") - 1500))
parse("weapon m3; drop; weapon mp5; drop; weapon scout; drop; weapon sg550; drop; weapon ak47; drop; weapon sg552; drop; weapon rpg; drop; weapon flamethrower; drop; weapon m249; drop; weapon p90; drop")
parse("equip "..id.." 10")
end
end
end

if (title == "Ammo menu") then
if (key == 1) then
local money = player(id,"money")
if money>199 then
parse("setmoney "..id.." "..(player(id,"money") - 200))
parse("equip "..id.." 61")
parse("equip "..id.." 62")
end
end
end
end

addhook("kill","no_money")
function no_money(id)
parse("setmoney "..id.." "..(player(id,"money")-200))
end