Tommy's Radar Detector
Configuration guide, common issues & solutions, code snippets, and more.
Escrow Encrypted: Yes
Requirements: Wraith ARS 2X
Features:
Works with Wraith ARS 2X and can be configured to work with other frameworks.
Displays the direction and strength of radar signals.
The UI can be easily resized and moved, with individual positions saved for each player.
UI resizing and positioning can be done using the /youniden_layout command, with + and - for size adjustment and mouse for position adjustment.



Configuration: cl_config.lua:
This file contains client-side configuration options for the radar detector script.
Config = {} -- Tommy's Radar Detector Script v1.0
-- The name of the Wraith ARS 2X resource.
Config.wraithResourceName = "wk_wars2x"
-- Choose either 'mph' or 'kph'
Config.speedUnit = "mph"
-- Enable this if you want to use the command to open the radar detector (disable if using it as an item).
Config.useAsCommand = false
Config.commandName = "youniden"
wraithResourceName
: Specifies the name of the Wraith ARS 2X resource. Make sure to set it correctly based on your resource name.speedUnit
: Allows you to choose the unit of measurement for the radar detector. Options are "mph" or "kph".useAsCommand
: Set this option to true if you want to use the /youniden command to open the radar detector. If using it as an item, set it to false.commandName
: Specifies the command name to open the radar detector ifuseAsCommand
is enabled.
sv_config.lua:
This file contains server-side configuration options for the radar detector script.
-- If using qbcore, enable this to allow the radar detector to be used as an item.
local useAsItem = true
local itemName = "radardetector"
local QBCore = exports['qb-core']:GetCoreObject()
list = {}
CreateThread(function()
while true do
Wait(1000)
TriggerClientEvent('youniden:syncList', -1, list)
end
end)
if useAsItem then
QBCore.Functions.CreateUseableItem(itemName, function(source)
TriggerClientEvent('youniden:radar', source)
end)
end
RegisterNetEvent('youniden:updateList')
AddEventHandler('youniden:updateList', function(toggle)
list[source] = toggle
end)
useAsItem
: Set this option to true if you are using the QBCore framework and want to allow the radar detector to be used as an item. Set it to false otherwise.itemName
: Specifies the name of the radar detector item ifuseAsItem
is enabled.QBCore
: Retrieves the core object of the QBCore framework.list
: A table that stores the radar detector toggle status for each player.CreateThread
: A function used to create a thread that continuously updates the radar detector toggle status.TriggerClientEvent
: Sends the radar detector toggle status to all clients.QBCore.Functions.CreateUseableItem
: Creates a usable item for the radar detector ifuseAsItem
is enabled.
Additional Instructions:
For all users using WK_WARS2X, add the following line to the
fxmanifest.lua
file of the Wraith resource:export "DetectorExport"
. Additionally, add the provided code anywhere within thecl_radar.lua
file within the Wraith resource folder.
function DetectorExport()
return RADAR;
end
For QBCore users who wish to make this an item, include the provided code in your
qbcore/shared/items.lua
file. Also, make sure to drag theradardetector.png
file into theqb-inventory/html/images
directory.
['radardetector'] = {
['name'] = 'radardetector',
['label'] = 'Youniden Radar Detector',
['weight'] = 3000,
['type'] = 'item',
['image'] = 'radardetector.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'We are not liable for your reckless driving.',
},
Finally, enable the "useAsItem" function in the config file to activate the radar detector as an item.
Please ensure that you follow these instructions carefully to ensure proper functionality and integration with the Wraith ARS 2X and QBCore frameworks.
Last updated