[ESX] mdm_documents, id card and much more

A script by modmen454

No reviews yet.
[ESX] mdm_documents, id card and much more main image

Full Description

The mdm_documents script is a script that adds documents. By default, it includes a gun license, ID card, and driver’s license, but it’s easy to add documents such as those for the police. The script fully saves in the database who the document belongs to, and even after transferring it to another player, it displays the owner’s data saved at the time of document issuance. Each document is assigned a unique ID, making it useful for various types of police tablets, etc. This script is written for the ESX framework and requires an inventory to function. It was initially developed for the ox_inventory, but since it’s open source, it can be easily modified. The only requirement is for the inventory to allow metadata assignment. Messages, menus, and targets are written for ox_lib and ox_target, but they can be easily adapted to your own. The options in the menu are available depending on the licenses you have, i.e. if you do not have a firearm license, you cannot obtain a document showing that you have a firearm license. To obtain each document, you must have a photo taken with you

Preview: YouTube
Buy: Tebex

This is how config looks like

Config = {}
Config.Distance = 3.0

Config.Framework = 'ESX' -- ESX | QB

Config.Notification = function(title, msg, type)
    if Config.Framework == 'QB' then
        exports['qb-core']:GetCoreObject().Functions.Notify(msg, type, 5000)
    else
        lib.notify({
            title = title,
            description = msg,
            type = type
        })
    end
end

Config.PhotoPrice = 40
Config.IdCardPrice = 50
Config.DrivingCardPrice = 50
Config.WeaponCardPrice = 50
Config.HuntingCardPrice = 50

Config.Documents = {
    ["photo"] = {
        item = 'photo',
        animation = { "random@atmrobberygen", "a_atm_mugging" },
        animationTimeout = 2500,
        notifyText = "You showed photo",
        notifyYourSelfText = "You saw photo",
    },
    ["id_card"] = {
        item = 'idcard',
        color = "#005d84",
        animation = { "random@atmrobberygen", "a_atm_mugging" },
        animationTimeout = 2500,
        background = "idcard",
        notifyText = "You showed id card",
        notifyYourSelfText = "You saw id card",
    },
    ["id_drive"] = {
        item = 'drivingcard',
        color = "#005d84",
        animation = { "random@atmrobberygen", "a_atm_mugging" },
        animationTimeout = 2500,
        background = "drivingcard",
        notifyText = "You showed driving license",
        notifyYourSelfText = "You saw driving license",
    },
    ["id_weapon"] = {
        item = 'weaponcard',
        color = "#502015",
        animation = { "random@atmrobberygen", "a_atm_mugging" },
        animationTimeout = 2500,
        background = "weaponcard",
        notifyText = "You showed weapon license",
        notifyYourSelfText = "You saw weapon license",
    },
    ["id_hunt"] = {
        item = 'huntingcard',
        color = "black",
        animation = { "random@atmrobberygen", "a_atm_mugging" },
        animationTimeout = 2500,
        background = "huntingcard",
        notifyText = "You showed hunting license",
        notifyYourSelfText = "You saw hunting license",
    },
}

Config.Texts = {
    ["notify_title"] = "ID",
    ["notify_title_photo"] = "City Hall",
    ["no_have_photo"] = "You haven't taken a photo for the document, you need to take one first",
    ["error_with_document"] = "Error obtaining the document",
    ["you_paid_for_photo"] = "You took a photo for the document",
    ["you_do_photo"] = "You took a photo for the document",
    ["not_have_money"] = "You don't have enough money",
    ["press_to_take_photo"] = "Press [E] to take a photo",
    ['photo_is_not_yours'] = 'This photo doesn`t belong to you'

}


Update: 1.1.0

  • Added support for qb-core
  • Completely reworked document graphics
  • The entire system has been reworked for metadata inventory and no longer save data in a database
  • Changed the way character photos are taken (significantly improving graphics)




Code is accessible Yes
Subscription-based No
Lines (approximately) about 1000
Requirements ESX / QB-CORE, INVENTORY with metadata support
Support Yes

My other resources:

Config Merger
Have you tried Config Merger? Merge your configs easily