Adding new cameras

We've made it simple to add new cameras around the map which automatically add to the .json file, meaning no manual editing required.

Developer Mode

To begin adding new cameras around the map, make sure you've enabled developerMode in the config.lua file. You will not be able to add new cameras unless you have this enabled.

Important Note

Adding cameras is now very different to the previous version of this resource, Average Speed Cameras. As we now have two different types of cameras, there are two different processes you can follow to add more cameras.

The new resource works off a detection area which you must set when adding new static cameras, or a line in the road for average speed cameras. This is to enhance efficiency and accuracy of the camera recording data, something the previous resource had issues with.

Following this guide will give you everything you need to know in order to add new cameras.

Adding Static Cameras

These are the first time of camera included in the resource. To begin adding a new static camera, go to the location at the side of the road where you want it to be.

Then, run the command /createnewstaticcamera.

Next, the static camera will appear in front of you and you'll be able to move it about using the following keys:

Page Up / Page Down - moving the sign up and down

Arrow Up / Arrow Down - moving the sign forwards and backwards

Arrow Left / Arrow Right - moving the sign left and right

B and N - rotate the sign left or right

Once you are happy with the positioning of the camera, press ENTER.

Next, a text entry box will appear on the screen asking you to enter the speed limit for the camera. Once you have entered the speed limit, press ENTER to confirm.

Next, you will move into a birds eye view of the road and you will need to position the white circle to the centre of the road where you want cars to be detected using the following keys:

Page Up / Page Down - making the circle bigger and smaller

Arrow Up / Arrow Down - moving the circle forwards and backwards

Arrow Left / Arrow Right - moving the circle left and right

B and N - rotate the sign left or right

Once you are happy with the position of the white circle, press ENTER.

The new static camera location will now automatically be added to the .json file and this camera will now function when you next restart the resource/server.

Adding average cameras

This is the second type of camera included in the resource. As these are average cameras, they have two sets and must be placed a distance away from each other on a stretch of road. They work by calculating the time taken for a vehicle to pass from camera one to camera two, and then calculating the speed based from that distance.

Adding the first average camera

Firstly head to the position where you want the first average camera on a set of road.

Next, run the /setcamerapos1 command in-game.

Next, the average speed camera will appear in front of you and you can move it about to the correct position using the following keys:

Page Up / Page Down - moving the sign up and down

Arrow Up / Arrow Down - moving the sign forwards and backwards

Arrow Left / Arrow Right - moving the sign left and right

B and N - rotate the sign left or right

Once you are happy with the positioning of the camera, press ENTER.

Next, walk to the other side of the road where cars are going one direction (this may be in the middle of a highway for example) and stand there, ready to position the next point.

This is because the average cameras will use an invisible line to work out when a car passes it, rather than a set radius which may lead to issues such as detecting cars going in the opposite direction.

Make sure you are stood opposite the camera and when ready press G to confirm.

Once you have pressed G to confirm the position, a red line will draw which is only visible whilst you are adding new cameras and is not there always. This is to assist you in visualising the placement of new cameras.

Adding the second average camera

Next, you will want to go further along the road in the direction that vehicles travel. This can be as far as needed, but we recommend 100-200m down the road. You will then need to repeat the process of adding the first camera, but with a different command.

Once you are in the position for the second camera, run the /setcamerapos2 command and repeat the process. You will then need to move to the other side of the road again and press G.

Once you have added two cameras, that set of average cameras is complete and will be added to the .json file, ready for when you next start the server.

Last updated