Skip to main content

Acquire the Script

After purchasing the script through the sonoran store you may download the script through the keymaster account that purchased the script. Upon downloading extract the file to a safe place.

Install the Script

  1. Inside the script package you just extracted will be two folders. Copy both to a folder in your server’s resources folder called [sonoranscripts] note the [] in the name, without them it will not work.
Sonoran Software - Speed Cameras - Folders
  1. In the sonoran-trafficcam folder there will be a file called config.CHANGEME.lua you should rename that to be config.lua and configure the settings inside as you would like them to be configured based on the configuration documentation below. In that same folder will also be a file called cameras.CHANGEME.json which you should rename to cameras.json and use to manually place cameras based on the existing template, note you can also use the gun placement system in game. Finally there is a file called discord.CHANGEME.lua in the folder which should be renamed to discord.lua, this file contains all of your Discord webhook related settings.
Sonoran Software - Speed Cameras - Remove .CHANGEMEs
  1. Finally, in your server.cfg add the following:

Configuring the Script

As of v2.0.2 this script utilizes two separate Lua configs. This is for security reasons. Having a separate config for your Discord Configuration keeps them server side only and safer from malicious clients

Note

In order for auto fines to function properly, Config.permission_mode MUST be β€œframework”

Setting Up Permissions (Ace Permissions Only)

To use this script you must assign the permissions object to the groups which you would like to have permissions. You can find the objects needed in the config under Config.ace_perms section in the config. To assign these perms you must add the lines to your server.cfg or where ever you setup permissions on your server. You can learn more about Ace Permissions here. Example:

Camera Location Config

When using a camera mounted to a pole (such as traffic lights), if the pole is broken, the camera will be disabled.
You have two options for placing new cameras:
  1. You can use the command /spawnnewcam [prop] [name] to initiate spawning a new camera and generate the relevant config data
    • After running this command you must pull out, aim, and shoot with a gun to confirm placement.
    • You may need to modify some of the rotation values manually to get that perfect placement you are looking for.
    • If you aren’t using the speed limit display integration you will need to manually go into the config file to change the set speed limit. You will also need to change the view radius to be the way you want it.
    • Click here for more information.
  2. You can manually copy and paste an existing config and then modify the values to meet your needs for the new camera

camera.json Property Explanation

Commands

Model Options

The model on the left is named prop_traffic_cam and the model is named radar01. Sonoran Software - Speed Cameras Promotional Image

Needed Changes for Speed Display

We recommend this speed limit display script by BigYoda. Add the following code snippet to the bottom of your speed display script’s client.lua: