vms* store - Docs
Purchase Asset
  • Welcome
  • Official Store
  • Discord
  • Helpful
    • Basic Server Knowledge
      • How to import SQL to database?
      • How to update server artifacts?
    • General Issues
    • Prepared Resources
  • ASSETS
    • vms_notifyV2
      • Installation
      • FAQ
      • Guides
        • Text Formatting
        • Swap in framework
      • Developer API
        • Client Exports
        • Server Events
      • Configuration Files
        • config.lua
        • config.js
    • vms_bossmenu
      • Installation
      • Compatibility
      • FAQ
      • Guides
        • Creating job2 on ESX
        • Paychecks Integration
      • Developer API
        • Client Exports
        • Client Events
        • Server Exports
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
    • vms_cityhall
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Guides
        • License Revocation
        • Personal Taxes Integration
        • Business Taxes Integration
        • Paychecks Integration
        • Add SSN Generation
        • Generate SSN for Players
        • Add VIN Generation
        • Generate VIN for Vehicles
      • Developer API
        • Client Exports
        • Server Exports
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.shared.lua
        • config.clerks.lua
        • config.taxes.lua
        • config.js
    • vms_documentsV2
      • Installation
      • FAQ
      • Common Errors
      • Guides
        • Add SSN Generation
        • Generate SSN for Players
        • Creating New Document
        • Driving School Integration
      • Developer API
        • Client Exports
        • Server Exports
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • metadata.js
    • vms_garagesV2
      • Installation
      • Compatibility
        • Housings
          • qs-housing
          • esx_property
          • bcs_housing
        • Phones
          • yflip-phone
          • qs-smartphone-pro
        • Other
          • VehicleDeformation
          • kq_wheeldamage
      • FAQ
      • Common Errors
      • Guides
        • Interior Stuck Prevention
        • Registering House Garage
      • Developer API
        • Client Exports
        • Server Exports
        • Server Events
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.garages.lua
        • config.management.lua
        • config.parkingcreator.lua
        • config.js
    • vms_houserobberies
      • Installation
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.items.lua
        • config.interiors.lua
        • config.houseslist.lua
        • config.configurator.lua
    • vms_vehicleshopV2
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Guides
        • Adjusting Required Licenses
        • Adjusting orderprice
        • Photos Tool
      • Developer API
        • Client Exports
        • Client Events
        • Server Exports
        • Commands
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
        • config.showroom.lua
        • config.js
    • vms_stores
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.camera.lua
        • config.robbery.lua
        • config.storemanage.lua
        • config.js
    • vms_reports
      • Installation
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.js
    • vms_tuning
      • Installation
      • FAQ
      • Common Errors
      • Guides
        • Garage Integration
          • jg-advancedgarages
        • Understanding Prices
        • Using whitelist & blacklist
        • Fix tuning parts names from NULL
        • Paychecks from the built-in balance
      • Developer API
        • Client Exports
        • Server Exports
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.vehicles.lua
        • config.tuningmenu.lua
        • config.installationparts.lua
        • config.custommods.lua
        • config.missions.lua
    • vms_gym
      • Installation
      • FAQ
      • Common Errors
      • Developer API
        • Client Exports
        • Server Exports
        • Server Events
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
    • vms_hud
      • Installation
      • FAQ
      • Common Errors
      • Developer API
        • Client Exports
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.js
    • vms_spawnselector
      • Installation
      • Compatibility
        • vms_multichars
        • esx_multicharacter
        • esx_identity
        • qb-multicharacter
      • FAQ
      • Developer API
        • Client Exports
        • Server Events
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
    • vms_guidebook
      • Installation
      • Guides
        • Text Formating
      • Developer API
        • Client Exports
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
        • pages.js
    • vms_coinshop
      • Installation
      • Configuration Files
        • config.lua
    • vms_vehicleshop
      • Installation
      • Configuration Files
        • config.lua
    • vms_gangmissions
      • Installation
      • Guides
        • Connection to NPCTALK
      • Configuration Files
        • config.lua
    • vms_charcreator
      • Installation
      • Compatibility
        • vms_multichars
        • esx_multicharacter
        • esx_identity
        • qb-multicharacter
        • ZSX_Multicharacter
        • renzu_multicharacter
      • FAQ
      • Developer API
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
    • vms_clothestore
      • Installation
      • Compatibilty
      • Common Errors
      • Developer API
        • Client Exports
        • Client Events
        • Server Events
      • Configuration Files
        • config.lua
        • config.prices.lua
        • config.js
    • vms_multichars
      • Installation
      • Compatibilty
      • Common Errors
      • Developer API
        • Commands
      • Configuration Files
        • config.lua
        • config_client.lua
        • config_server.lua
        • config_commands.lua
    • vms_identity
      • Installation
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
    • vms_barber
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
    • vms_tattooshop
      • Installation
      • Compatibility
      • FAQ
      • Common Errors
      • Guides
        • New ADD-ON Tattoos
      • Developer API
        • Client Exports
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.management.lua
        • config.tattoos.lua
    • vms_driveschoolV2
      • Installation
      • Compatibility
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
    • vms_boatschoolV2
      • Installation
      • Compatibility
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.routes.lua
    • vms_flightschoolV2
      • Installation
      • Compatibility
      • Common Errors
      • Configuration Files
        • config.lua
        • config.client.lua
        • config.server.lua
        • config.routes.lua
    • vms_documents
      • Installation
      • Guides
        • Adding to radialmenu
        • Usage of documents
        • Adding new documents
      • Configuration Files
        • config.lua
    • vms_anims
      • Installation
      • Guides
        • Adding animations
        • Adding more binds
      • Developer API
        • Client Exports
      • Configuration Files
        • config.lua
        • animations.lua
        • keybinds.lua
    • vms_weaponshop
      • Installation
      • Configuration Files
        • config.lua
    • vms_notify
      • Installation
      • Guides
        • Implementation
        • Replace core notifications
