104 lines
3.2 KiB
Markdown
104 lines
3.2 KiB
Markdown
|
|
# 🚀 Deployment Guide — Spawn Outfit System (2026-03-27)
|
||
|
|
|
||
|
|
## Fișiere de urcat pe VPS
|
||
|
|
|
||
|
|
### 1. 🆕 Resursă nouă — `17mov-plugin-char-creator` (copiază întreg folderul)
|
||
|
|
```
|
||
|
|
resources/[framework]/[base]/[auth]/17mov-plugin-char-creator/
|
||
|
|
├── fxmanifest.lua
|
||
|
|
└── client.lua
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### 2. ✏️ 17mov_CharacterSystem — fișiere modificate
|
||
|
|
```
|
||
|
|
resources/[framework]/[base]/[auth]/17mov_CharacterSystem/
|
||
|
|
├── configs/Skin.lua ← preset-uri: creator, shop, skinCommand
|
||
|
|
├── client/functions.lua ← ApplySpawnOutfit() + spawnOutfitMale/Female
|
||
|
|
└── bridge/clothing/qb-clothing/exports.lua ← openMenu→shop, openMenuCommand→skinCommand
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### 3. ✏️ qb-core — fișiere modificate
|
||
|
|
```
|
||
|
|
resources/[framework]/[core]/qb-core/
|
||
|
|
├── shared/main.lua ← scos mask din StarterItems + TODO spawn_mask
|
||
|
|
└── server/player.lua ← fix character delete (tabele comentate)
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### 4. 📋 Changelog
|
||
|
|
```
|
||
|
|
changelog.md
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Pași deploy
|
||
|
|
|
||
|
|
1. **Oprește serverul** pe VPS
|
||
|
|
|
||
|
|
2. **Copiază folderul nou:**
|
||
|
|
```
|
||
|
|
17mov-plugin-char-creator/ → resources/[framework]/[base]/[auth]/17mov-plugin-char-creator/
|
||
|
|
```
|
||
|
|
|
||
|
|
3. **Înlocuiește fișierele modificate:**
|
||
|
|
```
|
||
|
|
Skin.lua → resources/[framework]/[base]/[auth]/17mov_CharacterSystem/configs/Skin.lua
|
||
|
|
functions.lua → resources/[framework]/[base]/[auth]/17mov_CharacterSystem/client/functions.lua
|
||
|
|
exports.lua → resources/[framework]/[base]/[auth]/17mov_CharacterSystem/bridge/clothing/qb-clothing/exports.lua
|
||
|
|
main.lua → resources/[framework]/[core]/qb-core/shared/main.lua
|
||
|
|
player.lua → resources/[framework]/[core]/qb-core/server/player.lua
|
||
|
|
changelog.md → changelog.md
|
||
|
|
```
|
||
|
|
|
||
|
|
4. **Pornește serverul**
|
||
|
|
|
||
|
|
> [!IMPORTANT]
|
||
|
|
> Resursa `17mov-plugin-char-creator` se încarcă automat din `[auth]` folder. NU trebuie adăugată în `server.cfg`.
|
||
|
|
|
||
|
|
## Arhitectură
|
||
|
|
|
||
|
|
```mermaid
|
||
|
|
flowchart TD
|
||
|
|
A[Player conectat] --> B{Char existent?}
|
||
|
|
B -->|Da| C[Login normal → inGame]
|
||
|
|
B -->|Nu| D["Create character"]
|
||
|
|
|
||
|
|
D --> E["17mov Skin.OpenMenu<br/>(preset: creator = DNA+Details)"]
|
||
|
|
D --> F["17mov-plugin-char-creator<br/>detectează isGenerated=true<br/>via citizenid tracking"]
|
||
|
|
F --> G["Per-frame outfit loop<br/>SetPedComponentVariation"]
|
||
|
|
|
||
|
|
E --> H[Player editează DNA/față]
|
||
|
|
G --> H
|
||
|
|
|
||
|
|
H --> I[Save]
|
||
|
|
I --> J["SaveCurrentSkin → loop stop"]
|
||
|
|
I --> K["ApplySpawnOutfit() la spawn<br/>(gender-specific)"]
|
||
|
|
K --> L["SaveCurrentSkin → DB persist"]
|
||
|
|
|
||
|
|
L --> M[Player in-game<br/>plugin idle, zero overhead]
|
||
|
|
|
||
|
|
style F fill:#2d5016,color:#fff
|
||
|
|
style G fill:#2d5016,color:#fff
|
||
|
|
style K fill:#1a3a5c,color:#fff
|
||
|
|
```
|
||
|
|
|
||
|
|
### Preset-uri per context
|
||
|
|
|
||
|
|
```mermaid
|
||
|
|
flowchart LR
|
||
|
|
A[Skin Menu] --> B{Cine deschide?}
|
||
|
|
B -->|Char Creator| C["creator preset<br/>DNA + Details<br/>(2 tabs)"]
|
||
|
|
B -->|Shop/Ambulance/Boss| D["shop preset<br/>Details + Clothing + Acc<br/>(3 tabs)"]
|
||
|
|
B -->|Admin /skin| E["skinCommand preset<br/>All 4 tabs"]
|
||
|
|
|
||
|
|
style C fill:#5c1a1a,color:#fff
|
||
|
|
style D fill:#1a3a5c,color:#fff
|
||
|
|
style E fill:#2d5016,color:#fff
|
||
|
|
```
|