AI police - QB Core

Hello,

Just wondering if there is a way to enable AI Police in QBCore. No luck as of yet. Though it would be in small resources but nothing that I can see. Tried to google the answer too but still nothing.

Is this possible and could someone tell me how?

Thanks.

5 Likes

Dont think you can could add Vmenu and make it to where only players can put on wanted level.

in the small reacources folder you could delete the ignore.lua i havent got it fully working but that got it started

qb-smallresources/ignore.lua under line 53

change EnableDispatchService(i, false) to EnableDispatchService(i, true) and on line 56

change SetMaxWantedLevel(0) to SetMaxWantedLevel(5)

Code_MUpu4cqa5t

7 Likes

The wanted system and much of police ai is disabled by qb-smallresources. Look in ignore.lua and comment out lines related to ai, the wanted system, npc spawning, etc. Also check the config.lua and comment out lines related blacklisted peds, vehicles, scenarios, etc. I got the police ai and wanted system working. If you take a job as police, they can still attack you if you get wanted. I haven’t figured that part out yet.

qb-smallresources readme

  • Removal of GTA’s default vehicle spawns (planes, helicopters, emergency vehicles etc.)
  • Removal of GTA’s default emergency service npcs
  • Removal of GTA’s default wanted system
2 Likes
  1. “You want to enable dispatch services on your server, remove any NPC cops remover script”

  2. “Search and remove this natives from your scripts:”
    HideHudComponentThisFrame(1)
    ClearPlayerWantedLevel(PlayerId())
    SetMaxWantedLevel(0)
    EnableDispatchService

1 Like

just a thought there is a relationships line of coding in qbcore what if you just added yourself to the list of who likes who. if i find it again ill post it

2 Likes

Thanks. I’m still learning lol. I messed around with relationships but I couldn’t get it to work. I tried this line

SetRelationshipBetweenGroups(0, "COP", "PLAYER")
SetRelationshipBetweenGroups(0, "PLAYER", "COP")

The police still got hostile.

1 Like

where it is for me is qb\qb-smallresources\relationships.dat
In side you will see something like this

Acquaintance options:

- Hate

- Dislike

- Like

- Respect

[AMBIENT_GANG_HILLBILLY
Respect PLAYER
Like AMBIENT_GANG_HILLBILLY GUARD_DOG
DOMESTIC_ANIMAL
Hate PLAYER
Like CIVMALE CIVFEMALE COP SECURITY_GUARD]

My relationship.dat looks like this for player/cop

COP 
    Respect MEDIC FIREMAN COP
    Respect ARMY
    Respect PLAYER
    Like SECURITY_GUARD

Do you know how relationship.dat is different from calmai.lua or SetRelationshipBetweenGroups?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.