Docs/Yecoyz Radar

Installation

Dependencies, items and setup for Yecoyz Radar.

1. Dependencies

Resource Notes
oxmysql Required
yecoyz_core Required. Handles the framework, jobs, inventory and notifications
ESX, QBCore or Qbox Your framework
ox_inventory Recommended. Without it the items are framework usable items

2. Download

Download yecoyz_radar from Keymaster and extract it into your resources folder. See Getting started for the details.

Important

Don't rename the resource folder.

3. server.cfg

cfg
ensure oxmysql
ensure yecoyz_core
ensure ox_inventory
ensure yecoyz_radar

There is no SQL to import: the tables are created when the resource starts.

4. Items

Add the three items to ox_inventory/data/items.lua:

lua
['radar_detector'] = {
    label = 'Radar Detector', weight = 140, stack = false, close = true, consume = 0,
    description = 'Vigilon V7 laser / radar detector. Use it in a vehicle to mount it on the dashboard.',
    client = { export = 'yecoyz_radar.useDetector' },
},
['radar_report'] = {
    label = 'Speed Report', weight = 10, stack = false, close = true, consume = 0,
    description = 'A printed police radar speed measurement.',
    client = { export = 'yecoyz_radar.useReport' },
},
['radar_gun'] = {
    label = 'Radar Gun', weight = 900, stack = false, close = true, consume = 0,
    description = 'Hawkline H2 handheld Ka-band police radar. Use it to take it out: right mouse aims, left mouse measures.',
    client = { export = 'yecoyz_radar.useGun' },
},

Copy install/radar_detector.png, install/radar_report.png and install/radar_gun.png to ox_inventory/web/images/, then restart ox_inventory.

Note

ox_inventory only reads its items when it starts. Until it is restarted, the items can't be given and the radar prints a warning in the server console.

Without ox_inventory, the script registers the items as usable items in your framework. On ESX without ox_inventory there is no item metadata, so a printed speed report can't be shown from the item.

5. Jobs and vehicles

The radar and the radar gun are for the jobs in Config.police.jobs (police and sheriff by default). The radar works in emergency-class vehicles and the models in Config.police.models. See Configuration.

Updating

Replace the folder with the new version from Keymaster. Keep your config.lua and compare it with the new one. Database changes are applied on start.

Tip

After an update that changes the detector or radar gun model, players need to reconnect to see the new one.

Stuck on this step?

Open a ticket in the Discord with what you tried and what you see, and I'll help you get it running.

Ask on Discord
Up nextPolice radarKeys, readings, speed reports and the BOLO list of the police radar.