[QBCORE/ESX][STANDALONE][PAID] Bait-Car V2

:beginner: Info

  • Deploy bait-car trackers on automobiles and place them in locations where they are susceptible to theft. The bait-car can be operated from a remote location, enabling the toggling of the engine, securing the doors to prevent the suspects from entering or exiting the vehicle, and observing the interior of the vehicle through a concealed camera. The system is fully SERVER synchronized with a comprehensive configuration file, which enables integration with various frameworks.

:beginner: Features

  • Incredibly extensive configuration file allowing great control over the resource and its functionality
  • QBcore, ESX, OR Standalone (Framework Independent)!
  • Ability to use different permission systems: Ace permissions, Discord roles, command, QBCore jobs, custom or no authentication at all!
  • Ability to choose between NativeUI menu, ESX menu, QBCore menu, or add your custom menu yourself (RageUI Menu Update Coming Soon)
  • Ability to choose from different notification systems: GTAV, VCore-Noti, OkOkNotify, T-Notify, skeexsNotify, Infinity Notify, B-Notify, Atom Notify, Mythic Notify, QBCore, ESX, or add your custom notification calls! If you don’t know how, make a request and I’ll add it in for you!
  • Everything is Server-Synced! all online LEO officers are able to view and control the bait-cars
  • an Infinite number of bait-cars possible! Or restrict the number via the config on a server bases and/or a player bases
  • Easy-to-use menu for controlling the bait-cars with keybinds and remapping
  • COMPLETE REWRITE OF first attempt, more safely and efficiently written
  • Included languages: English, *Spanish, *French, *Dutch, *Russian, *Bulgarian, *German : (*AI Generated) (Hungarian, Italian, Polish, Swedish Updates Coming Soon)
  • Translatable language file, easy to change language file add your own if needed

:beginner: Menu Options

  • Set Vehicle As Bait-Car : Toggle’s the current vehicle that you’re in as a bait-car. If the current vehicle is set as a bait-car already, it will remove it as a bait-car
  • Toggle Engine : Toggle’s the selected bait-cars engine on / off
  • Toggle Vehicle Locked : Toggle’s the vehicle’s doors locking them trapping all people inside and preventing anyone from entering from the outside
  • Toggle DashCam : Peek inside the bait-car vehicle
  • Toggle Notification : Toggle a notification to appear when suspects enter the bait-car (client only)
  • Toggle Blip : Toggle the bait-car blip to turn it on or off (client only)
  • Bait-Car Selector : Select the bait-car you want to control

:beginner: Requirements

NOTE: not all of these requirements are required, only install the resources that you need. If you are using QBCore or ESX frameworks then you will not need any Discord Permission resources or NativeUI for the menu - unless you want to use those options!

If you are confused about which files you need, please refer to the Installation Guide and Customization Guide found below!

For Discord Permissions

  1. [discordroles] : Discord permission checking

  2. [hqly_perms] : wrapper for discordroles

OR alternatively,

  1. [Badger Discord API] : Discord permission checking with built-in caching negating the need for the combination of hqly_perms and discordroles resources together.

For NativeUI Menu

  1. [NativeUI] : Menu API.

For QBCore

  1. [QBCore Framework] : QBCore framework

For ESX

  1. [ESX Framework] : ESX framework

Supported Notification Frameworks

[OkOkNotify] [VCore-Noti] [T-Notify] [skeexsNotify] [Infinity Notify] [B-Notify] [Atom-Notify]
[Mythic Notify]
[QBCore] Built-in QBCore notification system
[ESX] Built-in ESX notification system

:beginner: Installation Guide

Standalone (Framework Independent)
  1. make sure you have NativeUI installed and running
  2. install hqly_baitcar_v2 into your resources folder
  3. edit fxmanifest.lua and uncomment line #25: '@NativeUI/NativeUI.lua',
  4. edit config.lua
  • change menuType to nativeui
  • change notificationFramework to gtav
  • change permissionType to either ace, command, or none
  • change itemFrameWork to none
  • ensure requireItem is set to false
  1. Follow the specific permissions framework guide found below

QBCore
  1. make sure you have QBCore installed and running
  2. install hqly_baitcar_v2 into your resources folder
  3. edit fxmanifest.lua and comment line #25: '@NativeUI/NativeUI.lua',
  4. edit config.lua
  • change menuType to qbcore
  • change notificationFramework to qbcore
  • change permissionType to either qbcore, ace, command, or none
  • change itemFrameWork to qbcore
  • ensure requireItem is set to false
  • edit allowedRoles and put any job names you wish to be able to open the menu

