AP Scripts Documentation
  • AP Scripts Documentation
  • Scripts
    • AP Court
    • AP Government
    • AP Documents
    • AP AddonJob
    • AP Questionnaire
  • Recommended Phone
  • Script Snippets
  • Phone Integrations
Powered by GitBook
On this page
  • QBCore INSTALLATION
  • QBCORE DEPENDENCIES
  • STEP BY STEP
  • OX LIBS (AP COURT v.1.1)
  • MetaData Setup (AP COURT v.1.1)
  • ESX INSTALLATION
  • ESX DEPENDENCIES
  • STEP BY STEP
  • OX LIBS (AP COURT v.1.1)
  • MetaData Setup (AP COURT v.1.1)
  • CONFIG SCREENSHOTS
  1. Scripts

AP Court

Documentation & support for AP Court.

PreviousAP Scripts DocumentationNextAP Government

Last updated 1 year ago

QBCore INSTALLATION

QBCORE DEPENDENCIES

Dependency
Install
Description

Optional if using other target system stated.

For use of using 3rd eye features.

Optional if using other target system stated.

For use of using 3rd eye features.

Required

This normally is included in the QBCore install so check if you have before downloading.

Required

This normally is included in the QBCore install so check if you have before downloading.

Required

This script controls the exam for the bar test.

STEP BY STEP

  1. Extract ap-court.zip file.

  2. Inset SQL file into your database.

  3. 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.

--'@ox_lib/init.lua', -- UNCOMMENT THIS IF YOUR USING OX LIBS

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.


      } else if (itemData.name == "lawyerpass") {
            $(".item-info-title").html("<p>" + itemData.label + "</p>");
            $(".item-info-description").html(
                "<p><strong>Bar ID: </strong><span>" +
                itemData.info.baridnumber +
                "</span></p><p><strong>Full Name: </strong><span>" +
                itemData.info.lawyername +
                "</span></p>"
            );

#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.

['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'
},

#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.

--- 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)

#2 - Add These to your OX inventory

ox_inventory\data\items.lua - Add the example below at the bottom of the items file.

    ['lawyerid'] = {
        label = 'Bar License ID Card.',
        weight = 1,
        consume = 0,
        stack = false,
        close = true,
        description = nil
    },

#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.

      } else if (itemData.name == "lawyerid") {
            $(".item-info-title").html("<p>" + itemData.label + "</p>");
            $(".item-info-description").html(
                "<p><strong>Bar ID: </strong><span>" +
                itemData.info.baridnumber +
                "</span></p><p><strong>Full Name: </strong><span>" +
                itemData.info.lawyername +
                "</span></p>"
            );

#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.

['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'
},

ESX INSTALLATION

ESX DEPENDENCIES

Dependency/Link
Install
Description

Optional if using other target system stated.

For use of using 3rd eye features.

Optional if using other target system stated.

For use of using 3rd eye features.

Required

This script is setup for both ZF/NH Context menus, you are required to use one of these.

Required

This Script is setup for both ZF/OX Inputs, you are required to use one of these.

Required

This script controls the exam for the bar test.

STEP BY STEP

  1. Extract ap-court.zip file.

  2. Inset SQL file into your database.

  3. 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.

--'@ox_lib/init.lua', -- UNCOMMENT THIS IF YOUR USING OX LIBS

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.

--- 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)

#2 - Add These to your OX inventory

ox_inventory\data\items.lua - Add the example below at the bottom of the items file.

    ['lawyerid'] = {
        label = 'Bar License ID Card.',
        weight = 1,
        consume = 0,
        stack = false,
        close = true,
        description = nil
    },

