Advertisement
Friks12829

event

Jul 15th, 2022 (edited)
131,731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. local zones = {
  2. {pos1 = Vector(-7429.713379, 9201.883789, 7166.239746), pos2 = Vector(-6901.860840, 9936.961914, 6883.878906)},
  3. {pos1 = Vector(5514.738770, 4102.645020, 7867.975586), pos2 = Vector(6351.300293, 3320.909424, 7451.149414)},
  4. {pos1 = Vector(4204.395508, -5549.744141, 7393.341309), pos2 = Vector(4615.758301, -5994.053223, 7232.645996)},
  5. {pos1 = Vector(-10222.4, -17206.1, 9970), pos2 = Vector(-15650.8, -12684.4, 7156.2)},
  6. {pos1 = Vector(-9353.3, -2730.4, 7549.7), pos2 = Vector(-8726, -2121.9, 7266)}
  7. }
  8.  
  9. concommand.Add("starteventchecker", function()
  10. timer.Create("sam_jailtimer", 8, 0, function()
  11. if (GetGlobalFloat("dc_event", -1) == -1) then timer.Remove("sam_jailtimer") return end
  12. if not LocalPlayer():Alive() then return end
  13.  
  14. local lpPos = LocalPlayer():GetPos()
  15. local isInBunker = false
  16. for k, v in pairs(zones) do
  17. if lpPos:WithinAABox(v.pos1, v.pos2) then
  18. isInBunker = true
  19. break
  20. end
  21. end
  22.  
  23. if not isInBunker then
  24. netstream.Start("dc_notbunker")
  25. end
  26. end)
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement