ScrapCollect

Collecting scrap.

Introduction

This script lets your users collect scrap around the map.

Preview

Configuration

Full information about what configuration option means what, is written in the README.md, which is in the .zip file when downloaded from Keymaster.

General

Config = {}
Config.spawnRate = 0.65 -- Spawnrate for each prop
Config.spawnRange = 100 -- From what range a prop is loaded in
Config.markerRange = 10 -- From what range the marker is visible
Config.useRange = 3 -- From what range the prop can be picked up
Config.maxScraps = 20 -- How many scraps one user can pick up per day
Config.collectTime = 5 -- How long the emote takes
Config.maxFrameRate = 144 -- How many times per second to load the menu, set to 240 if users report flickering of menus

Markers and text

Config.defaultMarker = true -- Enable the default marker (yellow cone)
Config.text3d = true -- Enable the 3d text
Config.interactPopup = true -- Enable the top left message when picking up
Config.markerType = 0 -- What type of marker to use
Config.markerColor = {255, 128, 100} -- Color of the marker

Language

Config.lang = {
['pickUpScrap'] = 'Press ~INPUT_CONTEXT~ to pick up the scrap.', -- top left text
['pickUpScrap3d'] = 'Press ~g~E~w~ to pick up the scrap.', -- 3d text
}

Keybinds and emotes

Config.collectKeybind = 51 -- Key to take item
Config.scenario = "PROP_HUMAN_BUM_BIN" -- Emote when take item

Spawning of objects and rewards

Config.props = {
-- A list of props. Default props are in the config when the script is bought
}
Config.locations = {
-- A list of locations. Default locations are in the config when the script is bought.
}
-- One of these items is awarded when a scrap is picked up. Amount is picked random between minAmount and maxAmount
Config.items = {
{
item = 'xtcbaggy',
chance = 100,
minAmount = 3,
maxAmount = 4
},
{
item = 'tablet',
chance = 200,
minAmount = 1,
maxAmount = 2
},
}
Config.giveAward = function(item, amount)
-- The function to give the item to the user. QBCore and ESX versions are in the bought script, customize for yourself if you have a custom framework.
end