[Release] Wraith ARS 2X | Police radar and plate reader [v1.3.1]

Wraith ARS 2X

After months in development and a ridiculous amount of testing, I present to you my second radar resource for FiveM, the Wraith ARS 2X. It is a full rewrite of WraithRS, with a completely custom system for detecting vehicles in the radar’s line of sight, allowing vehicles to be detected much further away from the patrol vehicle. This new radar also follows a lot more closely to the Stalker DSR 2X, one example being that my new radar now splits detected vehicles between strong targets and fast targets. Stronger targets are larger vehicles that would reflect a larger signal back to the radar, whereas fast targets are smaller vehicles that are going faster than the strongest target. This means that at any time, the radar has the capability of tracking up to 4 targets at once. There’s also a plate reader!

Features

  • Realistic user interface
  • Realistic sounds from the Stalker DSR 2X
  • Completely custom system for detecting vehicles (max range of 350m)
  • Detected vehicle filtering (strong and fast targets)
  • Automatic locking of speeds above a set fast limit (when enabled in the operator menu, and in the config file by the server admin)
  • FiveM keybinds which every client can set to what they want in their GTA key bindings menu
  • Keylock function to prevent any of the radar’s keys from working
  • Complete UI control, you can move the radar, remote, and plate reader anywhere on the screen. You can also change the scale of them!
  • The system will remember where the UI elements were left as well as the scale of each
  • An ingame help manual designed to be a realistic replica of the handbook for the Stalker DSR 2X, the manual includes detailed information about the radar’s operation
  • Operator menu to configure different options of the radar such as but not limited to the range, audio volume, and speed type
  • Operator menu options are saved and loaded like with the UI
  • Plate reader with GTA plate images, with external scanner access for developers
  • Passenger view and control
  • Radar functions sync between clients


Operator manual

The operator manual can be accessed ingame by using the remote and clicking the Help button. But if you’d like to view it outside of the game, click here.

Quick start video

Full showcase video

Just to make you aware, the full showcase video was made using version 1.0.0, some features may have been added/changed/removed since then. Check the changelog for detailed information on updates.

Default keybinds

The table below lists all of the keybinds along with a description of what they do. Every client can change their keybinds by going into their GTA key bindings menu, and navigating to the section titled “FiveM”.


For server owners and developers

Just a quick note before you read on, everything that happens with the resource occurs all in-game, the help manual and the quick start video both open in-game! I’ve seen people read the quick start message, click no, and then go watch it on YouTube, but clicking yes embeds it in-game!

Configuration

All of the configuration for the resource is done by editing the config.lua file. Every option in the file has been commented to describe what they do, as well as what values can be set (if applicable). You are able to configure the following:

  • Allow the fast limit locking system
  • Allow only auto lock real players
  • Allow the first time quick start video
  • Allow passenger view
  • Allow passenger control
  • Sonoran CAD setting
  • Change the controls
  • Change the default operator menu values
  • Change the default scale of the UI elements, as well as the safezone size

Exports and events

Currently, there is only one serverside export that can be used, more may be added in future depending on what features get added. I was going to add in exports for the radar itself, but due to how everything works, it didn’t make sense to include them. The current export can be used to make a client lock their front or rear plate reader, it can be used by using the following code:

--[[---------------------------------------------------------------------------------------
    Locks the designated plate reader camera for the given client. 

    Parameters:
        clientId:
            The ID of the client
        cam:
            The camera to lock, either "front" or "rear"
        beepAudio:
            Play an audible beep, either true or false
        boloAudio:
            Play the bolo lock sound, either true or false
---------------------------------------------------------------------------------------]]--
exports.wk_wars2x:TogglePlateLock( clientId, cam, beepAudio, boloAudio )

You can trigger the remote to open from another resource, by triggering the following event:

TriggerEvent( "wk:openRemote" )
or 
TriggerClientEvent( "wk:openRemote", source )

There are also two serverside events that can be hooked into for the plate reader, one of them is for when a user scans a plate, and the other is for when a user locks a plate. An example of when you may want to use these events is if you want to have all plate readers link in with an external BOLO list. The above export could then be used to make the user’s plate reader lock in the currently scanned plate. As time goes on, more events may be added into the resource.

Note: The events must be registered in your script for the events to work.

RegisterNetEvent( "wk:onPlateScanned" )
RegisterNetEvent( "wk:onPlateLocked" )

