Getting Started
This page will walk you through getting and installing the Speed Camera script.
Last updated
This page will walk you through getting and installing the Speed Camera script.
Last updated
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.
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.
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.
Finally, in your server.cfg
add the following:
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
In order for auto fines to function properly, Config.permission_mode MUST be "framework"
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:
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:
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.
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 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
/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
The model on the left is named prop_traffic_cam
and the model is named radar01
.
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: