m-Scripts
  • m-Scripts Documentation
  • QBCore
    • Jobs
      • 🚗[QB] TunerJob
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🍞[QB] BeanMachine
        • 🛠️Installation
        • 🗒️Config
      • 🍔[QB] Burgershot
        • 🛠️Installation
        • 🗒️Config
      • 🍈[QB] CoolBeans
        • 🛠️Installation
        • 🗒️Config
      • 🚚[QB] Deliveries
        • 🛠️Installation
        • 📃Config
          • 📃config_functions
      • 🍎[QB] Farming
        • 🛠️Installation
        • 🗒️Config
      • 🐟[QB] Fishing
        • 🛠️Installation
        • 🗒️Config
          • 📄config_diving
          • 📄config_fishingnet
          • 📄config_fishingrod
          • 📄config_functions
          • 📄config_language
          • 📄config_seashells
          • 📄config_tournament
          • 📄config_upgrades
      • 🚛[QB] Garbage
        • 🛠️Installation
        • 🗒️Config
      • 🗝️[QB] GoldRush
        • 🛠️Installation
        • 🗒️Config
      • ⛰️[QB] Hunting
        • 🛠️Installation
        • 🗒️Config
      • 🪵[QB] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[QB] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🛢️[QB] Oil Factory
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • ☕[QB] Pond Coffee
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🚚[QB] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🥃[QB] Vanilla
        • 🛠️Installation
        • 🗒️Config
      • 🛻[QB] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • 🥃[QB] Bahamas
        • 🛠️Installation
        • 📄Config
      • 🔫[QB] Ammunation
        • 🛠️Installation
        • 📄Config
      • 🐟[QB] Pearls
        • 🛠️Installation
        • 📄Config
      • 🔓[QB] Impound
        • 🛠️Installation
        • 📄Config
        • ✅Garages
      • 🚘[QB] Vehicleshop
        • 🛠️Installation
        • 📄Config
          • Functions
          • Job
          • Language
        • ❓Common Questions
    • General
      • 🏕️[QB] Camping
        • 🛠️Installation
        • 🗒️Config
          • Consumables
          • Language
      • 🎄[QB] Christmas
        • 🛠️Installation
        • 🗒️Config
      • 🎃[QB] Halloween
        • 🛠️Installation
        • 🗒️Config
      • 📔[QB] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 🗒️Config
        • 🔁Server-Exports
      • 🏘️[QB] Vespucci
        • 🛠️Installation
        • 🗒️Config
          • Brewery
          • Digital Den
          • Masquerade
          • Pro Bikes
      • 🏖️[QB] Beach Activities
        • 🛠️Installation
        • 🗒️Config
      • 🚘[QB] Car Rental
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • ✈️[QB] Sky Racing
        • 🛠️Installation
        • 📄Config
      • 🚘[QB] Car Wash
        • 🛠️Installation
        • 📄Config
      • 🪨[QB] Grinder
        • 🛠️Installation
        • 📄Config
      • 📹[QB] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
      • 🏠[QB] Motel
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • 🏚️[QB] Job Center
        • 📄Config
      • 🛠️[QB] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
    • Illegal
      • 🔫[QB] Gangs
        • 🛠️Installation
        • 🗒️Config
      • 🔔[QB] Drug Selling
        • 🗒️Config
      • 🌱[QB] Drugs
        • 🛠️Installation
        • 🗒️Config
      • 🍯[QB] Craft Potion
        • 🛠️Installation
        • 🗒️Config
      • 🅱️[QB] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🚗[QB] Car Thief
        • 🗒️Config
      • 🏠[QB] House Robbery
        • 🛠️Installation
        • 🗒️Config
      • 💎[QB] Jewelry
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ®️[QB] Mini Robberys
        • 🛠️Installation
        • 🗒️Config
      • 💰[QB] MoneyWash
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🔫[QB] Rob NPC
        • 🛠️Installation
        • 🗒️Config
      • 🏃‍♂️[QB] Runs
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ⛽[QB] Steal Fuel
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🏬[QB] Store Robbery
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🪛[QB] Scrapyard
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 👾[QB] Territories
        • 🛠️Installation
        • 📄Config
          • Functions
      • 🏨[QB] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • ESX
    • Jobs
      • 🚗[ESX] Tunerjob
        • ❗Dependencies
        • 🛠️Installation
          • ℹ️OX-Inventory
          • ℹ️QS-Inventory
        • 🗒️Config
          • BlacklistVehicles
          • Craft
          • Functions
          • Language
          • Targets
          • Wraps
          • Events
        • ❓Common Questions
      • 🚚[ESX] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🪵[ESX] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • 🛻[ESX] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[ESX] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🎣[ESX] Fishing
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • Diving
          • Fishingnet
          • Fishingrod
          • Seashells
          • Tournament
          • Upgrades
    • General
      • 🚘[ESX] Car Rental
        • 🛠️Installation
        • 🗒️Config
      • 📃[ESX] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 📄Config
        • 🔁 Server-Exports
      • 🚘[ESX] Car Wash
        • 🛠️Installation
        • 📄Config
      • 📹[ESX] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
        • 🏠[ESX] Motel
          • 🛠️Installation
          • 📄Config
          • 🖥️Compatibilities
      • 🛠️[ESX] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🎄[ESX] Christmas
        • 🛠️Installation
        • 📄Configs
    • Illegal
      • 🔫[ESX] Gangs
        • 🛠️Installation
        • 📄Config
        • ❓Common Questions
      • 🅱️[ESX] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🏨[ESX] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • Both Framework
    • Scripts
      • 🚗Car Rebuild
        • 🛠️Installation
        • 🗒️Config
      • 🗺️City Guide
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🛒Shops
        • 📄Config
        • 🛠️Installation
      • 🔁Reputation
        • 📄Config
        • 🛠️Installation
        • ⁉️Exports & Commands
          • Server Exports
          • Commands
      • 💤AFK System
        • 📄Configs
        • 🛠️Installation
      • 🚗Garages
        • 🛠️Installation
        • 📑User Guide
          • Create Garages
          • Create Private Garage
          • Impound & Auctions
          • Add vehicle to gang/job
          • Commands
        • 🔁Compatibilities
      • ✈️Airplane Job
        • 🛠️Installation
        • 📃Configs
        • ℹ️Exports
      • 📋Scoreboard
        • 📃Config
      • 📦StorageUnits
        • 🛠️Installation
        • 📃Config
