Tommy's Radar Detector
Configuration guide, common issues & solutions, code snippets, and more.
Last updated
Configuration guide, common issues & solutions, code snippets, and more.
Last updated
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.
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 if useAsCommand
is enabled.
sv_config.lua:
This file contains server-side configuration options for the radar detector script.
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 if useAsItem
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 if useAsItem
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 the cl_radar.lua
file within the Wraith resource folder.
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 the radardetector.png
file into the qb-inventory/html/images
directory.
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.