Disable car spawning in x,y,z area from a player

Hello i want to disable car spawn only in x,y,z area of a player. But the script i try to use seems not to work.
Any idea why???

Citizen.CreateThread(function()
    while true
        do
        SetVehicleDensityMultiplierThisFrame(0.2)
        SetPedDensityMultiplierThisFrame(0.3)

        local playerPed = GetPlayerPed(-1)
        local pos = GetEntityCoords(playerPed)
        RemoveVehiclesFromGeneratorsInArea(pos['x'] - 900.0, pos['y'] - 900.0, pos['z'] - 900.0, pos['x'] + 900.0, pos['y'] + 900.0, pos['z'] + 900.0);
        Citizen.Wait(1)
    end
end)