#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.

      } else if (itemData.name == "lawyerid") {
            $(".item-info-title").html("<p>" + itemData.label + "</p>");
            $(".item-info-description").html(
                "<p><strong>Bar ID: </strong><span>" +
                itemData.info.baridnumber +
                "</span></p><p><strong>Full Name: </strong><span>" +
                itemData.info.lawyername +
                "</span></p>"
            );

#2 - Add These to Quasar inventory

qs-core\config\config_items.lua - Add the example below at the bottom of the items file.

    ["lawyerid"] = {
        ["name"] = "lawyerid",
        ["label"] = "Bar License ID Card.",
        ["weight"] = 1,
        ["type"] = "item",
        ["image"] = "YOURIMAGE.png",
        ["unique"] = true,
        ["useable"] = true,
        ["shouldClose"] = true,
        ["combinable"] = nil,
        ["description"] = ""
    },

CONFIG SCREENSHOTS

Config.Target = { -- QB-TARGET & QTARGET BOTH PRESETUP FOR GABZ CITY HALL.
	['qb-target'] = {
        active = true,
        ['bar'] = {
            active = true,
            ped = {model = "a_m_y_business_02"},
            coords = vector4(-542.55, -197.1524, 38.23, 87.9009),
            minusOne = true,
            freeze = true,
            invincible = true,
            blockevents = true

        },
        ['court'] = {
            active = true,
            ped = {model = "a_f_y_business_02"},
            coords = vector4(-552.43, -202.74, 38.24, 338.39),
            minusOne = true,
            freeze = true,
            invincible = true,
            blockevents = true
        },
        ['juryCourt'] = {
            active = true,
            boxzone = {
                name = "JuryTable",
                coords = vector3(-580.4249, -213.0508, 38.2270),
                length = 0.8,
                width = 0.8,
                heading = 309.3277,
                debugPoly = false,
                minZ = 38,
                maxZ = 39
            }
        },
        ['judge'] = {
            active = true,
            boxzone = {
                name = "judge",
                coords = vector3(-586.96, -205.97, 39.1166),
                length = 0.8,
                width = 0.8,
                heading = 30.0471,
                debugPoly = false,
                minZ = 38,
                maxZ = 39
            },
            job = {name = Config.CourtJob, grade = 0}
        },
        ['tableCourt'] = {
            active = true,
            boxzone = {
                name = "tableCourt",
                coords = vector3(-580.94, -216.71, 38.23),
                length = 6.2,
                width = 1.4,
                heading = 30,
                debugPoly = false,
                minZ = 38.03,
                maxZ = 38.63
            },
            job = {name = Config.CourtJob, grade = 0}
        }
    },
    ['qtarget'] = {
        active = false,
        ['bar'] = {
            active = true,
            ped = {model = 'a_m_y_business_02', sex = 'male'},
            coords = {x = -542.55, y = -197.1524, z = 38.23, h = 87.9009}
        },
        ['court'] = {
            active = true,
            ped = {model = 'a_f_y_business_02', sex = 'female'},
            coords = {x = -552.43, y = -202.74, z = 38.24, h = 338.39}
        },
        ['juryCourt'] = {
            active = true,
            boxzone = {
                name = "JuryTable",
                coords = vector3(-580.4249, -213.0508, 38.2270),
                length = 0.8,
                width = 0.8,
                heading = 309.3277,
                debugPoly = false,
                minZ = 38,
                maxZ = 39
            }
        },
        ['judge'] = {
            active = true,
            boxzone = {
                name = "judge",
                coords = vector3(-586.96, -205.97, 39.1166),
                length = 0.8,
                width = 0.8,
                heading = 30.0471,
                debugPoly = false,
                minZ = 38,
                maxZ = 39
            },
            job = {name = Config.CourtJob, grade = 0}
        },
        ['tableCourt'] = {
            active = true,
            boxzone = {
                name = "tableCourt",
                coords = vector3(-580.94, -216.71, 38.23),
                length = 6.2,
                width = 1.4,
                heading = 30,
                debugPoly = false,
                minZ = 38.03,
                maxZ = 38.63
            },
            job = {name = Config.CourtJob, grade = 0}
        }
    },
}

/

/

Install and ensure for the resource.

or Target

or or OX Libs

or OX Libs

Install and ensure for the resource.

dependencies
dependencies
QB-Target
Q-Target
QB-MENU
OX LIBS
QB-INPUT
OX LIBS
BCS Questionnaire
Q-Target
Fivem
Meta
ZF CONTEXT
NH CONTEXT V2
ZF DIALOG
BCS Questionnaire
Example
Example
Example
Example
Here is where you would set the values to your liking.
|
Tebex Link
Script Showcase