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.

Buy Here

FiveM Forums Post

YouTube Showcase Video

This resource can be purchased as part of a bundle for a discount here.

Translate

INSTALLATION GUIDE

Step 0 - First Steps

Step 1 - Fxmanifest

Step 2 - Configure Resource

Step 3 - Configure Key Binds

OPTIONAL FEATURES

This section is to help you understand how the built-in features of this resource work, and if applicable, how you can make them compatible with other resources. These features are not required, they are optional and can be configured in the [configs/config.lua].

Vehicles Data

What is Vehicles Data used for?

When using ESX or QBCore we take information that most servers will already have stored to get the vehicles to display names of custom vehicles.

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 informed 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.

Adding/Removing BOLOs & Markers from other resources

Why do I need this?

This is optional, but it is possible to add BOLOs and Markers from other resources, such as MDTs or police resources.

This is a template.
TriggerServerEvent('cd_radar:RadarDatabase_ADD', {
    plate = CHANGE_ME,
    model = CHANGE_ME,
    colour = CHANGE_ME,
    reason = CHANGE_ME,
    type = CHANGE_ME,
    name = nil,
    notes = nil,
    date = nil,
})
This is an example of how this can be formatted.
TriggerServerEvent('cd_radar:RadarDatabase_ADD', {
    plate = 'CODESIGN',
    model = 'Adder',
    colour = 'Blue',
    reason = 'Drugs',
    type = 'bolo',
    name = nil, 
    notes = 'Pablo Escobar wannabe (selling drugs)',
    date = nil,
})

When triggering the event from client-side to server-side, the player triggering the event must have an authorised job.

What does each of the variables above mean?

  • plate: The vehicle's plate (string).

  • model: The vehicle's display name (string).

  • colour: The vehicle's colour (string).

  • reason: The reason must match one of the reasons in the "reasonList" in the [configs/config_ui.js] (string).

  • type: Choose between "bolo" or "marker" (string).

  • name: [OPTIONAL] The character's name (string).

    • If left as nil then cd_radar auto-fill this for you.

  • notes: [OPTIONAL] Notes left by the officer who issued the bolo/marker (string).

  • date: [OPTIONAL] The time this bolo/marker was issued (string).

    • If left as nil then cd_radar auto-fill this for you.

INFORMATION

Default Key Binds

These keys can be modified and/or disabled in the Keys and Commands section of the [configs/config.lua].

Please make sure you understand how Key Mapping works.

Key
Description

J

Interact with the radar’s UI.

O

Toggle the radar lock.

Chat Commands

These chat commands can be renamed and/or disabled in the Keys and Commands section of the [configs/config.lua].

The exact usage for each command will be displayed in the chat suggestions when using the commands in-game.

Command
Description

/radarsettings

Interact with the radar’s UI.

/radartoggle

Toggle the radar UI visibility.

/radarlock

Toggle the radar lock.

Events

These events are completely optional; you can use them if needed.

Interact With Radar

Interact With Radar UI with your mouse.
TriggerEvent('cd_radar:InteractWithRadar')

Toggle Radar

Toggle the radar UI visibility.
TriggerEvent('cd_radar:ToggleRadar')

Show Radar

Show the radar UI.
TriggerEvent('cd_radar:ShowRadar')

Hide Radar

Hide the radar UI.
TriggerEvent('cd_radar:HideRadar')

Toggle Radar Lock

Toggle the radar lock.
TriggerEvent('cd_radar:ToggleRadarLock')

COMMON ISSUES

Please check out our Troubleshooting Guide before contacting our support.

🔔 Folder Name Make sure the name of the folder is cd_radar.

🔔 Encrypted Files Do not edit the encrypted files in any way.

Radar Ignores Emergency Vehicles?

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.

Radar Locking Below The Limit I Set?

eg., if you have your radar to lock vehicles at 70mph but they are locking at 30mph.

✔️ This is because you have not set the limit for all 4 cameras. Each camera has its own individual speed limit for locking vehicles. Set them all to the new limit individually.

Radar Not Visible But I Have The Correct Job/perms?

eg., if you are confident you have the correct job/perms, but the radar still isn’t visible when in a vehicle.

✔️ This is because the radar is set to only be visible when you are in an emergancy vehicle. To test this theory, spawn in a default gta police car (/car police), then it should work. If a default gta police car works, but your custom police car does not, then the vehicle class for your custom car is not set as an emergancy vehicle (VC_EMERGENCY) in the vehicles.meta.

I'm Not Able To Add Plates To The Radar's Database?

eg., if you are trying to add plates to the radar's database manually or through another script but it doesn't get added and there are no errors.

✔️ The most common reason for this is because you do not have permission to use the radar (your job is not in the Config.AllowList table in the config.lua). The only way the script will allow you to add a plate to the radar's database is if your job has permission or the event is being triggered from the server side. There will be no visible error if you try to add a plate to the radar's database without proper permissions.

ERROR CODES

If you see an error code not listed below please open a script support ticket in the Codesign Discord.

468454 - You do not have the vehicles database table, so you need to disable Config.VehiclesData by setting the ENABLE option to false.

3364 - You are triggering the cd_radar:RadarDatabase_REMOVE server event to remove bolos/markers, but this vehicle does not have a bolo/marker on it.

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.

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 make a backup of the JSON Files folder, delete your old cd_radar folder, download and add in the latest version, replace the new JSON Files folder with the one you made a backup of, configure the configs folder and restart your server.

  • All Files Except config.lua - This means you should do all of the above (in the All Files section) but additionally make a backup of the config.lua file and replace the new config.lua file with the one you made a backup of.

  • Specific Files - This means you can 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.

18/06/2022

Files Changed:

Update Type:

Changelog:

Last updated

Was this helpful?