Links

Radar

Step-by-step installation guide, common issues & solutions, code snippets, error codes, config previews, locales previews, SQL previews, and changelogs; all in 1 easily accessible place.
This resource can be purchased as part of a bundle for a discount here.

Translate

START HERE

1. Unzip the cd_radar.zip folder and place this folder in your server's resource folder.
2. Add the resource to your server start config: ensure cd_radar (it must be placed anywhere below your framework resource eg., es_extended, not above).
3. WARNING The name of the folder must not be changed or the resource will not function correctly.
4. WARNING Do not edit the encrypted files in any way.

INSTALLATION GUIDE

Step 1 - Install the SQL

You MUST import the SQL file to your database. This SQL file is located inside theREAD_ME_AFTER_PURCHASING folder, the file is named SQL_optional.sql. Watch this video if you are unsure how to do this HeidiSQL / PHPMyAdmin.
Note: You ONLY need to import the SQL files if you are using ESX. And even so this is optional as it is only needed if you choose to use #Vehicles Data.

Step 2 - Fxmanifest

You may need to make some changes to the fxmanifest.lua, depending on your framework and dependencies. We have made this easier for you by commenting on the lines which you may need to change.

Step 3 - Configure the resource

You MUST read all of the configurable options inside the config.lua and configure them to suit your server's needs. Please read the ”commented out help text” at the end of each line so you can understand what each config option does.
The most important sections are the options under the Framework and Important sections at the top of the config.lua. Everything else is optional.

Step 4 - Configure your key binds

Before starting this resource on your main/live server we highly advise you to configure your key binds because this resource uses Fivem's Key Mapping.
Why? Well long story short;- once a player has joined your server with this resource running you can no longer force change their key binds for this resource through the config.lua, only they can change it in the in-game pause menu settings. Although it will change for the players who join after you have changed it.
The benefit of this system is that it's much more optimised and players can easily change their own key binds on keyboards or controllers. You can also check out the Default Keybinds for this resource.

OPTIONAL MODIFICATIONS

Vehicles Data

What is Vehicles Data used for?
When you are using ESX or QBCore we take information that most servers will already have stored to get the vehicles display names of custom vehicles.
ESX
QBCore
Standalone
Other
On ESX we will grab the vehicle's display names from the "vehicles" database table as this is very common in esx servers.
Multiple "vehicles" database tables
We were made aware that some servers use multiple "vehicles" database tables for donator vehicles, emergency vehicles etc. So all you need to do is add the names of these database tables into the Config.VehiclesData.VehicleDatabase_TableNames in the config,lua.
On QBCore we will grab the vehicle's display names from the qb-core/shared.lua/QBShared.Vehicles as this is very common in QBCore servers.
If Config.VehiclesData is disabled, the script will get the vehicle's display names from the vehicle handling files vehicles.meta. Example: <gameName>Adder</gameName>.
If Config.VehiclesData is disabled, the script will get the vehicle's display names from the vehicle handling files vehicles.meta. Example: <gameName>Adder</gameName>.

Adding BOLOs & Markers from other resources

