//Thanks to Spectrum for this small script


//So you can't cheat others in the arena
addHook("ThinkFrame", do
  if gamemap == 377 then
    for p in players.iterate
      if p.mo and p.mo.valid 
        if p.mo.x >= -13060*FRACUNIT and p.mo.x <= -8956*FRACUNIT and p.mo.y >= 11004*FRACUNIT and p.mo.y <= 15108*FRACUNIT and p.pflags & PF_GODMODE
          p.pflags = $1 & ~PF_GODMODE
          CONS_Printf(p, "God Mode is disabled in the arena.")
        elseif p.mo.x >= 13888*FRACUNIT and p.mo.x <= 15904*FRACUNIT and p.mo.y >= 15584*FRACUNIT and p.mo.y <= 17184*FRACUNIT and p.pflags & PF_GODMODE
          p.pflags = $1 & ~PF_GODMODE
          CONS_Printf(p, "A higher power disabled God Mode.")
        elseif p.mo.x >= 5563*FRACUNIT and p.mo.x <= 5675*FRACUNIT and p.mo.y >= -4896*FRACUNIT and p.mo.y <= -4816*FRACUNIT and p.pflags & PF_GODMODE
          p.pflags = $1 & ~PF_GODMODE
          CONS_Printf(p, "The button doesnt like god mode.")
        end
      end
    end
  end
end)


//Reset the score per game for shooting range
addHook("ThinkFrame", do
  if gamemap == 416 then
    for p in players.iterate
      if p.mo and p.mo.valid 
        if p.mo.x >= 5512*FRACUNIT and p.mo.x <= 5544*FRACUNIT and p.mo.y >= 11312*FRACUNIT and p.mo.y <= 11344*FRACUNIT
          p.score = 0
        end
      end
    end
  end
end)