MadsL
9
I’m not sure this is the best/most optimized way to do it but you could use the populationPedCreating event to check if the ped getting created is within 25 units of the certianArea and remove them if they are.
This would be on the client-side:
local areaRadius = 25.0
local certianArea = vector3(976.95, -117.13, 74.26)
AddEventHandler('populationPedCreating', function(x, y, z, model, setters)
if #(certianArea - vector3(x, y, z)) < areaRadius then
CancelEvent()
end
end)