From e2b6726108a422e7bc0e52bf964d0357e56600a8 Mon Sep 17 00:00:00 2001 From: Kotzu Date: Thu, 2 Apr 2026 00:24:12 +0300 Subject: [PATCH] Create README.md --- .../[framework]/[addons]/rv-maphold/README.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 resources/[framework]/[addons]/rv-maphold/README.md diff --git a/resources/[framework]/[addons]/rv-maphold/README.md b/resources/[framework]/[addons]/rv-maphold/README.md new file mode 100644 index 00000000..3e7a2f0b --- /dev/null +++ b/resources/[framework]/[addons]/rv-maphold/README.md @@ -0,0 +1,92 @@ +# πŸ—ΊοΈ rv-maphold β€” Physical Map System + +A standalone FiveM resource for QBCore that adds a **physical map item** to the game. Players must own a `map` item to see blips on the pause menu map. Using the item from inventory opens the map with a realistic map-holding animation. + +## ✨ Features + +- **Blip Visibility Control** β€” Without the `map` item, all map blips are hidden (empty map) +- **Map Animation** β€” When opening the pause menu with the map item, the player holds a physical map in their hands (`WORLD_HUMAN_TOURIST_MAP`) +- **Inventory USE Action** β€” Players can USE the map item from inventory to open the pause menu map directly +- **Starter Item** β€” Map is given automatically to new characters via `QBShared.StarterItems` +- **Standalone** β€” No dependencies other than `qb-core` and `qs-inventory` + +## πŸ“¦ Installation + +### 1. Copy Resource +Place the `rv-maphold` folder in your server's resources directory: +``` +resources/[framework]/[addons]/rv-maphold/ +``` + +### 2. Add Item to `qb-core/shared/items.lua` +```lua +['map'] = {['name'] = 'map', ['label'] = 'Map', ['weight'] = 100, ['type'] = 'item', ['image'] = 'map.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A physical map of Los Santos and Blaine County'}, +``` + +### 3. Add as Starter Item (optional) +In `qb-core/shared/main.lua`, add `map` to `QBShared.StarterItems`: +```lua +QBShared.StarterItems = { + -- ... existing items ... + ['map'] = { amount = 1, item = 'map' }, +} +``` + +### 4. Add Item Image +Place a `map.png` icon (128x128 recommended) in your inventory's image folder: +``` +qs-inventory/html/images/map.png +``` + +### 5. Ensure Resource +Add to your `resources.cfg` (after `qb-core` and `qs-inventory`): +```cfg +ensure rv-maphold +``` + +### 6. Restart Server +``` +ensure rv-maphold +``` + +## βš™οΈ How It Works + +| Scenario | Behavior | +|---|---| +| Player **has** `map` item | Blips visible on pause menu, animation plays when opening map | +| Player **doesn't have** `map` item | Blips hidden, pause menu still works but map is empty | +| Player **USEs** map from inventory | Pause menu opens on MAP tab + map animation | + +## πŸ”§ Configuration + +No configuration needed. The resource works out of the box. + +To disable the blip hiding feature, comment out the `SwitchBlips` loop in `client.lua`. + +## πŸ“ File Structure + +``` +rv-maphold/ +β”œβ”€β”€ fxmanifest.lua # Resource manifest +β”œβ”€β”€ client.lua # Blip control, animation, USE handler +β”œβ”€β”€ server.lua # RegisterUsableItem for 'map' +└── README.md # This file +``` + +## πŸ”— Dependencies + +| Resource | Required | Notes | +|---|---|---| +| `qb-core` | βœ… Yes | Framework β€” provides `QBCore`, `CreateUseableItem` | +| `qs-inventory` | βœ… Yes | Inventory system β€” handles item USE action | + +## πŸ“ Credits + +- **Red Valley Community** β€” Original development +- Inspired by `sm_map` (ScriptsM) for the animation concept + +## πŸ“‹ Version History + +| Version | Date | Changes | +|---|---|---| +| 1.0.0 | 2026-04-01 | Initial release β€” blip hiding + map animation + inventory USE |