Smash N Grab⚙️ Configuration
Configuration
You may edit this file to your desire at /config.lua.
Config = {}
-- Set to true to enable a module, false to disable it
Config.Modules = {
SmashNGrab = true,
PorchPiracy = true,
NPCRobbing = false, -- Not implemented yet
Mailbox = true, -- Not implemented yet
CarRadio = false, -- Not implemented yet
ParkingMeter = false, -- Not implemented yet
}
-- Rest of configuration is done in the configs/ files
Config.SmashNGrab = {
InventoryItem = 'package', -- Item name in your inventory
-- ['package'] = {
-- name = 'package',
-- label = 'Package',
-- weight = 500,
-- stack = false,
-- server = {
-- export = 'smashngrab:server:package'
-- }
-- }
SpawnChance = 0.10, -- Spawn chance (0-1.0), 0.10 = 10% chance for a prop to spawn in a vehicle
MaxProps = 50, -- Maximum number of props that can be spawned at once
Cooldown = {
Duration = 15, -- Duration in minutes
MaxPackagesPerCooldown = 10 -- Maximum number of packages a player can get per cooldown
},
Props = {
'v_ret_ps_bag_02',
},
SmashWindowDuration = 750, -- Progressbar duration in milliseconds
StealPackageDuration = 3000, -- Progressbar duration in milliseconds
SmashWindowWeapons = {
['WEAPON_HAMMER'] = true,
['WEAPON_BAT'] = true,
['WEAPON_CROWBAR'] = true,
},
Locales = {
['targetwindow'] = 'Smash window',
['grabbingitem'] = 'Grabbing item...',
['grabitem'] = 'Grab Item',
['cooldownactive_title'] = 'Cooldown Active',
['cooldownactive_description'] =
'You have reached the limit of %d packages. Please wait %d minute(s) before collecting more.', -- first %d = max packages, second %d = minutes remaining
},
-- Vehicle types that WILL spawn props
AllowedVehicles = {
"automobile",
"van",
"suv"
},
-- Vehicle models that NEVER spawn props
BlacklistedVehicles = {
"police",
"police2",
"police3",
"policet",
"sheriff",
"sheriff2",
"fbi",
"fbi2",
"pranger",
"riot",
"ambulance",
"firetruk",
"mule"
},
DispatchAlert = {
enabled = false,
chance = 0.20, -- 20% chance to send a dispatch alert
alert = function() -- Client-side function
exports['ps-dispatch']:CustomAlert({
coords = GetEntityCoords(PlayerPedId()),
message = 'Vehicle Break-in',
dispatchCode = '10-31',
description = 'Vehicle window smashed and items being stolen',
radius = 0,
sprite = 850,
color = 17,
scale = 0.8,
length = 1,
})
end,
},
Loot = {
RewardAmountMin = 1, -- Minimum number of items to reward
RewardAmountMax = 3, -- Maximum number of items to reward
-- Add your reward items here
Items = {
{
item = 'oxy', -- Inventory item name
chance = 30, -- Percent chance to reward the item out of 100
min = 1, -- Minimum number of the item to reward
max = 2 -- Maximum number of the item to reward
},
{
item = 'cash_roll',
chance = 50,
min = 1,
max = 4
},
{
item = 'bands',
chance = 10,
min = 1,
max = 2
},
{
item = 'easy_chop_list',
chance = 5,
min = 1,
max = 1
},
{
item = 'medium_chop_list',
chance = 5,
min = 1,
max = 1
},
}
}
}
Config.PorchPiracy = {
PoliceRequired = 0,
MaxParcels = 20,
SpawnChance = 1.0,
RespawnCooldown = 300, -- 5 minutes
SpawnDistance = 100.0,
Props = {
'prop_cs_package_01',
},
DispatchChance = 50, -- 50% chance to send a dispatch alert
DispatchAlert = function()
exports['ps-dispatch']:CustomAlert({
coords = GetEntityCoords(PlayerPedId()),
message = 'Porch Piracy',
dispatchCode = '10-31',
description = 'Porch parcel being stolen',
radius = 0,
sprite = 850,
color = 17,
})
end,
InventoryItem = 'parcel',
Loot = {
RewardAmountMin = 1,
RewardAmountMax = 3,
Items = {
{
item = 'oxy',
chance = 30,
min = 1,
max = 2
},
{
item = 'cash_roll',
chance = 50,
min = 1,
max = 4
},
}
},
Houses = {
{ coords = vec4(99.9, -1911.79, 20.41, 150.87) },
{ coords = vec4(118.37, -1921.1, 20.32, 57.02) },
{ coords = vec4(115.14, -1920.05, 19.94, 44.35) }
}
}