🤿TRESOR DIVING

📋 Description

HPK TRESOR DIVING is an advanced FiveM script that allows players to explore underwater treasures through scuba diving. Players can rent diving suits with different oxygen durations, rent submersibles, and dive to discover various treasures including money, items, and artifacts scattered across the ocean floor.

✨ Features

🤿 Diving System

  • 6 Different Diving Suits: From 10 to 60 minutes of oxygen

  • Realistic Underwater Exploration: Depth-based treasure discovery

  • Oxygen Management: Timer-based oxygen consumption

  • Underwater Lamp: Toggleable diving light for better visibility

  • Treasure Discovery: Random chance to find items, money, or dirty money

🚤 Submersible Rentals

  • 3 Different Submersibles: Avisa, Submersible, and Kraken

  • Realistic Pricing: Progressive pricing system

  • Bank/Cash Payment: Support for both cash and bank transactions

💰 Treasure System

  • Multiple Item Types: Water bottles, money, dirty money

  • Randomized Rewards: Probability-based discovery system

  • Anti-Exploit Protection: Maximum amount limits and validation

🗺️ Location System

  • 6 Strategic Locations: Across Los Santos and surrounding areas

  • Blip System: Map markers for easy location finding

  • Distance-Based Visibility: Performance-optimized NPC rendering

📊 Logging & Security

  • Discord Webhook Integration: Complete activity logging

  • Anti-Cheat Measures: Server-side validation and limits

  • Detailed Logs: Player actions, items found, and transactions

🔧 Installation

Prerequisites

  • ESX or QB-Core Framework

  • MySQL Database (for ESX)

  • Working inventory system

Step-by-Step Installation

  1. Download the script from HPK Development Storearrow-up-right

  2. Choose your framework version:

    • Use tresordiving[ESX] for ESX servers

    • Use tresordiving[QBCORE] for QB-Core servers

  3. Place the folder in your resources directory

  4. Add to server.cfg:

⚙️ Framework-Specific Configuration

For QB-Core

Add these items to qb-core/shared/items.lua:

Add image files to qb-inventory/html/images/

For ESX

Execute this SQL query in your database:

Add image files to your inventory images folder

⚙️ Configuration

Main Configuration File: shared/config.lua

Diving Suits Configuration

Submersible Configuration

Treasure Configuration

🎮 Usage

For Players

  1. Locate a Diving Instructor: Find NPCs marked with "Tresor Diving" blips

  2. Rent Diving Equipment: Choose from 6 different oxygen masks (10-60 min)

  3. Optional Submersible: Rent a submersible for deeper exploration

  4. Start Diving: Use the rented equipment to explore underwater

  5. Search for Treasures: Press E to search when you see glowing areas

  6. Collect Rewards: Automatic inventory/bank additions

  7. Cancel Diving: Use /cancelSuits command to stop diving

Diving Controls

  • E: Search for treasures (when in glowing areas)

  • G: Toggle underwater lamp on/off

  • Movement: WASD for swimming

  • Mouse: Look around

🔄 Mission Flow

  1. Approach NPC: Talk to diving instructor

  2. Rent Equipment: Choose oxygen duration and optional submersible

  3. Enter Water: Dive to minimum depth (20 units)

  4. Search Areas: Look for glowing treasure indicators

  5. Collect Items: Press E to collect discovered treasures

  6. Surface: Return to shore when oxygen runs low

  7. Repeat: Continue diving or end session

📊 Logging System

Discord Webhook Integration

When enabled, the script logs:

  • Player Actions: Item rentals, treasure discoveries

  • Financial Transactions: Money spent/received

  • Anti-Cheat Events: Suspicious activities

Example Discord embed:

🛠️ Commands

  • /cancelSuits - Remove diving equipment and end diving session

🏷️ Items & Pricing

Oxygen Masks

  • 10 min Oxygen Mask: $800

  • 20 min Oxygen Mask: $1000

  • 30 min Oxygen Mask: $1200

  • 40 min Oxygen Mask: $1500

  • 50 min Oxygen Mask: $2200

  • 60 min Oxygen Mask: $2500

Submersibles

  • Avisa: $5200

  • Submersible: $5000

  • Kraken: $5500

📝 Important Notes

  • Framework Compatibility: Choose correct version (ESX/QB-Core)

  • Image Files: Ensure all PNG/WEBP files are properly installed

  • Database: ESX requires SQL item insertion

  • Performance: Optimized for multiple simultaneous divers

  • Security: Server-side validation prevents exploitation

🔒 Security Features

  • Server-side Validation: All transactions validated server-side

  • Anti-Exploit: Maximum amount limits and cooldowns

  • Logging: Complete activity tracking

  • Input Sanitization: Protected against injection attacks

🐛 Troubleshooting

Common Issues

Items not appearing in inventory:

  • Check if items are properly added to shared items (QB-Core)

  • Verify SQL insertion completed (ESX)

  • Ensure image files are in correct directories

Blips not showing:

  • Verify Config.blip = true

  • Check blip coordinates are valid

Webhook not working:

  • Verify Discord webhook URL is correct

  • Check server has internet access


Last updated