fxGunVan

Make sure that you have a weathersync script that has an export getTime before purchasing the script !!! IMPORTANT !!!

Config File

Config = {
    UseTarget = GetConvar('UseTarget', 'false') == 'true', -- Use qb-target interactions (don't change this, go to your server.cfg and add `setr UseTarget true` to use this and just that from true to false or the other way around)
    useFxNotify = true,
    useFxTextUI = true,
    maxAmmoCount = 240,
    perAmmoPrice = 2,
    weatherSync = 'qb-weathersync', -- Make sure you are using a weather sync that has the export getTime
    inventoryIMGPath = 'qb-inventory/html/images/',
    -- Start
    spawnHourStart = 0,
    spawnMinuteStart = 0,
    -- End
    spawnHourEnd = 6,
    spawnMinuteEnd = 0,
    gameData = { -- pure-minigames setup
        totalNumbers = 15,
        seconds = 20,
        timesToChangeNumbers = 4,
        amountOfGames = 2,
        incrementByAmount = 5,
    },
    zoneOptions = { -- Used for when UseTarget is false
        length = 1.25,
        width = 2.0,
        debugPoly = false
    },
    gunVanLocations = {
        {
            coords = vector4(1871.9651, 2656.6909, 44.6833, 180.3702)
        },
        {
            coords = vector4(1399.1753, 2997.1587, 40.5526, 316.2730)
        },
        -- Here you add the coordinates for the gun van using the example above, you can add as much coords as you want
    },
    blackMarketItems = { -- You can add as much categories as you want
        {
            name = "Weapons", 
            itemCount = "all", -- Can be "all" or a number to limit the random selection
            items = {
                {
                    name = 'weapon_assaultrifle',
                    label = 'Assault Rifle',
                    price = 250000,
                    ammo_type = 'rifle'
                },
                {
                    name = 'weapon_pistol',
                    label = 'Pistol',
                    price = 50000,
                    ammo_type = 'pistol'
                },
                {
                    name = 'weapon_sniperrifle',
                    label = 'Sniper Rifle',
                    price = 125000,
                    ammo_type = 'rifle'
                },
            }
        },
        {
            name = "Ammo", 
            itemCount = 2, -- Example to limit to 2 random items
            items = {
                {
                    name = 'pistol_ammo',
                    label = 'Pistol Ammo',
                    price = 750
                },
                {
                    name = 'smg_ammo',
                    label = 'SMG Ammo',
                    price = 1000,
                },
                {
                    name = 'rifle_ammo',
                    label = 'Rifle Ammo',
                    price = 1250,
                },
            }
        },
        {
            name = "More", 
            itemCount = "all", 
            items = {
                {
                    name = 'armor',
                    label = 'Armor',
                    price = 3000
                },
            }
        },
        
    },
    Attachments = { -- Any information about the weapons you can get from here: https://gist.github.com/root-cause/3f29d38179b12245a003fb4fff615335
        weapon_pistol = {
            model = 'W_PI_PISTOL', -- ModelHashKey
            clip = {
                labelName = "Magazine",
                bone = "WAPClip",
                default_clip = {
                    component = "w_pi_pistol_mag1",
                    label = "Default Clip",
                    item = "clip_attachment",
                    price = 5000
                },
                extended_clip = {
                    component = "w_pi_pistol_mag2",
                    label = "Extended Clip",
                    item = "clip_attachment",
                    price = 5000
                },
            },
            flashlight = {
                labelName = "Flashlight",
                bone = "WAPFlshLasr",
                flashlight = {
                    component = "w_at_pi_flsh",
                    label = "Flashlight",
                    item = "flashlight_attachment",
                    price = 5000
                }
            },
            silencer = {
                labelName = "Muzzle",
                bone = "WAPSupp",
                silencer = {
                    component = "w_at_pi_supp_2",
                    label = "Suppressor",
                    item = "suppressor_attachment",
                    price = 5000
                }
            }
        },
        weapon_assaultrifle = {
            model = 'W_AR_ASSAULTRIFLE',
            clip = {
                labelName = "Magazine",
                bone = "WAPClip",
                default_clip = {
                    component = "w_ar_assaultrifle_mag1",
                    label = "Default Clip",
                    item = "clip_attachment",
                    price = 1000
                },
                extended_clip = {
                    component = "w_ar_assaultrifle_mag2",
                    label = "Extended Clip",
                    item = "clip_attachment",
                    price = 3000
                },
                drum_magazine = {
                    component = "w_ar_assaultrifle_boxmag",
                    label = "Drum Magazine",
                    item = "drum_attachment",
                    price = 5000
                },
            },
            flashlight = {
                labelName = "Flashlight",
                bone = "WAPFlshLasr",
                flashlight = {
                    component = "w_at_ar_flsh",
                    label = "Flashlight",
                    item = "flashlight_attachment",
                    price = 2350
                }
            },
            scope = {
                labelName = "Scope",
                bone = "WAPScop",
                flashlight = {
                    component = "w_at_scope_macro",
                    label = "Scope",
                    item = "smallscope_attachment",
                    price = 5000
                }
            },
            silencer = {
                labelName = "Muzzle",
                bone = "WAPSupp",
                silencer = {
                    component = "w_at_ar_supp_02",
                    label = "Suppressor",
                    item = "suppressor_attachment",
                    price = 1500
                }
            },
            grip = {
                labelName = "Grip",
                bone = "WAPGrip",
                silencer = {
                    component = "w_at_ar_afgrip",
                    label = "Grip",
                    item = "grip_attachment",
                    price = 4000
                }
            },
        },
        weapon_sniperrifle = {
            model = 'w_sr_sniperrifle',
            silencer = {
                labelName = "Muzzle",
                bone = "WAPSupp",
                silencer = {
                    component = "w_at_ar_supp_02",
                    label = "Suppressor",
                    item = "suppressor_attachment",
                    price = 1500
                }
            },
        }
    },
}

Installation Guide

If you are using QBCORE add this in your qb-core/shared/items.lua:

['fx_trapphone']                     = {['name'] = 'fx_trapphone',                       ['label'] = 'Trap Phone',              ['weight'] = 0,            ['type'] = 'item',         ['image'] = 'fx_trapphone.png',             ['unique'] = true,         ['useable'] = true,     ['shouldClose'] = true,     ['combinable'] = nil,   ['description'] = 'A Trap Phone'},

If you are using ESX add this to your database:

```INSERT INTO items (name, label) VALUES
(‘fx_trapphone’,‘Trap Phone’)
;```

|Dependencies| qb-core or esx pure-minigames - GitHub - purescripts-fivem/pure-minigames: A repo filled with minigames the team has worked on qb-target (optional) polyzone (optional) fxnotify(optional) fxtextui(optional)

Renamed frameworks most likely WON'T work!!!

Make sure that you have a weathersync script that has an export getTime before purchasing the script !!! IMPORTANT !!!

Last updated