AI Core

Essentials

The framework and the scripts every server needs - characters, database, inventory, HUD, chat, voice and more.

ai-core

The framework itself.

  • Accounts and characters. Players are identified by their FiveM account. Several characters per account, set in the panel; deleting can be turned off.
  • Character screen. The characters stand in a real scene of the city (each in their own look); the camera glides to the picked one. Creating a character asks for name, birth date, sex and nationality.
  • Choosing where to appear. Optional: after picking a character, a list of places (the last location and the places you set) appears over the scene.
  • Money. Cash, bank, black money and crypto by default, more accounts in the panel. Every change is written with a ledger row; job and gang accounts too.
  • Jobs and gangs. Several jobs and gangs per character (limits in the panel), one job on duty at a time, salary only from the on-duty job. Prime time is on by default: outside its hours (18:00 to 01:00 by default) salaries drop to half; the hours, the cut and the switch are in the panel.
  • PvP. Whether players can hurt each other is one setting (General, on by default); admins flip it in game with /togglepvp.
  • Admin panel for everything (see Admin panel), logs to the console, Discord, Fivemanage or FiveM Stats, update checks of every script, script recommendations.
  • Shared UI every script uses: notifications, the progress bar (one cancel key for all), menus, input dialogs, key hints on the HUD, the item picker for admins.
  • Keys screen. The radial menu's Keys entry shows a keyboard with every key that does something (with the player's own bindings), a search over actions, and what the key under the pointer does.
  • Bridge. ESX, QBCore and Qbox scripts run on AI Core unchanged (see Compatibility).

ai-mysql

The database engine. Every ai-* script runs its own small connection pool; ai-mysql also stands in for oxmysql, mysql-async and ghmattimysql, so third-party scripts keep working. Do not install oxmysql next to it. Each script creates and updates its own tables at start.

ai-lib

The shared player UI every script uses: notification cards, the progress bar and its cancel key, the prompts on the right and the interaction key, menus, input dialogs, and the lockpick and skill check minigames. It runs without ai-core, so other resources can use it on their own. It also carries the AI Core helpers for resources that do not bundle them: Lua resources add shared_script '@ai-lib/init.lua' and use aiLib.notify, aiLib.Points, aiLib.addCommand, aiLib.progress and more; JavaScript resources load @ai-lib/dist/client.js or server.js. See the lib.

ai-loading

The loading screen: your server name, subtitle and tagline from the General settings, a background picture, the loading progress and tips you write in the panel. It closes itself when the character screen is ready.

ai-appearance

Character creator for new characters (in a private room), clothing shops and barbers at places you set, outfits, prices per shop. Character screen portraits come from it.

ai-inventory

A grid inventory with weight and slots, a separate hotbar, drops on the ground, stashes, vehicle trunks and gloveboxes (an owned vehicle's trunk stays with the vehicle, whatever plate it wears), shops (with NPCs and job locks), crafting benches with recipes, weapons as items, rarities with colours, and the character drawn next to the inventory. It answers the ox_inventory and qb-inventory APIs.

ai-hud

Health, armour, hunger, thirst and stress, money, the job, the street name, a speedometer with fuel and seatbelt warning, voice range and radio, and the key hints of the moment. Players set its look in a settings menu (radial menu, HUD). Needs are stored on the character and read by QB scripts too.

ai-chat

Chat with channels (everyone, nearby, job), command suggestions for only the commands a player may use, colour codes, and the FiveM chat API for other scripts. /ooc and /me (an action over your head) reach the players around you.

ai-voice

Proximity voice with ranges, radio channels (job channels locked to the job), phone calls, on both FiveM Legacy (Mumble) and FiveM for GTA V Enhanced. Stands in for pma-voice.

ai-radialmenu

The radial menu (F3): built-in actions, vehicle actions and the items other scripts add (police menu, sentence time, HUD settings, key list...).

ai-target

Markers on what you can interact with (the target style). Scripts choose nothing: the owner picks prompt or target in the panel and every script's places follow. Answers the ox_target API.

ai-scoreboard

Hold Home (or press it to open and close, chosen in the panel): players online, on-duty counts per job and, if you allow it, names and ids.

ai-weathersync

Time and weather the same for everyone: clock speed, start hour, frozen time, weather cycle and blackout in the panel, weather regions. Inside interiors scripts pause the sync through AI Core, whatever weather script you use.

On this page