ScriptsM Smash&Grab

ScriptsM Smash & Grab

Smash & Grab brings realistic package theft to your FiveM server. Players can steal deliveries left at doorsteps or smash vehicle windows to loot packages from inside cars, creating creating an additional source of income and work for the police.

Installation

Download a resource (opens in a new tab) from keymaster or buy it by buttons at the top

Resource start order

It's important for your resources to start in a logical order to prevent errors from missing dependencies.

start [your framework]
start [your target system]
start [your inventory]
start sm-smashngrab

Setting up Discord logs

Go to your server.cfg Insert sv_itemtheft_webhook "https://discord.com/api/webhooks/XXXXXXXX" into config Replace link with your webhook

Config

There you can find an config of resource with description for all params

-- config.lua
Config = {}
 
-- General toggles and settings
Config.Debug = false -- Enable verbose debugging
Config.Notify = 'qb' -- 'qb' or 'custom' or '-'
-- Config.ProgressBar = 'ox'  -- 'qb' or 'ox' or '-'
Config.Target = 'ox' -- 'qb' or 'ox'
Config.Framework = 'qb' -- 'qb' or 'esx'
 
Config.CustomNotify = function(msg)
end
 
Config.DispatchExport = function(code, title, coords, msg)
    exports['ps-dispatch']:CustomAlert({
        code = code,
        title = title,
        coords = coords,
        message = msg,
        blip = { sprite = 66, color = info.color, scale = 1.2, length = info.length },
        vehicle = nil
    })
end
 
Config.Locales = {
    ['stealpackage'] = 'Steal Package',
    ['smashwindow'] = 'Smash Window & Loot',
    ['sell'] = 'Sell %s ($%d - $%d)',
    ['sellgoods'] = 'Sell stolen goods',
    ['selling'] = 'Selling...',
    ['close'] = 'close',
    ['nogoods'] = 'You have no stolen goods to sell.',
    ['pawnshop'] = 'Pawn Shop',
    ['youhave'] = 'You have %dx %s',
    ['theftnearby'] = 'Theft opportunity nearby!',
    ['theftblip'] = 'Theft Opportunity',
    ['failedtoloot'] = 'You failed to loot anything.',
    ['lootingitems'] = 'Looting items...',
    ['getcloser'] = 'Get closer to the vehicle.',
    ['getcloserpackage'] = 'Get closer to the vehicle.',
    ['badtarget'] = 'This vehicle is not a good target.',
    ['novehicle'] = 'Vehicle not found.',
    ['stolencount'] = 'You cannot carry more stolen goods right now.',
    ['timer'] = 'You need to wait %ss before looting another vehicle.',
    ['alreadybroken'] = 'This vehicle is already broken in to',
    ['nothinghere'] = 'Nothing here',
    ['searching'] = 'Searching package...',
    ['stoppedsearching'] = 'Searching package...',
    ['packagegone'] = 'The package is gone',
    ['spotted'] = 'A suspicious package has been spotted nearby! Check your map for the location.',
}
 
-- Dispatch alert base chances in percent
Config.DispatchChance = {
    packages = 100, -- suspicious package theft
    cars = 100, -- vehicle break-in
    pawn = 100 -- pawn fencing report
}
 
-- Cooldowns in milliseconds
Config.Cooldowns = {
    packages = 120000, -- 2 minutes
    cars = 180000 -- 3 minutes
}
 
-- Max number of stolen items per character session
Config.MaxStolenPerSession = 5
 
-- Blacklist zones: disallow theft in these areas.
Config.BlacklistZones = {
    vector3(441.16, -981.94, 30.69), -- MRPD
    vector3(1853.24, 3690.52, 34.27), -- Sandy PD
    vector3(-441.35, 6011.75, 31.72) -- Paleto PD
}
 
Config.BlacklistClasses = {
    8,
    10,
    11,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
    20,
    21,
    22
}
 
-- House locations (~50). Use realistic Los Santos residential spots.
Config.HouseLocations = {
vector3(313.0817, -218.2473, 54.2217),
}
 
Config.Jobs = {
    'unemployed'
}
 
-- Door package item pool
Config.DoorPackages = {
    {
        name = 'stolen_electronics',
        label = 'Electronics Box',
        model = 'prop_cs_box_clothes',
        weight = 1.5,
        rarity = 40
    }, {
        name = 'stolen_jewelry',
        label = 'Jewelry Pouch',
        model = 'prop_cs_box_clothes',
        weight = 0.5,
        rarity = 30
    }, {
        name = 'stolen_clothes',
        label = 'Clothing Bag',
        model = 'prop_cs_clothes_box',
        weight = 2.0,
        rarity = 30
    }
}
 
-- Car seat items pool
Config.CarItems = {
    {
        name = 'stolen_laptop',
        label = 'tablet',
        model = 'prop_cs_clothes_box',
        weight = 1.0,
        rarity = 50
    }, {
        name = 'stolen_wallet',
        label = 'Wallet',
        model = 'prop_cs_box_clothes',
        weight = 0.2,
        rarity = 30
    }, {
        name = 'stolen_gps',
        label = 'GPS Device',
        model = 'prop_cs_box_clothes',
        weight = 0.3,
        rarity = 20
    }
}
 
-- Pawn Shop settings
Config.PawnShop = {
    location = vector3(-1033.8380, -1586.4801, 5.1069),
    pedModel = 'a_m_m_business_01',
    items = {
        {
            name = 'stolen_electronics',
            price = 800,
            minPrice = 600,
            maxPrice = 1000
        },
        {name = 'stolen_jewelry', price = 1200, minPrice = 900, maxPrice = 1500},
        {name = 'stolen_clothes', price = 400, minPrice = 250, maxPrice = 600},
        {name = 'stolen_tablet', price = 1500, minPrice = 1100, maxPrice = 1800},
        {name = 'stolen_wallet', price = 250, minPrice = 150, maxPrice = 350},
        {name = 'stolen_gps', price = 400, minPrice = 300, maxPrice = 550}
    },
    lowballChance = 5 -- %
}
 
-- Animations and durations (not fully functional yet)
Config.Animations = {
    searchPackage = {
        dict = 'cover@first_person@move@base@core',
        anim = 'low_idle_r_facecover',
        flag = 1,
        duration = 2000
    },
    smashWindow = {
        dict = 'veh@std@rds@enter_exit',
        anim = 'd_force_entry',  
        flag = 1,
        duration = 1200
    },
    lootCar = {
        dict = 'amb@prop_human_bum_bin@base',
        anim = 'base', 
        flag = 1,
        duration = 2000
    },
    sellItem = {
        dict = 'mp_common',
        anim = 'givetake1_a',
        flag = 1,
        duration = 1500
    }
}
 
-- Misc delays/timers
Config.Delays = {
    scanInterval = 5000, -- vehicle/house scan frequency
    propCleanup = 5000, -- half minute
    policeDebuff = 300000 -- +50% failure for 5min after alert
}
 
-- Dispatch message templates (not fully functional yet)
Config.Dispatch = {
    packageAlert = {
        code = '10-66',
        description = 'Suspicious package theft at %s',
        color = 3,
        length = 3
    },
    carAlert = {
        code = '10-31',
        description = 'Vehicle break-in at %s (%s)',
        color = 1,
        length = 3
    },
    pawnAlert = {
        code = '10-67',
        description = 'Fencing activity at pawn shop',
        color = 4,
        length = 2
    }
}
 
-- Tunables
Config.PackageSuccessChance = 95 -- %
Config.CarSuccessChance = 90 -- %
Config.PackageDispatchRange = {10, 20} -- min, max %
Config.CarDispatchRange = {15, 25} -- min, max %
 
-- Vehicle filtering
Config.VehicleScanRadius = 50.0 -- meters
Config.ExcludePlayerOwned = true
Config.ExcludeMoving = true
Config.MinVehicleSpeed = 1.0
 
-- Max networked props globally (soft limit)
Config.MaxWorldProps = 10
 
-- Night bonus for electronics-type rarities (00:00-05:59)
Config.NightBonus = {
    startHour = 0,
    endHour = 6,
    electronicsRarityBonusPercent = 20
}
 
-- Notifications helper config
Config.NotifyIcons = {success = 'check', error = 'times', info = 'info-circle'}