Scrap

Scrap lets players collect configured inventory items from world objects by scavenging by hand or hitting them with approved weapons.

{:links-list}

INSTALLATION

  1. Open the downloaded ZIP file and copy the complete BigDaddy-Scrap folder into your server's resources folder.
  2. Add your product key from your Big Daddy Scripts account to settings.ini.
  3. Install and start your framework, inventory, and targeting dependencies before BigDaddy-Scrap. See the requirements below.
  4. Configure object rewards in config.json and add all configured reward items and weapon items to your inventory definitions.
  5. Add ensure BigDaddy-Scrap to your server.cfg.

REQUIREMENTS

Requirement Details
FiveM server GTA V server with OneSync enabled.
BigDaddy licensing Valid licensing configured in settings.ini. Gameplay starts after successful license synchronization.
Targeting Either ox_target or qb-target.
Inventory Either ox_inventory or qb-inventory, including that provider's own dependencies.
Framework for QB inventory QBCore, or a compatible Qbox setup with the QB bridge required by the inventory integration.
Resource files Built BigDaddy-Scrap client/server DLLs, BigDaddy-Utilities.Client.net.dll, Newtonsoft.Json.dll, and the supplied scripts, configuration, and NUI files.
Inventory definitions All configured reward items and weapon items must exist in your inventory.
Object and weapon assets Configured models and weapons must be available on your server. Weapon-hit props must emit damage events when struck.

CONFIGURATION

Configure licensing in settings.ini and object rewards in config.json. Restart the resource after making changes.

config.json

Each entry in the models array defines an object model, its reward, and the ways players can collect it. The values below describe the example configuration.

SETTING EXAMPLE DESCRIPTION
model prop_rub_carwreck_2 Object model players can scrap. The model must be available on your server.
label Wrecked Vehicle Display name for the configured object.
item metalscrap Inventory item awarded when players collect scrap. This item must exist in your inventory definitions.
canHandScavenge true Allows players to scavenge the object by hand. Set to false to require weapon hits.
toolForScavenging ["weapon_hammer", "weapon_crowbar", "weapon_machete"] Weapons that can collect scrap by hitting the object. Use an empty array ([]) with hand scavenging enabled to allow hand scavenging only.
min 4 Minimum total reward for a harvest cycle.
max 8 Maximum total reward for a harvest cycle.
durationMs 30000 Time in milliseconds needed to complete hand scavenging. 30000 is 30 seconds.
animationDict amb@world_human_vehicle_mechanic@male@base Animation dictionary used for hand scavenging.
animation base Animation played from the configured dictionary.

Example model

Add an entry like this to the models array in config.json. This is a single model entry, not a replacement for the complete configuration file.

{
  "model": "prop_rub_carwreck_2",
  "label": "Wrecked Vehicle",
  "item": "metalscrap",
  "canHandScavenge": true,
  "toolForScavenging": [
    "weapon_hammer",
    "weapon_crowbar",
    "weapon_machete"
  ],
  "min": 4,
  "max": 8,
  "durationMs": 30000,
  "animationDict": "amb@world_human_vehicle_mechanic@male@base",
  "animation": "base"
}

This example provides a total of 4 to 8 metalscrap per harvest cycle. Each accepted weapon hit collects one metalscrap. Completing 30 seconds of hand scavenging collects whatever remains. Set canHandScavenge to false to require weapon hits, or use an empty weapon list to allow hand scavenging only.

HOW TO PLAY

Hand scavenging

  1. Find an object configured for hand scavenging.
  2. Use your server's targeting system to start scavenging the object.
  3. Complete the scavenging duration to collect the remaining reward for that harvest cycle.

Weapon hits

  1. Find a configured object and equip one of the weapons listed in toolForScavenging.
  2. Strike the object with the approved weapon. Each accepted hit collects one reward item.

Hand scavenging and weapon hits use the same total reward for the harvest cycle. In the example above, hitting the object first reduces the amount left to collect by hand.

Partial yields and cooldowns reset when the resource or server restarts. The script does not replace or respawn props, and normal GTA damage can destroy some objects. Test your chosen models and weapons in-game before making them available to players.

{:is-warning}

TROUBLESHOOTING

The resource does not start

  • Confirm your licensing is configured in settings.ini and check the server console for license synchronization errors.
  • Confirm ensure BigDaddy-Scrap appears in server.cfg after your framework, inventory, and targeting dependencies.
  • Confirm the complete runtime folder is installed, including the client/server DLLs, supplied scripts, configuration, and NUI files.

Hand scavenging is unavailable

  • Confirm your targeting resource is running.
  • Confirm the object's model is listed in config.json and has canHandScavenge set to true.
  • Restart BigDaddy-Scrap after changing the configuration.

Weapon hits do not collect scrap

  • Confirm the weapon is listed in the object's toolForScavenging array.
  • Confirm the reward item and weapon item exist in your inventory definitions.
  • Test that the chosen prop emits damage events when struck. Some models may be destroyed by normal GTA damage.