Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ArrestZone =
- {
- Pos = Vector(3843.774170, -1164.535889, -11.999580),
- Pos2 = Vector(4594.077148, -274.351471, 553.817627)
- }
- function PlayerBox(ply,pos,pos2) -- фильтрует игрока
- local Entity = ents.FindInBox(pos,pos2)
- for _, ent in ipairs(Entity) do
- if ent == ply then
- return true
- end
- end
- return false
- end
- hook.Add("canArrest","ArrestZone",function(ply,target)
- if not PlayerBox(target,ArrestZone.Pos,ArrestZone.Pos2) then
- ply:ChatPrint("[Задержание] Игрок должен находиться в здании Полиции!")
- return false
- else
- ply:ChatPrint("[Задержание] Вы арестовали игрока: "..target:Nick())
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement