Description:
The QBCore Dumpster Diving Script is an engaging and interactive script for FiveM servers utilizing the QBCore framework. This script allows players to search dumpsters (bins) scattered across the map for potential loot. By incorporating a progress bar, animations, notifications, and a cooldown system, this script enhances the role-playing experience and adds an element of unpredictability and reward.
Features:
Interactive Dumpster Search:
- Players can search dumpsters by approaching them and pressing the
Ekey. - A prompt is displayed to notify players when they are close enough to interact with a dumpster.
- Players can search dumpsters by approaching them and pressing the
Progress Bar and Animation:
- While searching, players will see a progress bar indicating the search duration.
- Players' characters perform a dumpster diving animation, enhancing the realism of the interaction.
Configurable Loot Table:
- Server administrators can configure the loot table in the
config.luafile. - Each item in the loot table has a configurable chance of being found and a specific quantity.
- Server administrators can configure the loot table in the
Cooldown System:
- After a dumpster has been searched, it will enter a cooldown period during which it cannot be searched again.
- The cooldown period is configurable in the
config.luafile. - Players will receive a notification if they attempt to search a dumpster that is currently on cooldown.
Notifications:
- Utilizes
qb-notifyto inform players of the results of their search. - Players receive notifications about what items they found or if the dumpster was empty.
- Utilizes
Seamless Integration with QBCore:
- Fully compatible with the QBCore framework, ensuring smooth performance and easy integration.
- Utilizes QBCore functions for item handling and player notifications.
Configuration:
- Config.Bins: Define the coordinates of dumpsters (bins) that players can search.
- Config.LootTable: Configure the items players can find, including item names, quantities, and chances of being found.
- Config.SearchTime: Set the duration (in milliseconds) it takes to search a dumpster.
- Config.CooldownTime: Set the cooldown period (in milliseconds) after a dumpster has been searched.
Dependency's
ox_inventory
ox_target
FrameWork - [QB] / [QBX]