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)