Agency Docs
QBESXStandalone

Agency-Shops Exports & API

Every 24/7, LTD, Rob's Liquor, hardware store, Ammu-Nation and gas station on the map in one script for FiveM.

v1.0.0Paid5 PagesFrom October 19, 2026, 20:00 CEST

01Client Exports

ExportDescription
GetFuel(vehicle)The fuel level of a vehicle from 0 to 100, in the same way LegacyFuel returns it.
SetFuel(vehicle, level)Sets the fuel level of a vehicle, from 0 to 100.

02Server Exports

ExportDescription
GetOwner(id)The owner identifier and the owner name of a store or gas station, or nil when nobody owns it.
AddStock(id, item, amount)Adds pieces to the stock of an owned store, up to Config.Ownership.MaxStock. Returns true when it worked.
AddFuelStock(id, litres)Adds litres to the tank of an owned gas station, up to Config.GasStations.MaxFuel. Returns true when it worked.
GetBalance(id)The money in the register of an owned store or gas station, or nil.

03Events

NameSideDescription
agency-shop:server:purchasedServerFires with (source, storeId, items, total, account) after a purchase went through. items lists what was handed over and total is what was paid, so a stats or mission script does not have to poll.
agency-shop:server:shopliftServerFires with (source, storeId, value, coords) when a player walks out of a store with unpaid goods in the basket or trolley. With Config.Dispatch.System = 'event' this is the only alert, so your own dispatch script can pick it up.

+Good to know

Agency-Shops offers a few exports and two server events, so your own fuel, supply, dispatch and statistics scripts can work with the stores.

Fuel Level
GetFuel and SetFuel on the client work like the calls of LegacyFuel, with a level from 0 to 100. Scripts made for LegacyFuel only need the resource name changed.
Owners and Stock
GetOwner and GetBalance read an owned store or gas station by its id. AddStock and AddFuelStock add pieces or litres, for example from your own supply or job script.
Events
agency-shop:server:purchased fires after every purchase with the player, the store, the items, the total and the account. agency-shop:server:shoplift fires when a player walks out with unpaid goods.

?Frequently asked questions

How do I read the owner of a store?

On the server call exports['Agency-Shops']:GetOwner(id). It returns the identifier and the name of the owner, or nil when the store is not owned.

How do I send my own police alert for shoplifting?

Set Config.Dispatch.System = 'event' and listen to agency-shop:server:shoplift. It gives you the player, the store id, the value of the goods and the coordinates.

Still stuck after this page? Our support team takes it from here.