If you wish to require an item to use with the bait-car:

  1. install baitcar.png into qb-inventory/html/images
  2. edit config.lua
  • ensure requireItem is set to true
  1. item name is: baitcar_tracker

ESX
  1. make sure you have ESX installed and running
  2. install hqly_baitcar_v2 into your resources folder
  3. edit fxmanifest.lua and comment line #25: '@NativeUI/NativeUI.lua',
  4. edit config.lua
  • change menuType to esx
  • change notificationFramework to esx
  • change permissionType to either esx, ace, command, or none
  • change itemFrameWork to esx
  • ensure requireItem is set to false
  • edit allowedRoles and put any job names you wish to be able to open the menu

If you wish to require an item to use with the bait-car:

  1. run hqly_baitcar.sql on your SQL server, replacing DBNAME with the database associated with your ESX server
  2. edit config.lua
  • ensure requireItem is set to true
  1. item name is: baitcar_tracker

Permissions Framework Guides

Ace Permissions

  1. edit config.lua
  • change permissionType to ace
  1. in your server.cfg add the appropriate ace permissions.
  • IE: add_ace group.police command.baitcar allow (make sure the command matches the command you have set in the config)

Discord Permissions

  1. install & configure discordroles and hqly_perms: refer to Requirements section found above
  2. edit config.lua
  • change permissionType to discord
  1. place any desired Discord role IDs into allowedRoles

Discord BADGER Permissions

  1. install & configure badger_discord_api
  2. edit config.lua
  • change permissionType to discord-badger
  1. place any desired Discord role IDs into allowedRoles

Command Permissions

  1. edit config.lua
  • change permissionType to command
  • change commandPassword to your own password
  1. authenticate in-game via /bc_onduty <password> (if you didnt change the default onDuty command)

QBCore Permissions

  1. install & configure QBCore
  2. edit config.lua
  • change permissionType to qbcore
  • edit allowedRoles to include any job roles names you wish to be able to open the menu

ESX Permissions

  1. install & configure ESX
  2. edit config.lua
  • change permissionType to esx
  • edit allowedRoles to include any job roles names you wish to be able to open the menu

No Permissions

  1. edit config.lua
  • change permissionType to none

ADVANCED

Custom Permissions

  1. edit config.lua
  • change permissionType to custom
  1. find function canAccessMenu in client/auth.lua
  • find line: elseif config.permissionType == 'custom' then and add your verification call there, return true if can access menu

Notification Framework Guides

GTAV

  1. edit config.lua
  • change notificationFramework to gtav

OkOkNotify

  1. install & configure OkOkNotify
  2. edit config.lua
  • change notificationFramework to okok

VCore-Noti

  1. install & configure VCore-Noti
  2. edit config.lua
  • change notificationFramework to vcore

T-Notify

  1. install & configure T-Notify
  2. edit config.lua
  • change notificationFramework to tnotify

B-Notify

  1. install & configure B-Notify
  2. edit config.lua
  • change notificationFramework to bnotify

Infinity Notify

  1. install & configure Infinity Notify
  2. edit config.lua
  • change notificationFramework to infinity

Atom-Notify

  1. install & configure Atom-Notify
  2. edit config.lua
  • change notificationFramework to atom

skeexsNotify

  1. install & configure skeexsNotify
  2. edit config.lua
  • change notificationFramework to skeexs

Mythic Notify

  1. install & configure Mythic Notify
  2. edit config.lua
  • change notificationFramework to mythic

QBCore

  1. install & configure QBCore
  2. edit config.lua
  • change notificationFramework to qbcore

ESX

  1. install & configure ESX
  2. edit config.lua
  • change notificationFramework to esx

ADVANCED

Custom Notifications

  1. edit config.lua
  • change notificationFramework to custom
  1. find function doNotification in config.lua
  • find first instance of if config.notificationFramework == 'custom' then and add your success notification call under hat line using variable msg as the message text
  • find second instance of if config.notificationFramework == 'custom' then and add your error notification call under that line using variable msg as the message text

:beginner: Config File Explained

NOTE: if an option is left blank, that means that you can change it to anything!

