> For the complete documentation index, see [llms.txt](https://rambo3dev.gitbook.io/rambo3dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rambo3dev.gitbook.io/rambo3dev/rambo3dev-shops-creator/shops-creator-overview/admin-shop-management.md).

# Admin Shop Management

**Complete guide for creating, editing, and managing shops**

***

### 🎯 Admin Overview

As an administrator, you have complete control over the shop system. This guide covers all administrative functions for managing shops on your server.

#### 🔑 Admin Permissions

Ensure you have the required permissions:

```bash
# Required ACE Permission
add_ace identifier.steam:YOUR_STEAM_ID rambodev.admin allow

# Or group-based
add_ace group.admin rambodev.admin allow
add_principal identifier.steam:YOUR_STEAM_ID group.admin
```

***

### 🏪 Creating a New Shop

#### Step 1: Open Admin Interface

Use the admin command to open the shop creator:

```
/shopadmin
```

This opens the modern tablet-style admin interface with multiple tabs:

<figure><img src="/files/nTfAHaVUiZbqVBhXP2g2" alt=""><figcaption></figcaption></figure>

&#x20;*The main admin interface showing all available tabs*

**Interface Tabs:**

* **BASIC INFO** - Shop configuration and settings
* **PED SELECTION** - Choose NPC models for your shop
* **SHOP ITEMS** - Manage inventory and pricing
* **MANAGE SHOPS** - View, edit, and delete existing shops

#### Step 2: Shop Configuration

The admin interface will open with the following options:

| Setting        | Description               | Options                         |
| -------------- | ------------------------- | ------------------------------- |
| **Shop Name**  | Display name for the shop | Custom text (max 50 chars)      |
| **Shop Type**  | Category of shop          | General, Weapon, Clothing, etc. |
| **Ped Model**  | NPC model for the shop    | 25+ available models            |
| **Blip Type**  | Map icon type             | 25+ blip sprites                |
| **Blip Color** | Map icon color            | 85+ color options               |
| **Position**   | Shop location             | Current player position         |

#### Step 3: Ped Selection

<figure><img src="/files/Pef9TLd4yrjc9F5v2cIu" alt=""><figcaption></figcaption></figure>

&#x20;*The ped selection screen showing all available NPC models*

**Ped Selection Features:**

* **Visual Grid Layout** - See all ped models with previews
* **Ped Categories** - Organized by shop type
* **Model Names** - Display technical ped names
* **Current Selection** - Highlighted selected ped (shown in top-right)
* **Easy Selection** - Click any ped to select

**Available Ped Categories:**

| Category       | Ped Models                                              |
| -------------- | ------------------------------------------------------- |
| **General**    | Shop Keeper (MP), Store Clerk (Low), Store Clerk (High) |
| **Weapons**    | Ammu-Nation Clerk, Shop Mid Female, Country Bar Male    |
| **Clothing**   | Generic MP Male, Female Barber, Maid                    |
| **Automotive** | Hairdresser, Street Vendor, Bus Boy                     |
| **Medical**    | Shop Mask Male, Valet, and more                         |

**Ped Model Examples:**

* **Shop Keeper (MP)** - `mp_m_shopkeep_01`
* **Store Clerk (Low)** - `s_f_y_shop_low`
* **Ammu-Nation Clerk** - `s_m_y_ammucity_01`
* **Bus Boy** - `s_m_y_busboy_01` (as shown selected)

#### Step 4: Blip Configuration & Custom Blip Creation

The admin interface provides powerful blip customization options:

<figure><img src="/files/1gfrOo6vLcd2laHhBlIa" alt=""><figcaption></figcaption></figure>

&#x20;*The advanced blip creation interface with search and custom options*

**🎨 Custom Blip Creator Features**

**Search & Selection:**

* **Search Bar** - Find specific blip types quickly
* **Blip Gallery** - Visual preview of all available blips
* **Category Filtering** - Browse by blip type

**Add Custom Blip Options:**

* **Blip ID** - Enter specific blip sprite ID
* **Blip Name** - Set custom display name
* **Sprite Name** - Define sprite identifier
* **Live Preview** - See blip appearance before saving

**Blip Configuration:**

| Setting           | Options               | Description          |
| ----------------- | --------------------- | -------------------- |
| **Blip Sprite**   | 25+ available sprites | Choose icon type     |
| **Blip Color**    | 85+ color options     | Customize appearance |
| **Blip Scale**    | 0.5 - 2.0             | Adjust size on map   |
| **Blip Name**     | Custom text           | Set hover text       |
| **Blip Priority** | 1-10                  | Display priority     |

**📍 Available Blip Types**

| Blip Type       | Sprite ID | Best For        | Color Suggestions        |
| --------------- | --------- | --------------- | ------------------------ |
| **Shop**        | 52        | General stores  | Green (2), Blue (3)      |
| **Gun Shop**    | 110       | Weapon shops    | Red (1), Orange (17)     |
| **Clothes**     | 73        | Clothing stores | Pink (7), Purple (27)    |
| **Car**         | 72        | Auto shops      | Yellow (5), Orange (17)  |
| **Hospital**    | 61        | Medical shops   | White (0), Red (1)       |
| **Bar**         | 93        | Liquor stores   | Brown (15), Dark Red (6) |
| **Restaurant**  | 106       | Food shops      | Green (2), Yellow (5)    |
| **Bank**        | 108       | Financial       | Blue (3), Dark Blue (26) |
| **Gas Station** | 361       | Fuel shops      | Red (1), Yellow (5)      |
| **Hardware**    | 402       | Tool shops      | Orange (17), Brown (15)  |

#### Step 5: Item Management

<figure><img src="/files/LQSqqJoVr1YswsvnTfgb" alt=""><figcaption></figcaption></figure>

&#x20;*The shop items management screen with available items and selected items*

**Item Management Features:**

**Available Items Panel (Left):**

* **Search Bar** - Find items quickly (e.g., "med" for medical items)
* **Category Filters** - "All" and "Misc" buttons for filtering
* **Item List** - Shows all available items with icons
* **Add Button** - Yellow "+" button to add items to shop

**Selected Items Panel (Right):**

* **Selected Items Count** - Shows "Selected Items 2"
* **Bulk Actions** - "Remove All" and "Set Prices" buttons
* **Item Cards** - Display selected items with details
* **Individual Controls** - Edit (⚙️) and Remove (❌) buttons per item
* **Price Display** - Shows current price (e.g., $10.00)
* **Stock Display** - Shows stock amount (e.g., 50)

**Item Examples Shown:**

* **Bandage** - Medical item with $10.00 price, 50 stock
* **Medikit** - Medical item with $10.00 price, 50 stock

**Bottom Summary:**

* **Total Items** - Shows count (e.g., "2")
* **Est. Value** - Total shop value (e.g., "$1000.00")
* **Avg. Price** - Average item price (e.g., "$10.00")
* **Save Shop** - Yellow button to save all changes

***

### 🔧 **Editing Existing Shops**

#### Opening Edit Mode

<figure><img src="/files/vZhInJZFqzOQAShP40Ft" alt=""><figcaption></figcaption></figure>

&#x20;*The shop management screen showing existing shops with action buttons*

**Shop Management Features:**

**Shop List Display:**

* **Search Bar** - Find specific shops quickly
* **Shop Cards** - Each shop displayed as a card with details
* **Shop Information** includes:
  * **Shop Name** (e.g., "Gun Shop Joshua Rd", "Rambo3Dev Test Shop")
  * **Shop Type** (e.g., "Liquor Store", "24/7 Store")
  * **Ped Name** (e.g., "Shop Mid Female", "Bus Boy")
  * **Shop Value** (e.g., "$11165.00", "$1000.00")
  * **Item Count** (shown with item icon)

**Action Buttons (Right side of each shop):**

* **👁️ View** - Preview shop details
* **📍 Teleport** - Instantly teleport to shop location
* **✏️ Edit** - Modify shop settings and items
* **🗑️ Delete** - Remove shop permanently

**How to Edit a Shop:**

1. **Open admin interface**: `/shopadmin`
2. **Navigate to "MANAGE SHOPS"** tab
3. **Find your shop** in the list
4. **Click the edit button** (✏️) to modify settings
5. **Make changes** in any tab (Basic Info, Ped, Items, Blips)
6. **Save changes** to update the shop

#### Editable Prop

&#x20;*The item editing dialog showing price, stock, discount, and purchase limit settings*

**What You Can Edit:**

| Property            | Can Edit | Notes                                      |
| ------------------- | -------- | ------------------------------------------ |
| **Shop Name**       | ✅        | Updates blip and interface                 |
| **Shop Type**       | ✅        | Changes available items                    |
| **Ped Model**       | ✅        | Instant visual update                      |
| **Ped Location**    | ✅        | **Shop moves to admin's current position** |
| **Blip Settings**   | ✅        | Full custom blip editor                    |
| **Items & Prices**  | ✅        | Add/remove/modify                          |
| **Item Properties** | ✅        | Price, stock, discount, purchase limits    |

**🚀 Important: Shop Location Changes** When you edit a shop and save it, **the shop will move to your current location**. This means:

* Stand where you want the shop to be located
* Edit the shop settings
* Click "Save Shop"
* The shop ped and interaction point will move to where you're standing

**Item Editing Features:**

* **Price ($)** - Set custom item prices
* **Stock** - Control inventory amounts
* **Discount (%)** - Apply percentage discounts
* **Purchase Limit** - Set per-player purchase limits
* **Save/Cancel** - Apply or discard changes

#### 🎨 **Custom Blip Editor in Edit Mode**

When editing shops, access the advanced blip customization:

**Blip Customization Options**

* **🎯 Sprite Selection**: Browse 25+ available sprites with preview
* **🌈 Color Picker**: Choose from 85+ colors with live preview
* **📏 Scale Adjustment**: Slider control (0.5x to 2.0x size)
* **📝 Custom Name**: Set unique blip text (up to 32 characters)
* **⭐ Priority Level**: Set display priority (1-10, higher = more visible)
* **👁️ Visibility**: Toggle blip on/off for different player groups

**Advanced Blip Features**

* **📱 Live Preview**: See changes instantly on minimap
* **🔄 Reset Options**: Restore to default settings
* **💾 Save Templates**: Save custom blip configurations
* **📋 Copy Settings**: Duplicate blip settings to other shops

#### Edit Interface Details

* **Real-time preview** of changes
* **Undo/Redo** functionality
* **Save confirmation** dialog
* **Auto-backup** before changes
* **🎨 Visual blip editor** with drag-and-drop interface

***

### 🔄 Replacing Shops

#### When to Replace

Replace shops when you need to:

* **Completely change** shop purpose
* **Update to new ped models**
* **Restructure item categories**
* **Change location significantly**

#### Replacement Process

1. **Open admin interface**: `/shopadmin`
2. **Navigate to "MANAGE SHOPS"** tab
3. **Select shop** you want to replace
4. **Delete existing shop** and create new one
5. **Configure new shop** settings

#### Data Handling

| Data Type            | Replacement Behavior        |
| -------------------- | --------------------------- |
| **Shop Settings**    | Completely replaced         |
| **Items**            | Option to transfer or clear |
| **Purchase History** | Preserved in database       |
| **Customer Data**    | Maintained                  |

***

### 🗑️ Deleting Shops

#### Deletion Methods

**Admin Interface Method**

1. **Open admin interface**: `/shopadmin`
2. **Navigate to "MANAGE SHOPS"** tab
3. **Select shop** to delete
4. **Click delete button** (trash icon)
5. **Confirm deletion** in popup

#### Deletion Confirmation

The system requires confirmation for safety:

```
⚠️ WARNING: This action cannot be undone!
Shop: "General Store #1"
Items: 15 items will be removed
Continue? [YES/NO]
```

#### What Gets Deleted

| Component            | Deleted | Notes                 |
| -------------------- | ------- | --------------------- |
| **Shop Entity**      | ✅       | Removed from world    |
| **Shop Ped**         | ✅       | NPC despawned         |
| **Map Blip**         | ✅       | Icon removed          |
| **Database Entry**   | ✅       | Permanently deleted   |
| **Item Data**        | ✅       | All items removed     |
| **Purchase History** | ❌       | Preserved for records |

***

### 🛠️ **Advanced Admin Tools**

#### Shop Sync Command

If you experience issues with peds or duplicate ped errors:

```
/syncshops
```

**When to use `/syncshops`:**

* Peds not spawning correctly
* Duplicate ped errors
* Shop peds disappeared
* After server restart issues
* General shop synchronization problems

#### 🎨 **Blip Template System**

Create and manage reusable blip configurations:

**Template Features**

* **📋 Save Blip Templates**: Store custom blip designs
* **🔄 Apply to Multiple**: Use templates across shops
* **📤 Export Templates**: Share with other servers
* **📥 Import Templates**: Load community designs
* **🎯 Category Templates**: Different styles per shop type

**Pre-made Blip Templates**

| Template Name    | Style                        | Best For           |
| ---------------- | ---------------------------- | ------------------ |
| **Modern Neon**  | Bright colors, large scale   | Nightlife shops    |
| **Professional** | Muted colors, standard scale | Business shops     |
| **Emergency**    | Red/blue, high priority      | Medical/police     |
| **Luxury**       | Gold/purple, premium scale   | High-end stores    |
| **Minimalist**   | Simple colors, small scale   | Discrete locations |

#### Shop Templates

Create reusable shop configurations:

* **Save Template**: Store current shop as template
* **Load Template**: Apply saved configuration
* **Share Templates**: Export for other servers
* **Template Library**: Access pre-made setups
* **🎨 Include Blip Settings**: Templates save custom blip configurations

```lua
-- Template Example
{
    name = "General Store Template",
    type = "general",
    ped = "mp_m_shopkeep_01",
    blip = {sprite = 52, color = 2},
    items = {
        {name = "bread", price = 5, stock = 100},
        {name = "water", price = 3, stock = 200},
        -- ... more items
    }
}
```

#### Available Commands Summary

| Command          | Purpose                     | Usage                       |
| ---------------- | --------------------------- | --------------------------- |
| **`/shopadmin`** | Open shop creator interface | Main admin command          |
| **`/syncshops`** | Fix ped/sync issues         | Use when peds have problems |

#### 🎯 **Admin Action Buttons Explained**

**In the MANAGE SHOPS tab, each shop has 4 action buttons:**

| Button       | Icon | Function       | Description                        |
| ------------ | ---- | -------------- | ---------------------------------- |
| **View**     | 👁️  | Preview        | View shop details without editing  |
| **Teleport** | 📍   | Instant Travel | Teleport directly to shop location |
| **Edit**     | ✏️   | Modify         | Open shop in edit mode             |
| **Delete**   | 🗑️  | Remove         | Permanently delete the shop        |

**Teleport Feature:**

* Click the 📍 button to instantly teleport to any shop
* Useful for checking shop locations
* No need to travel across the map
* Works from anywhere on the server

**Edit vs View:**

* **View (👁️)** - Read-only preview of shop settings
* **Edit (✏️)** - Full editing capabilities with save option

***

### 📊 Shop Management Dashboard

#### Real-time Monitoring

The admin interface provides:

* **Live Shop Status** - Online/offline shops
* **Active Customers** - Current shoppers
* **Recent Transactions** - Latest purchases
* **System Health** - Performance metrics

#### Shop List View

| Column      | Information            |
| ----------- | ---------------------- |
| **ID**      | Unique shop identifier |
| **Name**    | Shop display name      |
| **Type**    | Shop category          |
| **Items**   | Number of items        |
| **Status**  | Active/Inactive        |
| **Actions** | Edit/Delete/View       |

***

### ⚙️ Configuration Management

#### Shop Limits

Configure shop limitations in `config.lua`:

```lua
Config.ShopLimits = {
    MaxShopsPerServer = 100,     -- Total shops allowed
    MaxItemsPerShop = 50,        -- Items per shop
    MaxShopsPerAdmin = 10,       -- Per admin limit
}
```

#### Default Settings

Set default values for new shops:

```lua
Config.Defaults = {
    BlipColor = 2,               -- Default blip color
    PedModel = "mp_m_shopkeep_01", -- Default ped
    InteractionDistance = 3.0,    -- Interaction range
}
```

***

### 🚨 Troubleshooting Admin Issues

#### Common Problems

| Issue                   | Cause               | Solution                 |
| ----------------------- | ------------------- | ------------------------ |
| **Can't open admin UI** | Missing permissions | Check ACE permissions    |
| **Shop not saving**     | Database error      | Verify MySQL connection  |
| **Ped not spawning**    | Invalid model       | Use valid ped model      |
| **Blip not showing**    | Blip conflict       | Change blip sprite/color |

#### Commands

```lua
-- Sync shops if having ped issues
/syncshops

-- Open admin interface
/shopadmin
```

#### Error Messages

| Error               | Meaning         | Fix                       |
| ------------------- | --------------- | ------------------------- |
| `Permission denied` | No admin access | Add ACE permission        |
| `Invalid position`  | Bad coordinates | Move to valid location    |
| `Database error`    | MySQL issue     | Check database connection |

***

**Master Your Shop System!** 🏆

***

**Need Advanced Help?**

&#x20;[![Discord](https://img.shields.io/badge/DISCORD-JOIN%20COMMUNITY-5865F2?style=for-the-badge\&logo=discord\&logoColor=white)](https://discord.gg/tajGY2tSN7)