Powered by GitBook
On this page
  1. QBCore
  2. Illegal
  3. [QB] Car Thief

Config

Config = {}

----------------------
-- UTILITY
----------------------
Config.Core = "qb-core" -- Your Core Name
Config.Display = "target" -- "target" or "3dtext"
Config.Target = "qb" -- "qb" or "ox"
Config.Inventory = "qb" -- "qb" or "ox"
Config.HelpText = "qb" -- "qb" or "ox"
Config.Notify = "qb" -- "standalone" or "qb" or "okok" or "ox"
Config.VehicleKeys = "qb" -- "qb" or "qs" or "renewed" or "jaksam" or "wasabi" ( open code on config_functions.lua )
Config.GiveKeys = true -- Give keys to the player when start mission ( if you dont have any coding for people steal or get the keys )
Config.Payment = "cash" -- "cash" or "bank" or "black_money" or "item" ( open code on s_utils.lua )

Config.LevelSystem = {
	vehicles = 0, -- 0 Experience need for starting a vehicle heist
	boats = 100, -- 100 Experience need for starting a boat heist
	planes = 200, -- 200 Experience need for starting a plane heist
}

Config.CallCops = {
	enable = false, -- Enable or Disable the call to the cops
	chance = 70, -- Chance of calling the cops
	dispatch = "ps-dispatch", -- "ps-dispatch" or "cd_dispatch" or "qs-dispatch"
}