Why do I need this?
This is optional, but it is possible to add BOLO's and Markers from other resources, for example CAD's or other police resources.
client-side to server-side
server-side to server-side
Template
TriggerServerEvent('cd_radar:RadarDatabase_ADD', {
plate = CHANGE_ME, --The vehicles plate.
model = CHANGE_ME, --The vehicles display name.
colour = CHANGE_ME, --The vehicles colour.
reason = CHANGE_ME, --The reason (the reason must already be defined in the config_ui.js's "reasonList" table).
type = CHANGE_ME, --Choose between "bolo" or "marker".
name = nil, --OPTIONAL: The characters name (if left empty cd_radar will get the players name for you),
notes = nil, --OPTIONAL: Notes left by the officer who issued the bolo/marker.
date = nil, --OPTIONAL: The time this bolo/marker was issued.
})
Example
TriggerServerEvent('cd_radar:RadarDatabase_ADD', {
plate = 'CODESIGN', --The vehicles plate.
model = 'Adder', --The vehicles display name.
colour = 'Blue', --The vehicles colour.
reason = 'Drugs', --The reason (the reason must already be defined in the config_ui.js's "reasonList" table).
type = 'bolo', --Choose between "bolo" or "marker".
name = nil, --OPTIONAL: The characters name (if left nil, cd_radar will get the players name for you),
notes = 'Pablo Escobar wannabe', --OPTIONAL: Notes left by the officer who issued the bolo/marker.
date = '2022-06-23 19:10', --OPTIONAL: The time this bolo/marker was issued.
})
When triggering the event from client-side to server-side, the player triggering the event must have an authorised job.
Template
TriggerEvent('cd_radar:RadarDatabase_ADD', {
plate = CHANGE_ME, --The vehicles plate.
model = CHANGE_ME, --The vehicles display name.
colour = CHANGE_ME, --The vehicles colour.
reason = CHANGE_ME, --The reason (the reason must already be defined in the config_ui.js's "reasonList" table).
type = CHANGE_ME, --Choose between "bolo" or "marker".
name = nil, --OPTIONAL: The characters name (if left empty cd_radar will get the players name for you),
notes = nil, --OPTIONAL: Notes left by the officer who issued the bolo/marker.
date = nil, --OPTIONAL: The time this bolo/marker was issued.
})
Example
TriggerEvent('cd_radar:RadarDatabase_ADD', {
plate = 'CODESIGN', --The vehicles plate.
model = 'Adder', --The vehicles display name.
colour = 'Blue', --The vehicles colour.
reason = 'Drugs', --The reason (the reason must already be defined in the config_ui.js's "reasonList" table).
type = 'bolo', --Choose between "bolo" or "marker".
name = nil, --OPTIONAL: The characters name (if left nil, cd_radar will get the players name for you),
notes = 'Pablo Escobar wannabe', --OPTIONAL: Notes left by the officer who issued the bolo/marker.
date = '2022-06-23 19:10', --OPTIONAL: The time this bolo/marker was issued.
})
When triggering the event from the server-side to server-side, cd_radar can not get a character's name as the source will not be defined.

INFORMATION

Default Key Binds

Please Read Here for more information regarding key mapping.
Key
Description
J
Interact with the radar’s UI.
O
Toggle the radar lock.

Chat commands

All of these chat commands can be renamed and disabled/enabled in the config/code.
If a command isn't working, make sure the config option for the said feature is enabled in the config.lua.
Command
Description
/radarsettings
Interact with the radar’s UI.
/radarlock
Toggle the radar lock.
/radartoggle
Toggle the radar UI visibility.

Events

These events are completely optional, you can use them if needed. These are less important events, the more important evencase-sensitivets are documented in the other sections above.
client-side to client-side
Toggle Radar Lock
Toggle the radar lock.
TriggerEvent('cd_radar:ToggleRadarLock')
Toggle Radar
Toggle the radar UI visibility.
TriggerEvent('cd_radar:ToggleRadar')
Show Radar
Show the radar UI visibility.
TriggerEvent('cd_radar:ShowRadar')
Hide Radar
Hide the radar UI visibility.
TriggerEvent('cd_radar:HideRadar')

COMMON ISSUES

Please check out our Troubleshooting Guide before contacting our support.
🔔 Folder Name Make sure the name of the folder is cd_radar.
Radar Ignores Emergency Vehicle?
eg., if your radar is ignoring emergency vehicles.
✔️ This is normal; by design we have made it so the radar ignores emergency vehicles; as during police chases this could get really annoying. So please be aware of this if testing the resource out emergency vehicles aren't being seen by the speed limit radar.

ERROR CODES

If you see an error code which isn't listed below please open a script support ticket in the Codesign Discord.
Server
Client
468454 - #Step 1 has not been completed correctly, you have not added the vehicles database table.
3364 - When triggering the cd_radar:RadarDatabase_REMOVE server event to remove bolos/markers, you need to send a table, but you are not.
8800 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, you need to send a table, but you are not.
8801 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the plate variable is not a string or is nil.
8802 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the model variable is not a string or is nil.
8803 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the colour variable is not a string or is nil.
8804 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the reason variable is not a string or is nil.
8805 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the type variable is not a string or is nil.
8806 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the reason variable is not defined in the config_ui.js's reasonList table. The strings must be an exact match (case sensitive).
8807 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the plate variable is either more than 8 characters or is an empty string.
8808 - When triggering the cd_radar:RadarDatabase_ADD server event to add bolos/markers, the type variable can only be either bolo or marker, but you are sending something different.
N/A

CHANGELOG

Files Changed: Not every update requires you to replace the whole folder. We do this because we understand it's a pain to redo the configs for every update.
  • All Files - This means you should delete your old cd_radar folder, download and add in the latest version, reconfigure the configs folder and restart your server.
  • Specific Files - This means you can simply copy and paste the SPECIFIC new files over the old ones and restart the server.
Update Type: On rare occasions, you are forced to update to the latest version. Mostly due to authentication updates where the old versions will no longer work.
  • Mandatory - This means you MUST update to this new version or the old versions will no longer work.
  • Optional - This means it's completely your choice whether you wish to update to the latest version. But we do not offer support for old versions for obvious reasons; they are old.
v1.0.0
v1.0.1

18/06/2022

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
STATUS
  • Development Stage: COMPLETE
  • Alpha Test Stage: COMPLETE
  • Beta Test Stage: COMPLETE

15/08/2022

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • Added configurable debug prints.
Edit
  • Cleaned up some of the unused/unneeded code.
Fix
  • Fixed an issue with the standalone perms checks.