Getting Started
This page will walk you through getting and installing the Speed Camera script.
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
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 In the
sonoran-trafficcam
folder there will be a file calledconfig.CHANGEME.lua
you should rename that to beconfig.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 calledcameras.CHANGEME.json
which you should rename tocameras.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 calleddiscord.CHANGEME.lua
in the folder which should be renamed todiscord.lua
, this file contains all of your Discord webhook related settings.Sonoran Software - Speed Cameras - Remove .CHANGEMEs Finally, in your
server.cfg
add the following:
ensure sonoran-trafficcam
add_ace resource.sonoran-trafficcam command allow
add_ace resource.sonoran-trafficcam_helper command allow
Configuring the Script
Note
In order for auto fines to function properly, Config.permission_mode MUST be "framework"
DiscordConfig = {
enabled = false, -- Should discord webhooks be used?
webhook_url = "", -- See https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
webhook_title = "{{EVENT_TYPE}} Alert", -- The title of the webhook embed
webhook_message = "License Plate: {{PLATE}}\nSpeed: {{SPEED}} {{SPEED_UNIT}}\nCamera: {{CAMERA_NAME}}" -- The message that the webhook displays
}
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:
add_ace group.admin sonoran.trafficcam allow
add_ace group.leo sonoran.police allow
add_ace group.leosupervisor sonoran.bolo allow
add_ace group.moderator sonoran.disablecam allow
Camera Location Config
You have two options for placing new cameras:
You can use the command
/spawnnewcam [prop] [name]
to initiate spawning a new camera and generate the relevant config dataAfter 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.
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
camera.json
Property ExplanationID
2
ID
must be unique. No other camera can share this ID
Prop
radar01
Valid values are radar01
and porp_traffic_cam
Position
This is a table that contains the x, y, and z coords of the camera
Rotation
This is a table that contains the x, y, and z rotation of the camera
Label
Test 1
This is a human readable label for the camera, can have spaces
SpeedLimit
10
This is the speed over which this camera will trip
ViewRadius
10
How far away this camera can see in GTA units, default is 10
Commands
/spawnnewcam [prop] [name]
This command will allow an admin to spawn a new camera using a gun placement system where the name argument is the label for the new camera and the prop argument is the text name of the model to use
Admin or as configured
/addplate [plate]
This command will add a plate to the standalone BOLO system when in use.
LEO or as configured
/delplate [plate]
This command will remove a plate from the standalone BOLO system when in use.
LEO or as configured
/listplates
This command will list the plates currently configured in the standalone BOLO system when in use
LEO or as configured
/showcamid
This command will draw the ID of cameras which you are in the radius of with 3D text near the camera
N/A
/getpositiondata
This command will print the current positional data of the camera to the chat
Admin or as configured
/changepositiondata
This command will change the value which you specify of the camera you specify, run this command without arguments for example usage. All changes made with this command will be immediately saved
Admin or as configured
/reloadcameras
This command will completely reload the cameras.json from the server's storage
Admin or as configured
/disablecamera
This command will disable the camera with the ID specified as an argument, this will prevent that camera from flagging vehicles
LEO or as configured
/enablecamera
This command will enable the camera with the ID specified as an argument, this resume that camera's ability to flag vehicles
LEO or as configured
/cancelcamplacement
This command will cancel the current camera placement if one is currently in progress.
N/A
Model Options
The model on the left is named prop_traffic_cam
and the model is named radar01
.

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:
exports("GetCurrentSpeed", function()
return speedlimit
end)
Last updated
Was this helpful?