I’ll have to add spawn logic that looks for a location that is in the water and then spawn units there. I kinda forgot boats existed when I wrote this haha (I rarely use them in GTA).
Ok lmao
Hello @0-fenix-0 , I’m having a small issue with this part of the code. I’m trying to make it so that when a user is taken down by the police, their inventory is cleared (for example), but the problem is that when they are taken down, the wanted level is removed, so the loop ends before it can continue executing the code to clear the inventory. My question is, is there any way to keep the wanted level for a few more seconds so the loop continues working? Or is it something inherent to GTA?
Edit: I have added exaggerated values to “Config.endWantedCleanupTimer,” “Config.scriptFrequencyModulus,” and “Config.scriptFrequency,” but it still clears the wanted levels instantly.
Hello. Thank you very much for this script.
However, I have a problem: the first call to the police after a server restart works well, even if there are other criminal players nearby. However, after we were killed/in the hospital, we again try to provoke police aggression by shooting everything around. Wanted stars appear, but the NPCs themselves and their cars simply spawn in the distance and disappear after a second. But as soon as we move away from each other beyond the limits of visibility, the police begin to work correctly again (cars drive towards me and do not disappear).
ESX version ? ![]()
here
Hi buddy, this ESX version has errors and can’t be used. Can you fix it ?
This script is bad ass! One thing, how can we get rid of the police tasers? We’ve searched everywhere and tried blacklisting and we’re still getting tased. Players are bitching cuz they’re stuck on the ground forever and it’s causing them to combat log and quit.
esx also please
First off… Thankyou! Love the script…
Cayo Islands > causes a crash the second you kill a ped that notifies… - infinite loop error
Im guessing this is the Police vehicle check before spawn that causes it… Im hopinh anyone here has an idea how to add Cayo into for an area spawn?
Is it possible to add an event to trigger arrests and/or jailing players if killed or caught by the AI?
Maybe somekind of surrender function if you have your hands up?
how can i add this to qb-bankrobbery once i hack the first door?
did you get a fix?
Hi everyone. Just wanted to let everyone know I will be on hiatus for a while. This mod was our last project together before the baby came, and being a parent is apparently really time consuming… haha!
The source code is available on git hub and anyone is free to make a fork and work on it.
I will look through this thread and fix bugs when I get back into it, but I wont know when that will be.
is it possible for the police to respond to robberies or car thefts?
I think it should be for bank and house robberies using qb-core but you will have to use the exports. See the addition from Tunsworthy in the readme here:
Unfortunately Im using ESX
Fenix Police AI Setup Finished for Robbery Script!
I connected the lation_247robbery script with Fenix Police AI, and it’s working 100%.
When robbery starts, after 1 minute, the player gets wanted level 3.
Fenix AI police respond automatically (no need for real cops online).
Fully tested and working! How to Enable Fenix Police AI for lation_247robbery Robbery Script (QBCore)
Requirements:
fenix-policeresource installed and startedlation_247robberyrobbery script working- You are using QBCore framework
Step-by-Step Setup:
1. Make Sure Fenix-Police is Installed and Working
To test it:
- Add a test command at the bottom of any server script (e.g.,
server/main.lua) to manually trigger wanted level:
lua
CopyEdit
RegisterCommand("testwanted", function(source)
TriggerClientEvent('fenix-police:client:SetWantedLevel', source, 3)
end)
Type /testwanted in F8 and make sure AI police respond with wanted level 3.
2. Find the Robbery Start Callback in lation_247robbery
Inside:
lua
CopyEdit
[qb]/lation_247robbery/server/main.lua
Look for this code:
lua
CopyEdit
lib.callback.register('lation_247robbery:StartRobbery', function(source)
Scroll to the section:
lua
CopyEdit
-- Start the robbery process
GlobalState.started = true
3. Delay the Fenix Police Response by 1 Minute
Replace this:
lua
CopyEdit
TriggerClientEvent('fenix-police:client:SetWantedLevel', source, 3)
With this:
lua
CopyEdit
SetTimeout(60000, function() -- 1 minute delay
TriggerClientEvent('fenix-police:client:SetWantedLevel', source, 3)
end)
4.
Final Robbery Code Block Example:
lua
CopyEdit
-- Start the robbery process
GlobalState.started = true
-- Delay AI police by 60 seconds
SetTimeout(60000, function()
TriggerClientEvent('fenix-police:client:SetWantedLevel', source, 3)
end)
if not states[identifier] then states[identifier] = {} end
states[identifier].state = 'in_progress'
states[identifier].started = os.time()
What Happens in Game:
- When a player starts a robbery,
- AI police will spawn after 60 seconds,
- With wanted level 3, causing Fenix AI police to respond.
hey dude, In the configuration that comes with the mod, many important things like ‘police support’, ‘police roadblock’, ‘swat vehicles’ are disabled. However, since you shared the mod with us like this, I think the mod will work even if they are disabled, otherwise you wouldn’t have shared it like this. Still, I’m wondering what will change if I fix the options that are ‘false’ here?
Hey man, the script is good but when luxart vehicle control is installed some police officers drive silently without turning on the siren. Is there a way to fix this?
