Greetings FiveM Community!
I’ve been searching for something like this for a while and found nothing, so here’s my version for you. Players with the police job can instruct other vehicles to stop. The drivers receive a customizable notification. Additionally, an audio cue is played for both the police officer and the driver who is supposed to stop. You can also replace these audio files as needed. Furthermore, there’s a subtle visual effect that can be adjusted in intensity or disabled altogether.
Police officers see a marker in front of the vehicle they want to instruct to stop, and the cooldown for this action can be customized.
Enjoy using this script, which aims to enhance every pursuit!
Config
config = {}
config.framework = 'qbcore' -- Change this to your 'esx' or 'qbcore'
config.playerLoadedEvent = 'chars:loadAppearance' -- 'esx:playerLoaded' for esx, 'QBCore:Client:OnPlayerLoaded' for qbcore or whatever your MultiCharacter framework uses
config.esxobject = function()
ESX = exports['es_extended']:getSharedObject()
end
config.qbobject = function()
QBCore = exports['qb-core']:GetCoreObject()
end
config.jobs = {
'police',
'sheriff',
}
config.distance = 50.0
config.cooldown = 5000 -- Cooldown in ms till player can Call Driver again
config.textui = function()
--exports["interakt"]:Show("Press E to request the driver to stop")
--Esx.Shownotification("Press E to request the driver to stop")
QBCore.Functions.Notify("Press E to request the driver to stop")
end
config.closefunction = function()
--exports["interakt"]:Close()
--return (if not using TextUI)
end
config.stopvehiclemessage = "Stop the Vehicle now!"
|-------------------------------------|----------------------------|
| Code is accessible | No |
| Subscription-based | No |
| Lines (approximately) | 600 |
| Requirements | ESX / QB |
| Support | Yes/No |