# Installation

Follow the steps below to properly install and configure the `cad-identity`script.

## Step-by-Step Guide

1. **Download the latest update**  
   Get the resource from [Keymaster ](https://keymaster.fivem.net/)or the [Cfx Portal](https://portal.cfx.re/assets/granted-assets).
2. **Configure the Playerlist**  
   Set up the player list options from the Configuration section.
3. **Add to your ****`server.cfg`**  
   Insert the following line into your `server.cfg` file:

   ```
   ensure cad-identity
   ```
4. **You're all set!**

## Dependencies

Make sure the following requirements are met:

- Server Artifacts (Latest) – [Windows ](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/)/ [Linux](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/)
- [Onesync ](https://docs.fivem.net/docs/scripting-reference/onesync/#what-is-onesync-infinity)(enabled in your server configuration)

## Inventory Items

### ox\_inventory

- ox\_inventory/data/items.lua

```lua
['idcard'] = {
	label = 'Identity Card',
	description = "Proving that you are who you say you are, because apparently just telling people isn't convincing enough.",
	weight = 50,
        degrade = 21600,
	stack = false,
	server = {
		export = "cad-identity.useCards"
	}
},
["drivinglicense"] = {
	label = "Driving License",
	weight = 50,
	degrade = 21600,
	stack = false,
	description = "The ultimate badge of adulthood, this piece of plastic gives you the ability to legally drive a car and the responsibility to make sure you don't crash it.",
	server = {
		export = 'cad-identity.useCards'
	}
},
["weaponlicense"] = {
	label = "Weapon License",
	weight = 50,
	degrade = 21600,
	stack = false,
	description = "Arms permit provided by a government authority.",
	server = {
		export = 'cad-identity.useCards'
	}
},
["wildlifelicense"] = {
	label = "Wildlife License",
	weight = 50,
	degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["barlicense"] = {
	label = "Bar License",
	weight = 50,
	degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["medicallicense"] = {
	label = "Medical License",
	weight = 50,
        degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["medialicense"] = {
	label = "Media License",
	weight = 50,
        degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["coplicense"] = {
	label = "Cop Badge",
	weight = 50,
	degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["flyinglicense"] = {
	label = "Pilot License",
	weight = 50,
	degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["businesslicense"] = {
	label = "Business License",
	weight = 50,
	degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["voteridcard"] = {
	label = "Voter ID",
	weight = 50,
	degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
["customidcard"] = {
	label = "Custom ID",
	weight = 50,
	degrade = 21600,
	stack = false,
	server = {
		export = 'cad-identity.useCards'
	}
},
```

- ox\_inventory/web/images

{% file src="../../.gitbook/assets/barlicense (2).png" %}

{% file src="../../.gitbook/assets/businesslicense (1).png" %}

{% file src="../../.gitbook/assets/coplicense (1).png" %}

{% file src="../../.gitbook/assets/drivinglicense (2).png" %}

{% file src="../../.gitbook/assets/flyinglicense (2).png" %}

{% file src="../../.gitbook/assets/idcard (2).png" %}

{% file src="../../.gitbook/assets/medialicense (2).png" %}

{% file src="../../.gitbook/assets/medicallicense (2).png" %}

{% file src="../../.gitbook/assets/voteridcard (1).png" %}

{% file src="../../.gitbook/assets/weaponlicense (2).png" %}

{% file src="../../.gitbook/assets/wildlifelicense (2).png" %}

### qb-inventory / ps-inventory

- qb-core/shared/items.lua

idcard = {
	name = 'idcard',
	label = 'Identity Card',
	weight = 50,
	type = 'item',
	image = 'idcard.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "Proving that you are who you say you are, because apparently just telling people isn't convincing enough."
},
drivinglicense = {
	name = 'drivinglicense',
	label = 'Driving License',
	weight = 50,
	type = 'item',
	image = 'drivinglicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "The ultimate badge of adulthood, this piece of plastic gives you the ability to legally drive a car and the responsibility to make sure you don't crash it."
},
weaponlicense = {
	name = 'weaponlicense',
	label = 'Weapon License',
	weight = 50,
	type = 'item',
	image = 'weaponlicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "Arms permit provided by a government authority."
},
wildlifelicense = {
	name = 'wildlifelicense',
	label = 'Wildlife License',
	weight = 50,
	type = 'item',
	image = 'wildlifelicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "License allowing you to engage in activities related to wildlife."
},
barlicense = {
	name = 'barlicense',
	label = 'Bar License',
	weight = 50,
	type = 'item',
	image = 'barlicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "A license that allows you to serve alcohol in a bar."
},
medicallicense = {
	name = 'medicallicense',
	label = 'Medical License',
	weight = 50,
	type = 'item',
	image = 'medicallicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "License that proves you are certified to practice medicine."
},
medialicense = {
	name = 'medialicense',
	label = 'Media License',
	weight = 50,
	type = 'item',
	image = 'medialicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "License that allows you to work in the media industry."
},
copbadge = {
	name = 'copbadge',
	label = 'Cop Badge',
	weight = 50,
	type = 'item',
	image = 'copbadge.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "Badge that identifies you as a law enforcement officer."
},
pilotlicense = {
	name = 'pilotlicense',
	label = 'Pilot License',
	weight = 50,
	type = 'item',
	image = 'pilotlicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "License that allows you to operate aircraft."
},
businesslicense = {
	name = 'businesslicense',
	label = 'Business License',
	weight = 50,
	type = 'item',
	image = 'businesslicense.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "License that allows you to operate a business."
},
voteridcard = {
	name = 'voteridcard',
	label = 'Voter ID',
	weight = 50,
	type = 'item',
	image = 'voteridcard.png',
	unique = true,
	useable = true,
	shouldClose = true,
	description = "Voting permit provided by a government authority."
},
customidcard = {
	name = 'customidcard'
	label = 'Custom ID',
	weight = 50,
	type = 'item',
	image = 'customidcard.png',
	stack = false,
	unique = true,
	useable = true,
	shouldClose = true,
	description = ''
},

- qb-inventory/html/images

{% file src="../../.gitbook/assets/idcard (2).png" %}

{% file src="../../.gitbook/assets/barlicense (3).png" %}

{% file src="../../.gitbook/assets/businesslicense (2).png" %}

{% file src="../../.gitbook/assets/coplicense (2).png" %}

{% file src="../../.gitbook/assets/drivinglicense (3).png" %}

{% file src="../../.gitbook/assets/flyinglicense (3).png" %}

{% file src="../../.gitbook/assets/medialicense (3).png" %}

{% file src="../../.gitbook/assets/medicallicense (3).png" %}

{% file src="../../.gitbook/assets/voteridcard (2).png" %}

{% file src="../../.gitbook/assets/weaponlicense (3).png" %}

{% file src="../../.gitbook/assets/wildlifelicense (3).png" %}
