[PAID] ID Card

A script by SH_Becha

No reviews yet.
[PAID] ID Card main image

Full Description

About ID Card

Advanced ID Card script for role-play servers.

Preview

Screenshots

idcardshot1

idcardshot2

Features

  • Supports QB & ESX
  • Optimized
  • Easy configuration
  • Show in chat or separate interface
  • Mugshot system

Configuration

Config cards examples:

  • QBCore:

['idcard'] = {
    command = false, -- or 'showidcard' -- Shows the card in the information of the person using the command
    item = 'id_card', -- or false 
    useItemInfo = true,
    cardBackground = 'card',
    title = 'Citizen Card',
    fields = {
        [1] = {
            title = cfg.locales[cfg.locale]['name'],
            editableFunctionName = 'getName',
            itemInfoKey = 'firstname',
        },
        [2] = {
            title = cfg.locales[cfg.locale]['nationality'],
            editableFunctionName = 'getNationality',
            itemInfoKey = 'nationality'
        },
        [3] = {
            title = cfg.locales[cfg.locale]['surname'],
            editableFunctionName = 'getSurname',
            itemInfoKey = 'lastname'
        },
        [4] = {
            title = cfg.locales[cfg.locale]['citizenid'],
            editableFunctionName = 'getCID',
            itemInfoKey = 'citizenid'
        },
        [5] = {
            title = cfg.locales[cfg.locale]['gender'],
            editableFunctionName = 'getGender',
            itemInfoKey = 'gender'
        },
        [6] = {
            title = cfg.locales[cfg.locale]['dob'],
            editableFunctionName = 'getDOB',
            itemInfoKey = 'birthdate'
        },
        [7] = {
            title = cfg.locales[cfg.locale]['signature'],
            editableFunctionName = 'getSignature'
        }
    }
},
['drivercard'] = {
    command = false, -- or 'showidcard' -- Shows the card in the information of the person using the command
    item = 'driver_license', -- or false 
    useItemInfo = true,
    cardBackground = 'card',
    title = 'Driver License',
    canShow = function(src)
        if _G['ESX'] then
            local canShow = false
            TriggerEvent('esx_license:getLicenses', src, function(licensesData)
                local licenseTypes = {['drive'] = true, ['drive_bike'] = true, ['drive_truck'] = true}
                for _, data in pairs(licensesData) do
                    if licenseTypes[data.type] then
                        canShow = true
                        return true
                    end
                end

                TriggerClientEvent('sh:client:notification', src, 'error', cfg.locales[cfg.locale]['nothavealicense'])
                canShow = false
            end)
            Wait(1000)
            return canShow
        elseif _G['QBCore'] then
            local player = QBCore.Functions.GetPlayer(src); if not player then return false end
            return player.PlayerData.metadata["licences"]["driver"]
        end
    end,
    fields = {
        [1] = {
            title = cfg.locales[cfg.locale]['name'],
            editableFunctionName = 'getName',
            itemInfoKey = 'firstname'
        },
        [2] = {
            title = cfg.locales[cfg.locale]['surname'],
            editableFunctionName = 'getSurname',
            itemInfoKey = 'lastname'
        },
        [3] = {
            title = cfg.locales[cfg.locale]['dob'],
            editableFunctionName = 'getDOB',
            itemInfoKey = 'birthdate'
        },
        [4] = {
            title = cfg.locales[cfg.locale]['type'],
            editableFunctionName = 'getDriverType',
            itemInfoKey = 'type'
        },
        [5] = {
            title = cfg.locales[cfg.locale]['gender'],
            editableFunctionName = 'getGender'
        },
        [6] = {
            title = cfg.locales[cfg.locale]['signature'],
            editableFunctionName = 'getSignature'
        }
    }
},
['lawyerpass'] = {
    command = false, -- or 'showidcard' -- Shows the card in the information of the person using the command
    item = 'lawyerpass', -- or false 
    useItemInfo = false,
    cardBackground = 'card',
    title = 'Lawyer Pass',
    titleColor = 'orange',
    canShow = function(src)
        if _G['ESX'] then
            return false
        elseif _G['QBCore'] then
            local player = QBCore.Functions.GetPlayer(src); if not player then return false end
            return player.PlayerData.job.name == 'lawyer' and true or false
        end
    end,
    fields = {
        [1] = {
            title = cfg.locales[cfg.locale]['name'],
            editableFunctionName = 'getName',
        },
        [2] = {
            title = cfg.locales[cfg.locale]['surname'],
            editableFunctionName = 'getSurname',
        },
        [3] = {
            title = cfg.locales[cfg.locale]['dob'],
            editableFunctionName = 'getDOB',
        },
        [4] = {
            title = cfg.locales[cfg.locale]['gender'],
            editableFunctionName = 'getGender',
        },
        [5] = {
            title = cfg.locales[cfg.locale]['signature'],
            editableFunctionName = 'getSignature'
        }
    }
},
['weaponlicense'] = {
    command = false, -- or 'showidcard' -- Shows the card in the information of the person using the command
    item = 'weaponlicense', -- or false 
    useItemInfo = false,
    cardBackground = 'card',
    title = 'Weapon License',
    titleColor = 'red',
    canShow = function(src)
        if _G['ESX'] then
            TriggerEvent('esx_license:getLicenses', src, function(licenses)
                if licenses['weapon'] then
                    return true
                else
                    TriggerClientEvent('sh:client:notification', src, 'error', cfg.locales[cfg.locale]['nothavealicense'])
                    return false
                end
            end)
        elseif _G['QBCore'] then
            local player = QBCore.Functions.GetPlayer(src); if not player then return false end
            return player.PlayerData.metadata["licences"]["driver"]
        end
    end,
    fields = {
        [1] = {
            title = cfg.locales[cfg.locale]['name'],
            editableFunctionName = 'getName',
        },
        [2] = {
            title = cfg.locales[cfg.locale]['surname'],
            editableFunctionName = 'getSurname',
        },
        [3] = {
            title = cfg.locales[cfg.locale]['dob'],
            editableFunctionName = 'getDOB',
        },
        [4] = {
            title = cfg.locales[cfg.locale]['gender'],
            editableFunctionName = 'getGender',
        },
        [5] = {
            title = cfg.locales[cfg.locale]['signature'],
            editableFunctionName = 'getSignature'
        }
    }
}


  • ESX:

['idcard'] = {
        command = false, -- or 'showidcard' -- Shows the card in the information of the person using the command
        item = 'id_card', -- or false 
        useItemInfo = false,
        cardBackground = 'card',
        title = 'Citizen Card',
        fields = {
            [1] = {
                title = cfg.locales[cfg.locale]['name'],
                editableFunctionName = 'getName',
            },
            [2] = {
                title = cfg.locales[cfg.locale]['nationality'],
                editableFunctionName = 'getNationality',
            },
            [3] = {
                title = cfg.locales[cfg.locale]['surname'],
                editableFunctionName = 'getSurname',
            },
            [4] = {
                title = cfg.locales[cfg.locale]['citizenid'],
                editableFunctionName = 'getCID',
            },
            [5] = {
                title = cfg.locales[cfg.locale]['gender'],
                editableFunctionName = 'getGender',
            },
            [6] = {
                title = cfg.locales[cfg.locale]['dob'],
                editableFunctionName = 'getDOB',
            },
            [7] = {
                title = cfg.locales[cfg.locale]['signature'],
                editableFunctionName = 'getSignature'
            }
        }
    },
    ['drivercard'] = {
        command = false, -- or 'showidcard' -- Shows the card in the information of the person using the command
        item = 'driver_license', -- or false 
        useItemInfo = false,
        cardBackground = 'card',
        title = 'Driver License',
        canShow = function(src)
            if _G['ESX'] then
                local canShow = false
                TriggerEvent('esx_license:getLicenses', src, function(licensesData)
                    local licenseTypes = {['drive'] = true, ['drive_bike'] = true, ['drive_truck'] = true}
                    for _, data in pairs(licensesData) do
                        if licenseTypes[data.type] then
                            canShow = true
                            return true
                        end
                    end

                    TriggerClientEvent('sh:client:notification', src, 'error', cfg.locales[cfg.locale]['nothavealicense'])
                    canShow = false
                end)
                Wait(1000)
                return canShow
            elseif _G['QBCore'] then
                local player = QBCore.Functions.GetPlayer(src); if not player then return false end
                return player.PlayerData.metadata["licences"]["driver"]
            end
        end,
        fields = {
            [1] = {
                title = cfg.locales[cfg.locale]['name'],
                editableFunctionName = 'getName',
            },
            [2] = {
                title = cfg.locales[cfg.locale]['surname'],
                editableFunctionName = 'getSurname',
            },
            [3] = {
                title = cfg.locales[cfg.locale]['dob'],
                editableFunctionName = 'getDOB',
            },
            [4] = {
                title = cfg.locales[cfg.locale]['type'],
                editableFunctionName = 'getDriverType',
            },
            [5] = {
                title = cfg.locales[cfg.locale]['gender'],
                editableFunctionName = 'getGender'
            },
            [6] = {
                title = cfg.locales[cfg.locale]['signature'],
                editableFunctionName = 'getSignature'
            }
        }
    }

Buy

Tebex (16$ + Tax)
SH Pack All-in-one (Monthly 15$)
Youtube Preview
Other Scripts

Code is accessible Yes
Subscription-based No
Lines (approximately) 500 (without UI)
Requirements No
Support Yes