Config.StartMission = {
	location = vector3(1275.78, -1710.48, 54.77), -- Location to start the mission
	blip = {enable = true, sprite = 480, color = 5, scale = 0.8, label = "Vehicle Heist"}, -- Blip settings
	minigame = false, -- Enable or Disable the minigame ( https://github.com/Project-Sloth/ps-ui )
}

Config.FinishMission = {
	vehicle = {
        vector3(-3054.41, 605.84, 7.23), --803
        vector3(259.08, -1795.08, 27.11), -- southside post 130
        vector3(-166.08, -30.23, 52.54), -- postal 556 hawick ave
        vector3(955.19, -201.15, 73.17), -- 409 mirror park blvd
        vector3(689.57, 602.61, 128.91), -- 596 theater
        vector3(-2355.24, 267.99, 165.64), -- kortz center 819 -- Location to deliver the vehicle
    },
	boat = {
		vector3(97.43, -2457.74, 0.44), -- Location to deliver the boat
	},
	airplane = {
		vector3(1705.33, 3253.09, 41.01), -- Location to deliver the plane
	},
}

Config.PossibleSpawns = {
	Vehicles = {
		[1] = { 
			coords = vector4(558.65, -1797.84, 29.2, 349.07), -- Vehicle spawn location
			vehicle = "adder", -- Vehicle model
			prize = math.random(2500,7500), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[2] = { 
			coords = vector4(476.82, -1776.67, 28.67, 267.31), -- Vehicle spawn location
			vehicle = "t20", -- Vehicle model
			prize = math.random(4255,8962), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[3] = { 
			coords = vector4(434.21, -1840.51, 27.99, 224.9), -- Vehicle spawn location
			vehicle = "sanchez", -- Vehicle model
			prize = math.random(750,1700), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[4] = { 
			coords = vector4(356.13, -1896.14, 24.8, 241.98), -- Vehicle spawn location
			vehicle = "kuruma", -- Vehicle model
			prize = math.random(3250,4750), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[5] = { 
			coords = vector4(311.6, -1939.67, 24.64, 230.46), -- Vehicle spawn location
			vehicle = "blista", -- Vehicle model
			prize = math.random(3250,4750), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
	},
	Boats = {
		[1] = { 
			coords = vector4(-305.5, -2524.96, -0.36, 47.96), -- Vehicle spawn location
			vehicle = "seashark", -- Vehicle model
			prize = math.random(2500,7500), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[2] = { 
			coords = vector4(-461.84, -2229.93, -0.47, 155.75), -- Vehicle spawn location
			vehicle = "speeder", -- Vehicle model
			prize = math.random(2500,7500), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[3] = { 
			coords = vector4(-802.75, -1505.47, -0.47, 107.4), -- Vehicle spawn location
			vehicle = "tropic2", -- Vehicle model
			prize = math.random(2500,7500), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
	},
	Planes = {
		[1] = { 
			coords = vector4(-1073.04, -2951.24, 13.95, 146.35), -- Vehicle spawn location
			vehicle = "mammatus", -- Vehicle model
			prize = math.random(2500,7500), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[2] = { 
			coords = vector4(-978.69, -3001.75, 13.95, 59.34), -- Vehicle spawn location
			vehicle = "dodo", -- Vehicle model
			prize = math.random(2500,7500), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
		[3] = { 
			coords = vector4(-1651.82, -3143.68, 13.99, 329.65), -- Vehicle spawn location
			vehicle = "velum", -- Vehicle model
			prize = math.random(2500,7500), -- Random prize
			experience = math.random(1,2), -- Random experience earned
		},
	},
}```lua
function SendHelpText(msg, position)
    if Config.HelpText == "qb" then
        exports['qb-core']:DrawText(msg, position)
    elseif Config.HelpText == "ox" then
        lib.showTextUI(msg)
    end
end

function RemoveHelpText()
    if Config.HelpText == "qb" then
        exports['qb-core']:HideText()
    elseif Config.HelpText == "ox" then
        lib.hideTextUI()
    end
end

function Notify(msg, type, time)
    if Config.Notify == "standalone" then
        BeginTextCommandThefeedPost("STRING")
        AddTextComponentSubstringPlayerName(msg)
        EndTextCommandThefeedPostTicker(true, true)
    elseif Config.Notify == "qb" then
        QBCore.Functions.Notify(msg, type, time)
    elseif Config.Notify == "okok" then
        exports['okokNotify']:Alert('Notification', msg, 5000, type, true)
    elseif Config.Notify == "ox" then
        lib.notify({ title = 'Notification', description = msg, type = type })
    end
end

function GiveKeys(vehicle)
    local plate = GetVehicleNumberPlateText(vehicle)
    local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
    if Config.VehicleKeys == "qb" then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    elseif Config.VehicleKeys == "qs" then
        exports['qs-vehiclekeys']:GiveKeys(plate, model)
    elseif Config.VehicleKeys == "renewed" then
        exports['Renewed-Vehiclekeys']:addKey(plate)
    elseif Config.VehicleKeys == "jaksam" then
        TriggerServerEvent("vehicles_keys:selfGiveVehicleKeys", plate)
    elseif Config.VehicleKeys == "wasabi" then
        exports.wasabi_carlock:GiveKey(plate)
    end
end

function CallCops(spawnLocation, vehicleModel)
    if Config.CallCops.dispatch == 'cd_dispatch' then
        local data = exports['cd_dispatch']:GetPlayerInfo()
        TriggerServerEvent('cd_dispatch:AddNotification', {
            job_table = {'police'},
            coords = spawnLocation,
            title = '10-10 - Car Thief',
            message = 'A '..data.sex..' possibly committing a crime '..data.street,
            flash = 0,
            unique_id = tostring(math.random(0000000,9999999)),
            blip = {
                sprite = 156,
                scale = 1.2,
                colour = 1,
                flashes = false,
                text = '911 - Illegal Fishing',
                time = (5*60*1000),
                sound = 1,
            }
        })
    elseif Config.CallCops.dispatch == 'ps-dispatch' then
        exports["ps-dispatch"]:CustomAlert({
            coords = spawnLocation,
            message = "911 - Car Thief",
            dispatchCode = "10-10 Car Thief",
            description = "possibly committing a crime",
            gender = true,
            radius = 0,
            sprite = 156,
            color = 1,
            scale = 1.2,
            length = 3,
        })
    elseif Config.CallCops.dispatch == 'qs-dispatch' then
        TriggerServerEvent('qs-dispatch:server:CreateDiapatchCall', {
             job = 'police',
             callLocation = spawnLocation,
             callCode = {code = '911 - Car Thief', snippet = '10-10 Car Thief'},
             message = 'possibly committing a crime',
             flashes = 'Boolean',
             image = 'URL.png',
             blip = {
                sprite = 110,
                scale = 1.5,
                colour = 1,
                flashes = true,
                text = '10-10 Car Thief',
                time = (6*60*1000),-- 6 minutes
            }
        })
    end
end
Previous[QB] Car ThiefNext[QB] House Robbery

Last updated 3 months ago

🚗
🗒️