๐Ÿ“ฆLooting System v3

This script is designed to enable players to loot specific props and entities in a GTA V FiveM server. It features a configurable loot system, item requirements, cooldowns, and random chance mechanics. The script supports both QBCore and ESX frameworks and includes options for customizable inventory image paths and target scripts.

How the script works

  1. Player Interaction:

    • Players approach a lootable entity (e.g., prop_box_wood08a or prop_rub_carwreck_2).

    • Using a keybind or interaction system, they trigger the looting process.

  2. Item Requirements:

    • If Config.lootTypeItemNeeded specifies an item requirement for the loot type, the script checks the playerโ€™s inventory.

    • Example: A blowtorch is required to loot car wrecks.

  3. Looting Process:

    • A progress bar animation (if enabled) is displayed during the looting process.

    • The script randomly selects items based on the Config.LootRewards and the probability (chance) defined for each item.

  4. Cooldowns:

    • Looted entities enter a cooldown period based on the refreshTime defined in Config.LootRewards.

  5. Zones:

    • In lootIncreaseZones, players have a higher chance to receive additional loot.

    • In disableLootZones, loot is disabled entirely.

  6. Notifications:

    • Players are notified of the result (e.g., "You found nothing", "Search completed", "Inventory is full") using localized messages (Config.Locales).

  7. Multiplayer Protection:

    • The script ensures only one player can loot an entity at a time using the inProgressSearches table. If a player disconnects, the script clears their progress to allow others to interact with the same entity.

Security Notice

This script is protected by FiveM's escrow system. The client and server-side code is encrypted and cannot be modified.

Last updated