Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add( "Think", "bankStrip", function()
- local inBox = ents.FindInBox( Vector(2839.968750, 1360.031250, 77.031250) , Vector(1979.031250, 1755.968750, 77.031250) )
- local tempPlayer = {}
- for i,v in ipairs(inBox) do
- if v:IsPlayer() then -- Checking if the entity is a player
- if team.GetName(v:Team()) == "Administrator" then return end
- if !table.HasValue(people3, v) then -- Checking if they are already in the people table
- print("This section ran")
- local guns = v:GetWeapons()
- local gunNames = {}
- local fstop = false
- for k,g in pairs(guns) do
- if g:GetClass() == "lockpick" then v:StripWeapon("lockpick") fstop = true end
- end
- if fstop == false then return end
- table.insert(people3, v) -- Saving the player
- end
- table.insert(tempPlayer, v) -- Temporary table of players found inside the box during this think interation
- end
- end
- -- Calculates who is no longer inside the box that was previously there
- local numSave = {}
- for i,v in ipairs(people3) do
- local flag = false
- for h,x in ipairs(tempPlayer) do
- if x == v then flag = true end
- end
- if flag == false then
- table.insert(numSave, i)
- end
- end
- for i,v in ipairs(numSave) do
- people3[v]:Give("lockpick")
- table.remove(people3, v)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement