How to remove parkinglot swing barriers

     Where do i put??



     local gates = {
"p_barier_test_s",
"prop_sec_barier_01a",
"prop_sec_barier_02a",
"prop_sec_barier_02b",
"prop_sec_barier_03a",
"prop_sec_barier_03b",
"prop_sec_barier_04a",
"prop_sec_barier_04b",
"prop_sec_barier_base_01",
"prop_sec_barrier_ld_01a",
"prop_sec_barrier_ld_02a"

}
Citizen.CreateThread(function()
while true do
for a = 1, #gates do
local player = PlayerId()
local plyPed = GetPlayerPed(player)
local plyPos = GetEntityCoords(plyPed, false)
local gate = GetClosestObjectOfType(plyPos.x, plyPos.y, plyPos.z, 100.0, GetHashKey(gates[a]), 0, 0, 0)
if gate ~= 0 then
SetEntityAsMissionEntity(gate, 1, 1)
DeleteObject(gate)
SetEntityAsNoLongerNeeded(gate)
end
end
Citizen.Wait(5000)
end
end)

I wonder if you could use this for blimps and certains heli’s

Hey I have a question:

Is there a way you can let the barrier open sooner, like they always open when you slightly bump into them but is there a way to make them recognize you instead at like 0,3m distance? I’ve noticed that the barriers at the island function just the way I hope the one’s on mainland would do so too.

Honestly I’m not sure.