> For the complete documentation index, see [llms.txt](https://fetchq-store.gitbook.io/fetchq-store-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fetchq-store.gitbook.io/fetchq-store-docs/custom-tattoo-creator-script.md).

# Custom Tattoo Creator Script

## 🎨 FetchQ Advanced Tattoo Studio

An immersive, feature-rich, and highly interactive tattoo shop script for FiveM servers. Revolutionize character customization with dynamic URL-based custom tattoos, a cinematic camera studio, and a seamless shopping cart experience.

***

### 🌟 Overview

**FetchQ Advanced Tattoo Studio** transforms the boring, static tattoo experience into a modern body art studio. Players can browse an interactive 3D UI with cinematic camera transitions, select specific body zones via on-screen markers, and even apply completely custom tattoos using external image URLs. With a built-in shopping cart, players can preview and purchase multiple tattoos at once!

***

### ✨ Features

#### 🖌️ Custom URL Tattoos (DUI Integration)

* **Dynamic Image URLs:** Don't limit your players to default GTA tattoos. Players can apply completely unique tattoos by pasting a direct image URL.
* **Live Style Editor:** Adjust the *scale*, *rotation*, and *opacity* of custom tattoos in real-time to fit perfectly on the selected body part.
* **Persistent Storage:** Custom tattoos are mapped to specific collections and zones, fully integrated with your server's database to persist across sessions.

#### 🎥 Cinematic Studio & Interactive UI

* **Interactive Bone Markers:** Visual, floating 3D markers appear over the player's body zones (Head, Torso, Back, Arms, Legs). Clicking a marker smoothly transitions the camera to that specific area.
* **Smooth Camera Transitions:** A custom cinematic camera dynamically lerps between body parts, providing a premium viewing experience.
* **Full Viewer Control:** Players can smoothly rotate their character 360 degrees and adjust camera height/zoom to inspect their ink from any angle.

#### 🛒 Shopping Cart & Quality of Life

* **Shopping Cart System:** Players can browse and add multiple default or custom tattoos to their cart, reviewing the total price before executing a bulk purchase.
* **Auto-Clothing Toggle:** The script intelligently saves the player's current outfit and strips them down to base layers upon entering the studio for a clear canvas. Leaving the shop automatically restores their exact outfit.
* **Live Preview:** Preview how an entire cart of tattoos will look before spending any money.

#### ⚙️ System & Integration

* **Framework Auto-Detection:** Seamlessly integrates with `QBCore`, `Qbox`, and `ESX`. The script detects your active framework automatically (`Config.Framework = 'auto'`).
* **Target Auto-Detection:** Automatically scans for and binds to `ox_target` or `qb-target`. If neither is found, it automatically falls back to a 3D TextUI interaction system.
* **Flexible Economy:** Define whether players prioritize paying with cash or bank. Adjust price multipliers for default tattoos or set fixed prices for custom URL tattoos.

***

### 🚀 Installation & Configuration

#### 1. Database Setup

The script uses `oxmysql` to save player tattoos. Ensure `oxmysql` is running correctly on your server. Database tables are handled automatically by the server-side logic based on your detected framework.

#### 2. Basic Installation

1. Download the script and extract it.
2. Ensure the folder is named exactly `fetchq-tatto`.
3. Place the folder into your server's resources directory (e.g., `resources/[qb]`).
4. Add `ensure fetchq-tatto` to your `server.cfg`.

#### 3. Adding to Target Systems (Optional)

> \[!NOTE] If you are using `ox_target` or `qb-target`, the script will automatically detect them. You do not need to manually add target zones to your target script; `fetchq-tatto` handles its own target zone creation based on `Config.InteractionCoords`.

***

### 🛠️ Customization (`config.lua`)

You can customize the core experience inside the `config.lua` file:

* **Interaction Types:** Force `'ox_target'`, `'qb-target'`, or `'textui'` if you don't want to use `'auto'`.
* **Location:** Change the X, Y, Z, and Heading coordinates of the tattoo shop (`Config.InteractionCoords`).
* **Economy:**
  * `Config.DefaultPriceMultiplier`: Multiply the base GTA tattoo prices (e.g., `1.0` is normal, `2.0` is double).
  * `Config.CustomTattooPrice`: Set the fixed cost for applying a custom URL tattoo.
  * `Config.MoneyType`: Array defining payment priority (e.g., `{'cash', 'bank'}`).
* **UI Elements:** Enable or disable the 3D floating bone markers via `Config.ShowBoneMarkers = true`.

***

### 💻 Commands

* `/tattoo` - Admin command to force-open the tattoo studio UI (useful for testing).
* `/removetattoo` - Wipes all currently applied tattoos from your character and clears the database entries for the active player.


---

# 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://fetchq-store.gitbook.io/fetchq-store-docs/custom-tattoo-creator-script.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.