--[[---------------------------------------------------------------------------------------
    Gets triggered every time a player scans a plate with the plate reader. 

    Passed data:
        cam:
            The camera that scanned the plate, either "front" or "rear"
        plate:
            The plate that was scanned, e.g. "46EEK872"
        index:
            The plate index of the scanned plate, e.g. 2
---------------------------------------------------------------------------------------]]--
AddEventHandler( "wk:onPlateScanned", function( cam, plate, index ) 
    -- Example code
    print( GetPlayerName( source ) .. " scanned plate " .. plate .. " with their " .. cam .. " plate reader." )

    -- Example output: WolfKnight scanned plate 46EEK872 with their front plate reader
end

--[[---------------------------------------------------------------------------------------
    Gets triggered every time a player locks a plate with the plate reader. 

    Passed data:
        cam:
            The camera that scanned the plate, either "front" or "rear"
        plate:
            The plate that was scanned, e.g. "46EEK872"
        index:
            The plate index of the scanned plate, e.g. 2
---------------------------------------------------------------------------------------]]--
AddEventHandler( "wk:onPlateLocked", function( cam, plate, index )     
    -- Example code
    print( GetPlayerName( source ) .. " locked plate " .. plate .. " on their " .. cam .. " plate reader." )

    -- Example output: WolfKnight locked plate 46EEK872 on their front plate reader
end )

The plate strings passed in the events also follow the GTA way of formatting. This means that all plate strings will be 8 characters long, with the string being padded (priority goes to the right). Examples of how the strings will be formatted are below:

46EEK872 = "46EEK872"
WOLF     = "  WOLF  "
WRS      = "  WRS   "
FIVEM    = " FIVEM  "

Download and installation

By downloading this resource, you agree to abide by the MIT licence and consider the additional requests listed under the Licence section below.

Installing the Wraith ARS 2X into your FiveM server can be done by following the listed steps below.

  1. Download the latest version of the resource from here (not a pre-release)
  2. Open the zip file and place the wk_wars2x folder into your server’s resource folder
  3. Open up your server configuration file and add ensure wk_wars2x to your resource start list

It’s now installed! When you boot your server you should see a Wraith ARS 2X message as well as the version check message.

NOTE: TO ENSURE A SMOOTH INSTALL, DO NOT RENAME THE RESOURCE, AND LEAVE IT’S NAME IN LOWERCASE.

Changelog

1.3.1

New

  • Added a config option which when enabled, will move the fast lock and fast speed operator menu options to the front instead of the end (thanks @TrevorBarns)

Fixes

  • Fixed an issue where key binds were not being registered until the resource was restarted. This appears to have been caused by QBus interfering with the playerSpawned event which the resource relied on to register the key binds. The exact QB resource in question is unknown presently.

1.3.0

New

  • Added passenger view and control. This new update allows front seat passengers to view and control the radar/plate reader of the driver, there are two variables in the config.lua file that control this: passenger view and passenger control. When passenger view is enabled, the passenger will be able to open their remote and toggle their displays for the radar and plate reader. When passenger control is enabled, the passenger will be able to use all the radar and plate reader functions like normal, but it is synced between the driver and passenger.
  • Added callbacks to all Lua NUI events to prevent requests from stalling (thanks Jamelele on GitHub).
  • Added a button to the plate reader window to clear the current BOLO plate.
  • UI settings now get loaded again if the resource gets restarted live.
  • Added a client console message for when the key binds are being registered.
  • Added an option in config.lua to automatically lock speeds only if the speeding vehicle has a real player as the driver.
  • Added a notification when using /reset_radar_data to indicate the resource’s KVPs have been reset.
  • Added a chat suggestion for the /reset_radar_data command.
  • Added an option in config.lua for users of Sonoran CAD. When enabled, this reduces the amount that the plate reader system triggers the wk:onPlateScanned event, so it will only trigger the event if the scanned plate has a player in it or belongs to a player.
  • Added options in config.lua to set the default fast lock state and fast limit for the operator menu. This only applies if fast lock is enabled.

Changes

  • Changed the JavaScript NUI post event to HTTPS instead of HTTP (thanks Jamelele on GitHub).
  • Updated the fx_version to “cerulean”.
  • Removed dynamic resource naming, this caused too many problems for clients regarding key binds not working or UI elements not displaying. To help reduce the amount of key bind and UI problems, the resource is now hardcoded to use wk_wars2x as the resource name. If the resource name is not wk_wars2x, an error message will be printed to the server console, and the key binds will not be registered client side.
  • Changed the key binds system so that the commands and keys now get registered when the player first spawns in instead of when the script first loads.
  • Changed the key lock message to be clearer.
  • Reduced the default scale from 1.0 to 0.75 in config.lua.
  • Closing the remote will now close the operator menu if open.
  • Reduced the size of the server console branding.
  • Updated the copyright range in the files.
  • Removed the provided jQuery file to use the built-in FiveM jQuery library.
  • A plethora of other code refactors, additions, and deletions. If you would like to see a list of all changes, view the GitHub repository.

Fixes

  • Fixed spamming the power button breaking the radar display.
  • Fixed the fast display operator menu option being ignored on radar power up.

1.2.4

  • Attempted a workaround for users with control issues, RegisterKeyMapping doesn’t always seem to register properly. Needs further testing, but the workaround has had positive results so far.
  • Updated the FX manifest version.

1.2.3

  • Replaced the multi-keyboard control system with FiveM’s key mapping, this means that every client can set their own keys in GTA’s key bindings menu. (thanks @BlockBa5her)
  • Adjusted the display update interval, instead of 20 times a second it is now 10.
  • Fixed the heading check.

1.1.2

  • Fixed a bug that caused the speeds of aircraft and boats to be detected and displayed.
  • Removed the saves directory to avoid confusion

1.1.1

  • Fixed a bug that caused the fast target windows to display inaccurate speeds. (There were some instances where the fast target windows would display a speed that would be slightly less than the strong target windows, this was due to a bug in the code that accidentally increased the strong target speed ever so slightly in the speed check. This resulted in fast target speeds being displayed that were actually less then the strong target speeds.)

1.1.0

  • Removed the current save system and replaced it with clientside KVP saving
  • If a target vehicle is not coming towards or going away from the patrol vehicle, the speed will no longer be displayed (Thanks @ryans1230 on GitHub for the pull request)
  • Added networked event for triggering the remote to open (wk:openRemote)
  • Operator menu settings now get saved and loaded like with the UI settings
  • Adjusted the radar and plate reader default positions to exclude the hard coded safezone
  • Fixed some spellings
  • Fixed keybinds working in pause menu
  • Fixed operator menu bugging out when the power was reset
  • Added first time quick start video with config option
  • Added command to “reset” KVPs (/reset_radar_data)
  • Changed version check message
  • Fixed QSV message not appearing if you pressed ESC or RMB when it was active
  • QSV must be closed for the system to register it as watched

1.0.0

  • Initial release

FAQ and troubleshooting

How do I use the fast limit locking like with WraithRS?
By default, fast limit locking is disabled and must be enabled in config.lua. Once enabled, head ingame and power the radar. Press the MENU button to enter the operator menu, and then keep pressing the MENU button until you get to an option that says “FAS Loc”, the patrol window should say “OFF”. Press either of the XMIT | HOLD buttons to change the value to “On”. Press the MENU button again to go to the next option that says “FAS SPd”, press either of the XMIT | HOLD buttons to change the value to the fast limit that you want.

Does this support ESX or vRP?
No, this is stand-alone, and it always will be stand-alone. You can add in your own job checks or whatnot.

The remote won’t open when I’m sat in an addon vehicle!
The addon vehicle most likely doesn’t have the vehicle class set to VC_EMERGENCY, open your vehicles.meta file for the addon vehicle, and check that the class is correct.

The remote won’t open at all, what can I do?
First of all, make sure key lock is not enabled, press the “L” key and make sure the message that appears says “Radar key lock disabled”. If key lock was already disabled, try restarting your game, and if it still doesn’t work, restart your computer. There are rare circumstances where you may need to reset your key bindings in GTA’s settings.

My game crashes when I try to use mouse control in a land/air vehicle?
There is currently a bug with FiveM that causes the game to crash if a key bind set with the RegisterKeyMapping function is the same as a vehicle movement key. There is a temporary solution though, go into your key bindings menu and change the radar’s keys to anything that isn’t the same as a vehicle’s movement key.

“Warning: Resource wk_wars2x does not specify an fx_version in fxmanifest.lua”
If you’re using version 1.2.4 or above and are getting this error in your server console, it is most likely that your server is outdated. Update it to the latest recommended FXServer version, or in the case you can’t update it for mod support reasons, open the fxmanifest.lua file and change fx_version 'bodacious' to fx_version 'adamant'

My keybinds still don’t work after trying the above steps, what can I do?
In rare cases, it may be necessary to remove the custom binds from your FiveM configuration file so that the resource can create them again. Open Windows Explorer and navigate to C:\Users\<username>\AppData\Roaming\CitizenFX and open the file named fivem.cfg with a program like Notepad++. Once open, delete all of the lines that start with rbind wk_wars2x, for example, all of mine are:

rbind wk_wars2x KEYBOARD L "radar_key_lock"
rbind wk_wars2x KEYBOARD NUMPAD5 "radar_bk_ant"
rbind wk_wars2x KEYBOARD NUMPAD6 "radar_bk_cam"
rbind wk_wars2x KEYBOARD NUMPAD8 "radar_fr_ant"
rbind wk_wars2x KEYBOARD NUMPAD9 "radar_fr_cam"
rbind wk_wars2x KEYBOARD F5 "radar_remote"

Now join your server and hopefully your keybinds will start working again, if they still don’t after you’ve tried EVERYTHING listed, contact me.

When I click “Toggle Display” for the radar or plate reader, nothing happens?
This is a really odd issue and so far there is no reliable fix as there is no repro. Some of the things to try include:

  • Restart FiveM
  • Type /reset_radar_data in chat, then fully restart FiveM without opening the remote
  • Not sure why this sometimes works, but go into you GTA V graphics settings, and click “Restore Defaults”

Future features

The following is a list of features that will be implemented in the future:

  • Doppler style audio
  • Passenger control - 1.3.0
  • Operator menu option saving - 1.1.0

Licence

This resource was created using the MIT Licence.

I would appreciate it if you would consider the following requests:

  • Please do not reupload this resource anywhere else without permission from me. If you wish to add more to the resource, create a pull request on the GitHub page.
  • Please do not claim this resource as your own.
  • Please do not sell this resource.
  • If you want to use elements of code from this resource for another release, send me a PM requesting permission.

Special thanks

I’d like to thank Dammit Dave and OCRP (@ocrp), and also Bxbugs123 and HighSpeed-Gaming (@Bxbugs123) for helping me to test the really early beta version of the radar.

I’d also like to thank the following people for thoroughly testing and giving feedback during the closed beta:
InfinityRP (mrdigital0)
cverhalen788 (Mist Designs)
sobo
BMaguire (SemperDeadly)
HighRez
stickybombz
megamachine
Trxspass
Scully7402
buy_and_sell_ebay
pol
Alexander_Garbe
Hayden_Williams
Falcoon
Pezbian
cryptobash
Scaredykattl
PhycoRebelGaming
WildFyr
Geerdodagr8
OhMcGawGaming
Justin_Holt

(Sorry I couldn’t tag you, there is a 10 limit)

Credits and additional notes

  • Me (WolfKnight) - Creating and coding the resource
  • @IllidanS4 - His handy entitiyiter
  • @Scott_UK - Help on some early ideas
  • randomsean - His RS9000’s JS was a much better improvement on WraithRS, which gave me more ideas! Thanks randomsean!
  • InfinityRP (mrdigital0) - Help with ideas and bug fixing
  • Fonts used: Segment7, Heebo, Penitentiary Gothic

I’d also like to thank @Digger and @ConductorWon for their help in providing support to users and aiding in the running of our Discord server.

If you are a vehicle modeller, a good friend of mine, Senpai Designs (@IIzDann), has created a Wraith ARS 2X model in Zmodeller that can be placed into vehicles. He has given me full permission to upload this here, instead of a separate post.

Wraith_ARS_2X_Radar_Senpai_Designs.rar (4.9 MB)


Pssst, click me!

By the way, this is standalone and does not depend on any bloody framework! Think about it, if you sat down in a police car in real life, if you knew how, you could use that radar. Magic.

109 Likes

Amazing radar, Glad i was able to help out with beta testing this bad boy!

4 Likes

Thank you for testing it!

1 Like

LETS GO GAMERS, A SCRIPT WORTH OUR TIME
(20 characters)

1 Like

Amazing, can’t wait to use!

1 Like

assustado

8 Likes

Amazing release!! Great work, testing in my server soon.

1 Like

This is how you know a lot of people have been looking forward to this script XD
Amazing work man.

6 Likes

Looks amazing. Installing now. Thank you for all the hard work.

3 Likes

Daaaaamn it look nice! Thank you for this amazing release!

1 Like

This is really nice. Amazing job.

2 Likes

Thank you.

2 Likes

Another amazing release! Nice job Wolf!

4 Likes

Love the resource, but don’t the MIT License and your License restrictions conflict? Just curious. I get your intent behind it but your personal license requirements conflict directly with MIT License.

1 Like

Cant wait to use/put in Cars. Looks nice

1 Like

I understand your point, the additional terms I added are more as a guide and a courtesy than anything else. Part of what I wrote also already falls directly under the resource rules anyway. You do make a good point though, I may need to revise the licence.

1 Like

@WolfKnight179 out of curiosity, and maybe I missed it somewhere, is there a way to set a speed limit like in the previous radar, so the unit alerts you?

Check the top of the config file, there’s an option to allow the fast limit operator menu option. It’s disabled by default to be more realistic.

Ah, I see it, thank you very much

1 Like

This script is amazing thanks for the realese

1 Like