AI Core

All scripts

Every ai-* script that comes with AI Core, how the categories work, and where each script's page is.

AI Core comes with around forty ai-* scripts. Together they make a full roleplay server: characters, money, an inventory, a HUD, vehicles, jobs, police, crime and housing. You do not have to use all of them.

How the scripts fit together

  • Each script is its own resource. It has its own folder in resources/[ai]/ and its own ensure line in server.cfg. Remove the line and the script is gone.
  • Every setting is in the admin panel. Each script adds its own tabs to the admin panel (press F10 in the game). You never edit a config file.
  • Scripts talk through AI Core. When a robbery gives an item, it asks AI Core, and AI Core hands the item to the inventory you run. The robbery script does not know whether that is ai-inventory or another inventory. This is why you can replace almost any ai-* script with a third-party script of the same kind (see Compatibility).
  • Third-party scripts keep working. Many ai-* scripts also answer the exports of the well-known script they replace. For example, ai-inventory answers exports.ox_inventory:AddItem(...), so a script written for ox_inventory runs unchanged. Each script's page lists what it stands in for.

How the categories work

The scripts are grouped by what they are for. Each category has an overview page, and each script has its own folder with two pages:

  • The script page is for server owners: what the script does in the game, how to install it, every panel setting, its commands and keys, and which third-party scripts it works with.
  • The developer page is for people writing scripts: its exports, events and state bags, with types and examples in TypeScript and Lua.
CategoryWhat is in it
EssentialsThe framework and the scripts every server needs: database, shared UI, loading screen, clothing, inventory, HUD, chat, voice, radial menu, target eye, scoreboard, time and weather.
VehiclesOwned vehicles, keys, fuel, garages, shops, used car lots, rental, mechanics and emergency lights.
Jobs and servicesWork routes, police, police alerts, prison, death and EMS, banking, boss menus and the city hall.
Crime and racingRobberies, drugs, pawnshops, scrapyards and street races.
World and toolsHousing, door locks, many small features, sleeping bodies, character size and admin tools.

Every script

ScriptWhat it does
ai-coreThe framework: players, characters and the character screen, money, jobs and gangs, permissions, the admin panel, and the ESX / QBCore / Qbox / vRP bridge.
ai-mysqlThe database engine for third-party scripts. Stands in for oxmysql, mysql-async and ghmattimysql.
ai-libThe shared player UI (notifications, progress bar, prompts, menus, minigames) and the AI Core helpers for Lua and JavaScript resources.
ai-loadingThe loading screen with your server name, a background, the loading progress and tips.
ai-appearanceCharacter creator, clothing stores and barbers.
ai-inventoryGrid inventory with drops, stashes, trunks, shops, crafting and weapons. Answers the ox_inventory and qb-inventory APIs.
ai-hudThe HUD and the needs: health, hunger, thirst, stress, a speedometer and key hints.
ai-chatChat with channels and command suggestions. Stands in for FiveM's chat.
ai-voiceProximity voice, radio and phone calls. Stands in for pma-voice.
ai-radialmenuThe radial menu on F3, with the items every script adds.
ai-targetThe target eye for interaction points. Answers the ox_target API.
ai-scoreboardPlayers online and on-duty counts per job.
ai-weathersyncTime and weather the same for everyone, with weather regions. Stands in for qb-weathersync.
ai-vehiclesOwned vehicles of characters, jobs and gangs.
ai-vehiclekeysVehicle keys, locking, lockpicking and hotwiring.
ai-fuelFuel use and gas stations.
ai-garagesGarages, job and gang fleets, impound lots.
ai-vehicleshopVehicle shops with a live preview.
ai-vehiclesalesUsed car lots: players list their vehicles, others test drive and buy.
ai-rentalVehicle rental.
ai-mechanicRepair, tuning with a preview, car washes.
ai-sirensEmergency lights, siren tones, lightbars.
ai-jobsWork routes: taxi, bus, trucker, garbage, tow and more.
ai-policePolice menu, cuffs, fines, prison and impound.
ai-policealertPolice alert cards.
ai-prisonJail sentences, prison work, escapes.
ai-deathDeath, hospitals, EMS revive.
ai-bankingBanks, ATMs, society accounts.
ai-managementBoss menu.
ai-cityhallJob center and documents.
ai-robberiesStores, banks, jewelry, houses, armored truck.
ai-drugsStreet sales and weed plants.
ai-pawnshopPawnshops and scrapyards.
ai-streetracesStreet races to a waypoint with a buy-in.
ai-propertiesHouses and apartments.
ai-doorlockDoor locks.
ai-smallresourcesSeatbelt, cruise control, crouch, sitting, carrying and many small features.
ai-exitsleepingLogged-out players stay as sleeping bodies.
ai-pedscaleCharacter height and width.
ai-adminNoclip, teleports, revive, vehicles, quick menu.

Default keys

Each player can change every key in GTA's own settings (Settings > Key Bindings > FiveM). The owner changes the starting key for everyone in the admin panel (Keybinds tab); a player who already changed a key keeps their own.

KeyActionScript
F10Admin panel (admins only)ai-core
F9Admin quick menu (admins only)ai-admin
F3Radial menuai-radialmenu
F2Inventoryai-inventory
TABQuick slots barai-inventory
1 to 5Use the item in that quick slotai-inventory
RReload the weaponai-inventory
TChatai-chat
F6Police menu (on duty)ai-police
EInteract with the prompt on screenai-lib
BackspaceCancel the running actionai-lib
ULock or unlock the vehicleai-vehiclekeys
MEngine on / offai-vehiclekeys
KSeatbeltai-smallresources
F11Voice rangeai-voice
Left AltTalk on the radioai-voice
HomeScoreboardai-scoreboard

Each script's page lists all of its keys.

On this page