ATY Scripts Logo
ATY Scripts/Docs/Restaurant Creator/Exports

Exports

All exports use the resource name aty_restaurant.

Server exports

RegisterDynamicConsumable(itemId, category)

Register an item as useable/consumable at runtime (wires the framework's "use item" handler to the restaurant consumption flow).

exports.aty_restaurant:RegisterDynamicConsumable('my_custom_burger', 'general')

HandleConsumption(src, itemName)

Run the biometric consumption logic for a player (allergen checks, calorie/fat debuffs) for a given item. Useful if you consume items through your own flow but still want ATY's biometric effects.

exports.aty_restaurant:HandleConsumption(source, 'chocolate_cheesecake')

Client exports

Notifications

-- type: 'success' | 'error' | 'info' | 'warning'
exports.aty_restaurant:ShowNotification(type, title, message)

Player hold state

Export Returns
IsHoldingFood() true if the player is holding a food/prop item.
GetHoldingData() itemName, propType, stage for the currently held food.
IsHoldingMop() true if holding the mop.
IsHoldingTrash() true if carrying a trash bag.
IsCarryingPizzaBox() true if carrying a (full) pizza box.
IsCarryingEmptyPizzaBox() true if carrying an empty pizza box.
if exports.aty_restaurant:IsHoldingFood() then
    local item, propType, stage = exports.aty_restaurant:GetHoldingData()
end

World queries

Export Returns
GetWaitingNPCs() Table of currently spawned/queued customer NPCs.
GetSpawnedTrash() Table of currently spawned pollution/trash entities.

Management UI

-- Open the management dashboard for a given restaurant data table.
exports.aty_restaurant:OpenManagement(restaurantData)

3D DUI / panel engine (cr3d)

For advanced integrations, the embedded cr3d engine exposes a full prop-screen API — create panels attached to entities/bones, replace a model's screen texture with a DUI, and forward input:

CreatePanel, DestroyPanel, AttachPanelToEntity, AttachPanelToBone, SetPanelUrl, SetPanelSize, SetPanelTransform, CreateReplaceTexture, SetReplaceTextureUrl, DestroyReplaceTexture, SendReplaceMessage, BeginFocus, EndFocus, SendReplaceMouseMove/Down/Up/Wheel, and more.

These are the same primitives the microwave and espresso screens use. See client/cr3d/ for the full surface.

Prefer the high-level restaurant exports above for normal integrations. The `cr3d` API is for building your own prop-mounted DUIs.
ATY Scripts LogoATY SCRIPTS

Creamos scripts de FiveM altamente optimizados para QBCore y ESX. Máximo rendimiento, código preciso, cero lag.

Unirse a la comunidad

Socio

Socios oficiales de Tebex. Pago seguro e integración con Cfx.re Keymaster.

Legal

Sin afiliación con Rockstar Games, Cfx.re, FiveM ni Take-Two Interactive. Las compras se rigen por los Términos de Servicio de Tebex.

© 2026 ATY SCRIPTS. Todos los derechos reservados.