Setup your config file with how you want it, make sure you enable the target system in the config to the one you use or if you have added another target script in the target.lua make sure the target options are both set to false.
OX LIBS (AP COURT v.1.1)
Make sure to uncomment ox lib from the fxmanifest.lua in the script folder if you want to use OX context and dialog.
MetaData Setup (AP COURT v.1.1)
#1 - Add These to your QB inventory
qb-inventory\html\js\app.lua - Add the example below at the bottom of the JS file. Make sure to set QB to true in the Config.LawyerIDMetaData section.
#2 - Add These to QB-CORE Shared Items.lua
qb-core\shared\items.lua - Add the example below at the bottom of the items file.
#1 - Add These to your OX inventory
ox_inventory\modules\items\client.lua - Add the example below at the bottom of the client file. Make sure to set OX to true in the Config.LawyerIDMetaData section.
Example
#2 - Add These to your OX inventory
ox_inventory\data\items.lua - Add the example below at the bottom of the items file.
Example
#1 - Add These to Quasar inventory
qs-inventory\config\config_metadata.js - Add the example below at the bottom of the config file. Make sure to set QS to true in the Config.LawyerIDMetaData section.
#2 - Add These to QB-CORE Shared Items.lua
qb-core\shared\items.lua - Add the example below at the bottom of the items file.
Setup your config file with how you want it, make sure you enable the target system in the config to the one you use or if you have added another target script in the target.lua make sure the target options are both set to false.
OX LIBS (AP COURT v.1.1)
Make sure to uncomment ox lib from the fxmanifest.lua in the script folder if you want to use OX context and dialog.
MetaData Setup (AP COURT v.1.1)
#1 - Add These to your OX inventory
ox_inventory\modules\items\client.lua - Add the example below at the bottom of the client file. Make sure to set OX to true in the Config.LawyerIDMetaData section.
Example
#2 - Add These to your OX inventory
ox_inventory\data\items.lua - Add the example below at the bottom of the items file.
Example
#1 - Add the items to your database.
No Changes are needed to be done for the ModFreaks inventory, just add the items to your Database. Make sure to set MF to true in Config.LawyerIDMetaData section.
#1 - Add These to Quasar inventory
qs-inventory\config\config_metadata.js - Add the example below at the bottom of the config file. Make sure to set QS to true in the Config.LawyerIDMetaData section.
#2 - Add These to Quasar inventory
qs-core\config\config_items.lua - Add the example below at the bottom of the items file.
CONFIG SCREENSHOTS
Here is where you would set the values to your liking.
['lawyerpass'] = {
['name'] = 'lawyerpass',
['label'] = 'Lawyer Pass',
['weight'] = 0,
['type'] = 'item',
['image'] = 'lawyerpass.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Pass exclusive to lawyers to show they can represent a suspect'
},
--- AP COURT STUFF ------
Item('lawyerid', function(data, slot)
ox_inventory:useItem(data, function(data)
if data ~= nil then
TriggerServerEvent('ap-court:server:usingLawyerCard', data)
end
end)
end)
['lawyerpass'] = {
['name'] = 'lawyerpass',
['label'] = 'Lawyer Pass',
['weight'] = 0,
['type'] = 'item',
['image'] = 'lawyerpass.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Pass exclusive to lawyers to show they can represent a suspect'
},
--'@ox_lib/init.lua', -- UNCOMMENT THIS IF YOUR USING OX LIBS
--- AP COURT STUFF ------
Item('lawyerid', function(data, slot)
ox_inventory:useItem(data, function(data)
if data ~= nil then
TriggerServerEvent('ap-court:server:usingLawyerCard', data)
end
end)
end)