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
      • ✈️Airplane Job
        • 🛠️Installation
        • 📃Configs
        • ℹ️Exports
      • 📋Scoreboard
        • 📃Config
      • 📦StorageUnits
        • 🛠️Installation
        • 📃Config
Powered by GitBook
On this page
  • Check if a Vehicle has Insurance
  • Check if a Vehicle has Registration
  • Check if a Player has Health Insurance
  • Check if a Player has Home Insurance
  • Get Insurance Data for a Player or Vehicle
  • Check if a Vehicle have Documents Suspended
  • Give Vehicle Insurance
  • Give Vehicle Registration
  • Give Health Insurance
  • Give Home Insurance
  • Remove Vehicle Insurance
  • Remove Vehicle Registration
  • Remove Health Insurance
  • Remove Home Insurance
  1. QBCore
  2. General
  3. [QB] Insurance

Server-Exports

Check if a Vehicle has Insurance

  • Export: HasCarInsurance(plate, cb)

  • Description: Checks if a vehicle with the given plate has insurance.

Usage:

exports['m-Insurance']:HasCarInsurance('ABC123', function(hasInsurance)
    if hasInsurance then
        print("Vehicle is insured")
    else
        print("Vehicle is not insured")
    end
end)

Check if a Vehicle has Registration

  • Export: HasCarRegistration(plate, cb)

  • Description: Checks if a vehicle with the given plate has registration.

  • Usage:

exports['m-Insurance']:HasCarRegistration('ABC123', function(hasRegistration)
    if hasRegistration then
        print("Vehicle is registered")
    else
        print("Vehicle is not registered")
    end
end)

Check if a Player has Health Insurance

  • Export: HasHealthInsurance(identifier, cb)

  • Description: Checks if the player with the given citizenid has health insurance.

  • Detail: Identifier must be citizenID

  • Usage:

exports['m-Insurance']:HasHealthInsurance('playerID123', function(hasInsurance)
    if hasInsurance then
        print("Player has health insurance")
    else
        print("Player does not have health insurance")
    end
end)

Check if a Player has Home Insurance

  • Export: HaveHomeInsurance(identifier, cb)

  • Description: Checks if the player with the given citizenid has home insurance.

  • Detail: Identifier must be citizenID

  • Usage:

exports['m-Insurance']:HaveHomeInsurance('playerID123', function(hasInsurance)
    if hasInsurance then
        print("Player has home insurance")
    else
        print("Player does not have home insurance")
    end
end)

Get Insurance Data for a Player or Vehicle

  • Export: GetInsuranceData(insuranceType, identifier, cb)

  • Description: Retrieves the insurance data based on the insurance type (vehicles, health, or home).

  • Usage:

exports['m-Insurance']:GetInsuranceData('vehicles', 'ABC123', function(data)
    if data then
        print("Insurance Data: ", data)
    else
        print("No insurance data found")
    end
end)

Check if a Vehicle have Documents Suspended

  • Export: HasDocumentsSuspended(plate, cb)

  • Description: Grants vehicle insurance to a player for the specified plate and model with an expiration date.

  • Usage:

exports['m-Insurance']:HasDocumentsSuspended('ABC123', function(hasDocumentSuspended)
    if hasDocumentSuspended then
        print("The plate has the documents suspended!")
    else
        print("The plate dosen't have the documents suspended!")
    end
end)

Give Vehicle Insurance

  • Export: GiveCarInsurance(src, plate, model, expire_months, identifier, owner_name)

  • Description: Grants vehicle insurance to a player for the specified plate and model with an expiration date.

  • Usage:

exports['m-Insurance']:GiveCarInsurance(src, 'ABC123', 'CarModel', 1, 'playerID123', 'OwnerName')

Give Vehicle Registration

  • Export: GiveCarRegistration(src, plate, model, expire_months, identifier)

  • Description: Grants vehicle registration to a player for the specified plate and model with an expiration date.

  • Usage:

exports['m-Insurance']:GiveCarRegistration(src, 'ABC123', 'CarModel', 1, 'playerID123')

Give Health Insurance

  • Export: GiveHealthInsurance(src, identifier, expire_months, owner_name)

  • Description: Grants health insurance to a player for the specified identifier with an expiration date.

  • Usage:

exports['m-Insurance']:GiveHealthInsurance(src, 'playerID123', 1, 'OwnerName')

Give Home Insurance

  • Export: GiveHomeInsurance(src, identifier, expire_months, owner_name)

  • Description: Grants home insurance to a player for the specified identifier with an expiration date.

  • Usage:

exports['m-Insurance']:GiveHomeInsurance(playerID, 'playerID123', 1, 'OwnerName')

Remove Vehicle Insurance

  • Export: RemoveCarInsurance(plate)

  • Description: Removes insurance for the vehicle with the given plate.

  • Usage:

exports['m-Insurance']:RemoveCarInsurance('ABC123')

Remove Vehicle Registration

  • Export: RemoveCarRegistration(plate)

  • Description: Removes registration for the vehicle with the given plate.

  • Usage:

exports['m-Insurance']:RemoveCarRegistration('ABC123')

Remove Health Insurance

  • Export: RemoveHealthInsurance(identifier)

  • Description: Removes health insurance for the player with the given identifier.

  • Usage:

exports['m-Insurance']:RemoveHealthInsurance('playerID123')

Remove Home Insurance

  • Export: RemoveHomeInsurance(identifier)

  • Description: Removes home insurance for the player with the given identifier.

  • Usage:

exports['m-Insurance']:RemoveHomeInsurance('playerID123')
PreviousConfigNext[QB] Vespucci

Last updated 1 month ago

📔
🔁