Powered by GitBook
On this page
  • 1. Download Resource
  • 2. Install Required Dependencies
  • 3. Import Database Tables
  • 4. Add Required Items
  • 5. Adjust Metadatas for Inventory
  • 6. Additional Integrations
  • 7. Start Resource

Was this helpful?

  1. ASSETS
  2. vms_documentsV2

Installation

Last updated 1 month ago

Was this helpful?

1. Download Resource

Download the purchased resource from - the official site of FiveM with purchased resources.


2. Install Required Dependencies

This script needs a few extra resources to work properly. Below you will find a list of things to download - click the link, download and upload to your server just like other resources.

Resource
Download Link

MugShotBase64

https://github.com/BaziForYou/MugShotBase64

3. Import Database Tables

This is a very important step - without it, the script will not work properly. Depending on the framework you are using (ESX or QB-Core), select the appropriate section below and Paste the SQL code into your database.

Not sure how to do it?

No worries - we've prepared a short guide that shows you step by step how to import an SQL file into your database: 👉

Database for ESX
ALTER TABLE `users` ADD COLUMN `ssn` varchar(16) DEFAULT NULL;

CREATE TABLE IF NOT EXISTS `player_documents` (
  `serial_number` varchar(50) NOT NULL DEFAULT '',
  `owner` varchar(80) DEFAULT NULL,
  `type` varchar(80) DEFAULT NULL,
  `photo` longtext DEFAULT NULL,
  `valid` tinyint(4) DEFAULT 1,
  `for_pickup` tinyint(4) DEFAULT 0,
  PRIMARY KEY (`serial_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
Database for QB-Core
CREATE TABLE IF NOT EXISTS `player_documents` (
  `serial_number` varchar(50) NOT NULL DEFAULT '',
  `owner` varchar(80) DEFAULT NULL,
  `type` varchar(80) DEFAULT NULL,
  `photo` longtext DEFAULT NULL,
  `valid` tinyint(4) DEFAULT 1,
  `for_pickup` tinyint(4) DEFAULT 0,
  PRIMARY KEY (`serial_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

4. Add Required Items

The script uses its own items. Depending on what inventory you are using, select the appropriate section and add these items to either your item file or database.

Items for esx inventory
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
    ("id_card", "ID Card", 10, 0, 1),
    ("driving_license", "Driving License", 10, 0, 1),
    ("boat_license", "Boat License", 10, 0, 1),
    ("flying_license", "Flying License", 10, 0, 1),
    ("police_badge", "Police Badge", 10, 0, 1),
    ("sheriff_badge", "Sheiff Badge", 10, 0, 1),
    ("fib_badge", "FIB Badge", 10, 0, 1);
Items for ox_inventory
['id_card'] = {
    label = 'ID Card',
    weight = 5,
    stack = false
},
['driving_license'] = {
    label = 'Driving License',
    weight = 5,
    stack = false
},
['flying_license'] = {
    label = 'Flying License',
    weight = 5,
    stack = false
},
['boat_license'] = {
    label = 'Boat License',
    weight = 5,
    stack = false
},
['weapon_license'] = {
    label = 'Weapon License',
    weight = 5,
    stack = false
},
['police_badge'] = {
    label = 'Police Badge',
    weight = 5,
    stack = false
},
['sheriff_badge'] = {
    label = 'Sheriff Badge',
    weight = 5,
    stack = false
},
['fib_badge'] = {
    label = 'FIB Badge',
    weight = 5,
    stack = false
},
Items for qb-inventory / qs-inventory / origen_inventory
['id_card'] = {
    ["name"] = 'id_card',
    ["label"] = "ID Card",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "id_card.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = ""
},
['driving_license'] = {
    ["name"] = 'driving_license',
    ["label"] = "Driving License",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "driving_license.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = ""
},
['boat_license'] = {
    ["name"] = 'boat_license',
    ["label"] = "Boat License",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "boat_license.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = ""
},
['flying_license'] = {
    ["name"] = 'flying_license',
    ["label"] = "Flying License",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "flying_license.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = ""
},
['police_badge'] = {
    ["name"] = 'police_badge',
    ["label"] = "Police Badge",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "police_badge.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = ""
},
['sheriff_badge'] = {
    ["name"] = 'sheriff_badge',
    ["label"] = "Sheriff Badge",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "sheriff_badge.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = ""
},
['fib_badge'] = {
    ["name"] = 'fib_badge',
    ["label"] = "FIB Badge",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "fib_badge.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = ""
},

5. Adjust Metadatas for Inventory

This script uses item metadata to store additional information. To make this data visible directly in your inventory UI, you need to add the code snippet below to your inventory configuration.

Metadata for ox_inventory

Customizable at the very bottom of the config.client.lua file

Metadata for old qb-inventory
  1. Go to qb-inventory/html/js/app.js

  2. Find function FormatItemInfo

  3. Enter items metadata readout correctly

} else if (itemData.name == "id_card") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(`
        <p><strong>Serial Number: </strong><span>${itemData.info.document_id}</span></p>
        <p><strong>SSN: </strong><span>${itemData.info.ssn}</span></p>
        <p><strong>First Name: </strong><span>${itemData.info.firstName}</span></p>
        <p><strong>Last Name: </strong><span>${itemData.info.lastName}</span></p>
        <p><strong>Birth Date: </strong><span>${itemData.info.dateOfBirth}</span></p>
        <p><strong>Nationality: </strong><span>${itemData.info.nationality}</span></p>
    `)
} else if (
        itemData.name == "driving_license" ||
        itemData.name == "flying_license" ||
        itemData.name == "boat_license" ||
        itemData.name == "police_badge" ||
        itemData.name == "sheriff_badge" ||
        itemData.name == "fib_badge"    
    ) {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(`
        <p><strong>Serial Number: </strong><span>${itemData.info.document_id}</span></p>
        <p><strong>First Name: </strong><span>${itemData.info.firstName}</span></p>
        <p><strong>Last Name: </strong><span>${itemData.info.lastName}</span></p>
    `)
Metadata for qs-inventory
  1. Go to qs-inventory/config/metadata.js

  2. Find function FormatItemInfo

  3. Enter items metadata readout correctly

if (itemData.name == "id_card") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(`
        <p><strong>Serial Number: </strong><span>${itemData.info.document_id}</span></p>
        <p><strong>SSN: </strong><span>${itemData.info.ssn}</span></p>
        <p><strong>First Name: </strong><span>${itemData.info.firstName}</span></p>
        <p><strong>Last Name: </strong><span>${itemData.info.lastName}</span></p>
        <p><strong>Birth Date: </strong><span>${itemData.info.dateOfBirth}</span></p>
        <p><strong>Nationality: </strong><span>${itemData.info.nationality}</span></p>
    `)
} else if (
        itemData.name == "driving_license" ||
        itemData.name == "flying_license" ||
        itemData.name == "boat_license" ||
        itemData.name == "police_badge" ||
        itemData.name == "sheriff_badge" ||
        itemData.name == "fib_badge"    
    ) {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(`
        <p><strong>Serial Number: </strong><span>${itemData.info.document_id}</span></p>
        <p><strong>First Name: </strong><span>${itemData.info.firstName}</span></p>
        <p><strong>Last Name: </strong><span>${itemData.info.lastName}</span></p>
    `)
Metadata for origen_inventory
  1. Go to origen_inventory/html/js/items.js

  2. Find driver_license and remove the entire displayMeta function.

  3. Find id_card and replace the entire function displayMeta responsible for id_card.

displayMeta('id_card', (itemData, setTitle, setDescription) => {
    setTitle(`<p>${itemData.label}</p>`);
    setDescription(`
        <p><strong>Serial Number: </strong><span>${itemData.metadata.document_id}</span></p>
        <p><strong>SSN: </strong><span>${itemData.metadata.ssn}</span></p>
        <p><strong>First Name: </strong><span>${itemData.metadata.firstName}</span></p>
        <p><strong>Last Name: </strong><span>${itemData.metadata.lastName}</span></p>
        <p><strong>Birth Date: </strong><span>${itemData.metadata.dateOfBirth}</span></p>
        <p><strong>Nationality: </strong><span>${itemData.metadata.nationality}</span></p>
    `);
});
  1. Register new documents

let documentsList = [
    'driving_license',
    'flying_license',
    'boat_license',
    'police_badge',
    'sheriff_badge',
    'fib_badge'
]
documentsList.forEach((i) => {
    displayMeta(i, (itemData, setTitle, setDescription) => {
        setDescription(`
            <p><strong>Serial Number: </strong><span>${itemData.metadata.document_id}</span></p>
            <p><strong>First Name: </strong><span>${itemData.metadata.firstName}</span></p>
            <p><strong>Last Name: </strong><span>${itemData.metadata.lastName}</span></p>
        `);
    });
})

6. Additional Integrations

1

Automatic SSN generation in your framework


7. Start Resource

To start a resource in your server.cfg, ensure that it begins after your framework has been initiated. For instance, if you are using a framework like es_extended, you should start resource after it, like so:

start [core] # For example, here is your framework (esx/qb-core)

# Here you run your other resources like esx_policejob etc.

# VMS Resources
start MugShotBase64
start vms_documentsv2

Ensure there are no syntax errors or incorrect paths in your server.cfg.

Read the guide

CFX Portal
Click here to view the tutorial.
here