Instructions

Database

  • Insert this query
INSERT INTO items (name, label, weight, rare, can_remove)
VALUES
('id_card', 'Id Card', 1, 0, 1),
('driver_license', 'Driver License', 1, 0, 1),
('weaponlicense', 'Weapon License', 1, 0, 1);

esx_multicharacter

	AddEventHandler('esx_identity:completedRegistration', function(source, data)
		TriggerEvent('esx:onPlayerJoined', source, PREFIX..awaitingRegistration[source], data)
		awaitingRegistration[source] = nil
		ESX.Players[GetIdentifier(source)] = true
 
		exports.bl_idcard:createLicense(source, {'id_card', 'driver_license'})
	end)

esx_license

RegisterNetEvent('esx_license:addLicense', function(target, licenseType, cb)
	local xPlayer = ESX.GetPlayerFromId(target)
	if xPlayer then
		if isValidLicense(licenseType) then
            exports.bl_idcard:createLicense(source, licenseType)
			AddLicense(xPlayer.getIdentifier(), licenseType, cb)
		else
			print(('[esx_license]: Missing license type in db ^5%s^0 or someone try to use lua executor ID: ^5%s^0'):format(licenseType, target))
		end
	end
end)