There are some scripts here on the forums that you can use to find coordinates.
You could try something like this
1 Like
nzkfc
23
This may also help if you want to combine both natives:
local clearPedsAndVehicle = {
{coords = vector3(1398.55, 1147.87, 114.33), radius = 50.0}, -- example location
}
CreateThread(function()
while true do
Wait(0)
for _,v in pairs(clearPedsAndVehicle) do
ClearAreaOfVehicles(v.coords, v.radius)
ClearAreaOfPeds(v.coords, v.radius, 1)
end
end
end)```
Hey can you tell me how i have to write the script that only vehicles do not spawn? I will have the peds on my Mlo.
nzkfc
25
Try this inside a .lua in a script with client folder somewhere:
Citizen.CreateThread(function()
while (true) do
ClearAreaOfPeds(1996.51, 3062.09, 47.05, 50.0, 1) --X, Y, Z, Radius (must have .0)
Citizen.Wait(10000)
end
end)
For just vehicles you cna also use:
Citizen.CreateThread(function()
while (true) do
ClearAreaOfVehicles(1996.51, 3062.09, 47.05, 50.0, 1, 10.0, false, false, false, false, false); --X, Y, Z, Radius (must have .0)
Citizen.Wait(10000)
end
end)
2 Likes
With this code Citizen.CreateThread(function()
while (true) do
ClearAreaOfVehicles(1996.51, 3062.09, 47.05, 50.0, 1, 10.0, false, false, false, false, false); --X, Y, Z, Radius (must have .0)
Citizen.Wait(10000)
end
end)
the npc will not be there! We using QB-Core
where would i find this in my files ?
which coords are which tho
Thanx for the info, i got it working. 
minguez
31
Use PoliZone to improve performance
2 Likes
How would make it remove all npc spawn in a polyzone?