> For the complete documentation index, see [llms.txt](https://sl-scritps.gitbook.io/sl-scripts-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sl-scritps.gitbook.io/sl-scripts-documentation/products/sl-coffee-stand.md).

# SL Coffee Stand

## SL Coffee Stand

**Code:** COF-06\
**Resource:** `sl_coffee_stand`\
**Version:** v0.1.14\
**Category:** Service RP / Business Activity / Social RP\
**Status:** Stable Candidate / Testing

**Structured tools for serious roleplay servers.**

***

### Overview

SL Coffee Stand is an interactive coffee service activity for FiveM roleplay servers.

It allows servers to create a small coffee stand experience where players can interact with a physical stand, place orders, prepare drinks, manage stock and create social roleplay around a service station.

The resource is designed to make a simple coffee stand feel like an in-world activity instead of only being a menu or command.

***

### What is this script for?

SL Coffee Stand gives servers a lightweight service-business activity that can be used in public spaces, events, cafes, streets, markets, parks or small RP businesses.

It is useful for:

* Civilian roleplay
* Coffee shop scenes
* Small business RP
* Event catering
* Social gathering points
* Staff-created events
* Player service jobs
* Public city-life ambience
* Testing future service systems

The main goal is to create a simple but immersive loop:

```txt
Customer orders → worker prepares → product is delivered → roleplay continues
```

***

### Roleplay Experience

SL Coffee Stand is designed around a clear IC idea:

```txt
There is a coffee stand in the world.
A player approaches it.
A customer places an order.
A worker prepares the product.
The customer receives the order.
```

This turns the stand into a small social point where players can interact naturally.

The script works best when players treat the stand as part of the world: a place to meet, talk, buy drinks, serve customers or prepare a small event.

***

### Player IC Usage

The player IC experience depends on the role the player is taking.

A player can be:

```txt
Customer
Worker / Barista
Business owner
Event helper
Admin testing the activity
```

For normal customers, the experience should feel simple:

```txt
Walk to coffee stand → browse products → place order → wait → receive coffee
```

For workers or baristas, the experience is more active:

```txt
Open stand → review order → prepare drink → complete steps → deliver result
```

The system is designed to create small roleplay moments, not just instant item delivery.

***

### Customer IC Flow

#### 1. The customer finds a coffee stand

The customer approaches a configured coffee stand in the world.

The stand can be placed in places such as:

* Street corners
* Parks
* Business interiors
* Event spaces
* Food markets
* Coffee shop areas
* Public meeting locations

***

#### 2. The customer opens the menu

Depending on configuration, the customer may interact using:

```txt
target interaction
draw text / fallback interaction
command fallback
```

Expected result:

```txt
The coffee stand menu opens.
```

***

#### 3. The customer selects products

The customer chooses one or more available products.

Examples:

```txt
Coffee
Latte
Espresso
Mocha
Tea
Combo items
```

The exact product list depends on server configuration.

***

#### 4. The customer places the order

The customer confirms the order.

Depending on configuration, the system may:

* Add the order to a queue
* Charge the customer
* Notify the worker
* Reserve stock
* Show order status

***

#### 5. The customer waits

The customer can stay near the stand while the worker prepares the order.

Example IC lines:

```txt
“I’ll wait here.”
“Can I get that with extra sugar?”
“Take your time.”
```

***

#### 6. The customer receives the product

When the order is ready, the customer receives the prepared item depending on inventory configuration.

The result may depend on:

```txt
product selected
quality
stock
preparation flow
server configuration
```

***

### Worker / Barista IC Usage

For workers, SL Coffee Stand creates a small service job flow.

The worker is not just clicking “give item”. The worker is operating the stand.

Common IC actions:

* Open the stand
* Review active orders
* Prepare drinks
* Manage stock
* Serve customers
* Use the stand during business hours
* Support events or gatherings
* Keep the service area active

Example IC lines:

```txt
“What can I get you?”
“Your coffee will be ready in a moment.”
“We are running low on stock.”
“Order ready.”
```

***

### Worker / Barista Flow

#### 1. The worker opens the stand

The worker interacts with the coffee stand.

Expected result:

```txt
The stand interface opens.
```

***

#### 2. The worker reviews orders

If the system is configured with orders or queue behavior, the worker can review customer requests.

This can include:

```txt
customer name
selected products
quantity
order state
price
preparation status
```

***

#### 3. The worker prepares the product

Depending on configuration, preparation may include:

* Selecting the product
* Starting preparation
* Completing preparation steps
* Using a minigame or timing system
* Producing a quality result
* Delivering the final item

The goal is to make the preparation feel like a small activity.

***

#### 4. The worker delivers the order

After preparation, the product can be delivered to the customer.

Depending on the server setup, delivery may be:

```txt
automatic
manual pickup
inventory item delivery
virtual order completion
```

***

#### 5. The worker manages stock

If stock is enabled, workers or owners may need to restock the stand.

This keeps the activity connected to economy, inventory or business management when configured.

***

### Admin / Owner IC Usage

For admins, owners or business managers, the coffee stand can be used as an in-world service station.

The admin/owner IC goal is to create a believable service point.

Common admin/owner IC uses:

* Place a coffee stand in a public area
* Prepare a small business location
* Add service RP to an event
* Create a vendor point for civilians
* Build a coffee shop atmosphere
* Give players a simple service job
* Test the full customer/worker flow
* Manage stock and permissions

Example IC/admin flow:

```txt
Choose location → place coffee stand → configure products → test order flow → open service
```

Example roleplay use:

```txt
A staff member prepares a city event.
They place a coffee stand near the gathering area.
One player acts as the barista.
Other players order drinks during the event.
```

For business roleplay:

```txt
The owner opens the coffee stand.
Employees prepare drinks.
Customers place orders.
The stand becomes a small social hub.
```

***

### Admin / Owner Technical Flow

Owners/admins should use the system to set up and test the activity before opening it to players.

Common admin actions may include:

* Place or spawn a coffee stand
* Configure interaction mode
* Configure product catalog
* Configure stock
* Configure prices
* Configure permissions
* Configure inventory items
* Configure target interaction
* Test customer order flow
* Test worker preparation flow
* Test restart behavior
* Check server console and F8

Recommended admin checks:

```txt
1. Place or enable the coffee stand.
2. Confirm the interaction appears.
3. Open the customer menu.
4. Place a test order.
5. Prepare the order as worker/admin.
6. Confirm the item or result is delivered.
7. Test stock behavior.
8. Restart the resource.
9. Confirm the stand still works.
```

***

### Example IC Scenarios

#### Street coffee stand

A player runs a small coffee stand in a public area.

```txt
“Fresh coffee here.”
```

#### Business opening

A business owner uses the stand during an opening event.

```txt
“Coffee is available at the front.”
```

#### City event

Staff places a coffee stand near an event location.

```txt
“Grab something warm before the event starts.”
```

#### Social roleplay

Players gather around the stand and use it as a casual meeting point.

```txt
“Let’s meet by the coffee stand.”
```

#### Worker RP

A player acts as a barista and prepares drinks for others.

```txt
“One latte coming up.”
```

***

### What this resource is not

SL Coffee Stand is not intended to be a full restaurant management system by itself.

It is focused on:

```txt
coffee stand interaction
service activity
orders
preparation
stock
small business RP
social gathering
```

For larger food systems, restaurants or advanced cooking loops, servers may use a broader culinary system if available.

***

### Main Features

* Interactive coffee stand
* Customer order flow
* Worker/barista preparation flow
* Product catalog
* Product quantities when configured
* Cart/order review flow
* Stock support
* Restock support
* Preparation activity
* Quality/result logic when configured
* Inventory integration when enabled
* Payment/economy integration when enabled
* Target interaction support
* Command fallback support
* Admin/owner setup flow
* Configurable products
* Configurable permissions
* Configurable notifications
* ES/EN locale support
* Clean SL Scripts style

***

### Dependencies

#### Required

```txt
FiveM server
```

#### Recommended / Optional

```txt
ox_lib
ox_target
qb-target
oxmysql
ox_inventory
qb-inventory
qs-inventory
QBCore
Qbox
ESX
Standalone mode
```

The exact dependency setup depends on server configuration.

If database persistence is enabled, `oxmysql` may be required.

If inventory items are enabled, make sure your inventory system has the configured items.

***

### Installation Notes

1. Place the resource folder inside your server resources folder.

Example:

```txt
resources/[sl_scripts]/sl_coffee_stand
```

2. Make sure the folder name is:

```txt
sl_coffee_stand
```

3. Configure:

```txt
config.lua
custom.lua
locales/
```

4. If the resource includes SQL and database mode is enabled, import:

```txt
sql/install.sql
```

or use automatic migrations if supported by your build.

5. Add the resource to your `server.cfg`.

Example:

```cfg
ensure oxmysql
ensure ox_lib
ensure ox_inventory
ensure ox_target

ensure sl_coffee_stand
```

If you are not using target or inventory integrations, configure the fallback modes in `config.lua`.

***

### Item Setup

If inventory mode is enabled, make sure all configured products exist in your inventory system.

Example product items may include:

```txt
coffee
latte
espresso
mocha
tea
```

The exact item names depend on your `config.lua`.

Important:

```txt
The item name in config.lua must match the item name in your inventory system.
```

If the stand itself is usable as an item, make sure the configured stand/cart item also exists.

***

### Product Catalog

The product catalog defines what the stand can sell or prepare.

Products may include:

```txt
label
item name
price
category
stock cost
preparation steps
quality settings
effects
metadata
```

The catalog should be configured according to your server economy.

Recommended:

```txt
Start with a small menu.
Test all products.
Add more products after the base flow works.
```

***

### Stock and Restock

If stock is enabled, the stand may require supplies before products can be prepared or sold.

Stock can be used to support:

* Business management
* Economy balance
* Restock jobs
* Event preparation
* Limited service availability

Example IC line:

```txt
“We need to restock before taking more orders.”
```

If stock is disabled, the stand can work as a simpler service activity.

***

### How to Use

#### Basic Customer Flow

1. The customer approaches the coffee stand.
2. The customer opens the menu.
3. The customer selects products and quantity.
4. The customer reviews the order.
5. The customer confirms the order.
6. The worker prepares the order.
7. The customer receives the product.

#### Basic Worker Flow

1. The worker opens the stand.
2. The worker reviews pending orders.
3. The worker starts preparing a product.
4. The worker completes preparation.
5. The product is delivered or made available.
6. The worker continues serving customers.

#### IC Summary

```txt
Customer orders → worker prepares → coffee is delivered → RP continues
```

#### OOC / Technical Summary

```txt
Player interaction → server validates order → stock/payment checked → preparation starts → result delivered
```

***

### Commands

Command names may depend on configuration.

Common command examples:

```txt
/coffee
/sl_coffee
/sl_coffee_admin
```

Check `config.lua` for the exact command names used by your installed version.

Commands are useful as fallback access, testing tools or admin shortcuts.

***

### Permissions

Permission setup depends on server configuration.

Common permission levels may include:

```txt
view
use
manage
admin
owner
```

Recommended access logic:

```txt
Customers = browse/order
Workers = prepare/manage active orders
Business managers = manage stock/products if configured
Admins = place/test/reset/manage
Owners = full access
```

Permissions may use:

* Ace permissions
* Framework groups
* Jobs
* Job grades
* Config admin list
* Custom permission bridge

Check `config.lua` and `custom.lua` for your server setup.

***

### Configuration

Open:

```txt
config.lua
```

Common settings may include:

```txt
Product information
Locale
Debug mode
Startup logs
Framework mode
Inventory mode
Target mode
Notify mode
Command settings
Coffee stand model
Interaction distance
Product catalog
Prices
Stock settings
Preparation settings
Order settings
Payment settings
Permissions
Admin settings
Database settings
Webhook/log settings
```

Recommended for production:

```lua
Config.Debug = false
```

Use debug mode only while testing or troubleshooting.

***

### Custom Integrations

Open:

```txt
custom.lua
```

Use this file for server-specific functions such as:

* Custom notifications
* Custom permission checks
* Custom framework integration
* Custom inventory bridge
* Custom banking/payment logic
* Custom job checks
* Custom logging
* Custom item effects

If your server uses standard systems, you may not need many changes here.

***

### Startup Logs

When the resource starts correctly, you may see logs similar to:

```txt
[sl_coffee_stand][INFO] Server ready: SL Coffee Stand v0.1.14
[sl_coffee_stand][INFO] Client ready: SL Coffee Stand v0.1.14
```

If startup logs are disabled, check `config.lua`.

***

### Troubleshooting

#### The coffee stand does not open

Check:

```txt
- The resource is started.
- You are close enough to the stand.
- Target or fallback interaction is enabled.
- The stand entity/model exists.
- Your permissions allow access.
- F8 console has no errors.
- Server console has no errors.
```

***

#### Target interaction does not appear

Check:

```txt
- ox_target or qb-target is started.
- Target mode is enabled in config.lua.
- The target resource starts before sl_coffee_stand.
- You are close enough to the stand.
- The model is configured correctly.
- Job/permission restrictions are not blocking you.
```

***

#### Customer cannot place order

Check:

```txt
- Customer has permission to order.
- Product catalog is configured.
- Product is enabled.
- Stock is available if stock is enabled.
- Payment method is configured if payment is required.
- Server console has no validation errors.
```

***

#### Worker cannot prepare order

Check:

```txt
- Worker has the required job/permission if configured.
- Order exists and is active.
- Product exists in config.lua.
- Preparation flow is enabled.
- Required stock/items are available.
- F8 console has no errors.
```

***

#### Item is not delivered

Check:

```txt
- Inventory system is configured.
- Product item exists in inventory.
- Item name matches config.lua.
- Server inventory bridge is working.
- Player has enough inventory space if your inventory requires it.
- Server console has no AddItem errors.
```

***

#### Payment does not work

Check:

```txt
- Banking/payment bridge is configured.
- Account type is correct.
- Customer has enough money.
- Server validates price correctly.
- custom.lua payment function is not returning false.
```

***

#### Stock does not update

Check:

```txt
- Stock system is enabled.
- Database is configured if persistence is required.
- Restock item or restock flow is configured.
- oxmysql starts before sl_coffee_stand.
- Server console has no SQL errors.
```

***

#### UI gets stuck or does not close

Check:

```txt
- F8 console has no JavaScript errors.
- NUI callbacks are registered.
- Another NUI is not blocking focus.
- Resource folder name is correct.
- Restart the resource and reconnect if needed.
```

***

#### Two players cannot use the same stand correctly

Check:

```txt
- Order/session locking is enabled if required.
- Multi-user behavior is configured.
- The current build supports simultaneous use.
- Server console has no session errors.
```

***

#### Product quality or preparation result feels wrong

Check:

```txt
- Preparation settings.
- Score/quality configuration.
- Minigame settings if enabled.
- Product effect configuration.
- Debug output if enabled.
```

***

### Version Notes

#### v0.1.14

* Coffee stand system with service activity structure.
* Product/order flow supported.
* Stock, preparation and result logic supported depending on configuration.
* Player/customer and worker/barista flow supported.
* Built as a base for future service activity systems.

***

### Support

When asking for support, include:

```txt
Product: SL Coffee Stand
Resource name: sl_coffee_stand
Version:
Framework:
Inventory:
Target system:
Database:
Issue:
Steps to reproduce:
Server console error:
Client F8 error:
Screenshot/video:
```

Example:

```txt
Product: SL Coffee Stand
Resource name: sl_coffee_stand
Version: v0.1.14
Framework: Qbox
Inventory: ox_inventory
Target system: ox_target
Database: oxmysql
Issue: Customer can open the stand but item is not delivered
Steps to reproduce: Place order, prepare product, finish order
Server console error: attached
Client F8 error: none
Screenshot/video: attached
```

***

### Final Notes

SL Coffee Stand works best when used as a small social service point.

For best results, place it in areas where players naturally gather and configure the product catalog, stock and permissions according to your server economy and roleplay style.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sl-scritps.gitbook.io/sl-scripts-documentation/products/sl-coffee-stand.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
