🤿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
Download the script from HPK Development Store
Choose your framework version:
Use
tresordiving[ESX]for ESX serversUse
tresordiving[QBCORE]for QB-Core servers
Place the folder in your
resourcesdirectoryAdd 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
shared/config.luaDiving Suits Configuration
Submersible Configuration
Treasure Configuration
🎮 Usage
For Players
Locate a Diving Instructor: Find NPCs marked with "Tresor Diving" blips
Rent Diving Equipment: Choose from 6 different oxygen masks (10-60 min)
Optional Submersible: Rent a submersible for deeper exploration
Start Diving: Use the rented equipment to explore underwater
Search for Treasures: Press E to search when you see glowing areas
Collect Rewards: Automatic inventory/bank additions
Cancel Diving: Use
/cancelSuitscommand 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
Approach NPC: Talk to diving instructor
Rent Equipment: Choose oxygen duration and optional submersible
Enter Water: Dive to minimum depth (20 units)
Search Areas: Look for glowing treasure indicators
Collect Items: Press E to collect discovered treasures
Surface: Return to shore when oxygen runs low
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 = trueCheck blip coordinates are valid
Webhook not working:
Verify Discord webhook URL is correct
Check server has internet access
Last updated