Configuration Explanation Options
menuType Will determine the menu framework type to use nativeui, qbcore, esx
commandPassword Will authenticate the player WITH the onduty command
notificationFramework Notification framework that will be used to notify the player gtav, vcore, okok, qbcore, esx, atom, bnotify, infinity, skeexs, tnotify, mythic, custom
permissionType Permission system to use to authenticate roles/jobs discord, ace, none, qbcore, esx, command, custom
allowedRoles The job names or Discord role IDs that can open the menu
dashCamAnimationActive If true will play an animation when looking through the dashcam of a bait-car true/false
dashCamAnimationDict ADVANCED CONFIG: Animation dictionary and animation to use when player views a dashcam
dashCamTabletProp ADVANCED CONFIG: Prop that is spawned and attached to player when viewing a dashcam
maxNumberOfBaitCars Max number of server bait-cars, 0 = infinite 0 - 9999999
maxPlayerBaitCars Max number of player set bait-cars, 0 = infinite 0 - 9999999
requireItem If true will require an item in inventory to use the bait-car (QBCore and ESX only) true/false
consumeItemOnUse If true will remove the item from player inventory when installing a bait-car tracker (QBCore and ESX only) true/false
itemFrameWork Item framework system to use for inventory qbcore, esx, none
commands.openMenu Command used to open the Bait-Car menu
commands.onDuty Command used to authenticate player with command based permissions
enableKeybinds Enable or disable keyboard and controller keybinds to open the menu true/false
keybinds.keyboard Keybind to open the menu on keyboard. Leave blank to disable keybind for keyboard Default QWERTY Controls or “”
keybinds.controller Keybind to open the menu on controller. Leave blank to disable keybind for controller Xbox Controller Controls or “”
menuLocation X, Y location of the menu. Only for NativeUI vec2(0-1500, 0-1000)
blipSprite Blip sprite ID to use to mark bait-cars. Blip sprite IDs can be found here 0-826
blipColour Blip sprite colour ID to use to mark bait-cars. Blip sprite colour IDs can be found here 0-85
debugMode Spit debug info into console true/false

:beginner: Commands (How to OPEN the menu)

Note: commands are modifiable through the config

Command Use Case
/baitcar opens the menu
/bc_onduty if permission type is set to command, this will be the command used to authenicate via the password. IE: /bc_onduty <password>

:beginner: Preview

Video:

NOTE: this is a an older video, but the functionality is more or less the same.


Images:

QBCore Menu Images
  • QBCore Menu:

  • QBCore Menu - Selecting Bait-Car

Screenshot 2023-01-22 134617

ESX Menu Images
  • ESX Menu:

Screenshot 2023-01-28 191501

  • ESX Menu - Selecting Bait-Car

Screenshot 2023-01-28 191512

NativeUI Menu Images
  • NativeUI Menu: (NOTE: Menu Banner will be the default commonmenu.ytd texture)

Screenshot 2023-01-23 110946

  • NativeUI Menu - Selecting Bait-Car: (NOTE: Menu Banner will be the default commonmenu.ytd texture)

Screenshot 2023-01-23 110932


:beginner: Get It Here!

Available for purchase on my Tebex store for $9.99 USD! (Escrowed)
Or
Available for purchase on my Tebex Store for $49.99 USD! (Source)


:beginner: Support & Other Work

Don’t hesitate to report any issues, offer any constructive criticism, or leave a suggestion!
If you have an idea you’d love to see come to life, don’t be afraid to get in touch!
Check out my other work:
[Player Worlds] | [X-Priorities] | [Play-Time] | [Ground]


Code is accessible Yes & No
Subscription-based No
Lines (approximately) ~1494
Requirements Refer to Requirement Section Above
Support Yes
3 Likes

This looks super cool and the post is extremely well written. Good documentation, good job explaining what can be changed in config vs. (I assume) escrowed. Love to see it.

1 Like

Thank you for the nice words!
The config is fully unlocked for escrowed version, advanced modifications are also possible with escrow!
The source version is simply as it states, the fully unlocked source code!

W. Absolutely fire & super clean thank you so much you’re a legend keep ‘em coming. :fire:

I need help to fix mine please I got this problem

This is a pretty cool script. The only thing we’d really like to see added is OneSync support. When a bait car goes outside the placing player’s “bucket”, the blip and control over the bait car are lost. Additionally, random NPC cars start appearing with the bait car blip for this reason.

Need a bit of Help. We are standalone. We threw it into the server and configured it according to what it says above and we get this error and don’t quite know what to do SEMmenu is in already and using NativeUI, We don’t quite know where to go to try and fix this. We are also using BigDaddy’s Chat script.

Hey there, please find our support channels linked through our Tebex store! We will be able in assisting you to resolve any issues you might be experiencing!

Thank you for the amazing feedback! I will have to start development to get these features incorporated :blush: