AP Court

Documentation & support for AP Court.

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. Install and ensure dependencies for the resource.

  3. Inset SQL file into your database.

  4. 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'
},

ESX INSTALLATION

ESX DEPENDENCIES

Dependency/Link
Install
Description

Optional if using other target system stated.

For use of using 3rd eye features.

Fivem or Meta Target

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.

ZF DIALOG or OX Libs

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. Install and ensure dependencies for the resource.

  3. Inset SQL file into your database.

  4. 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)
Example

#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
    },
Example

CONFIG SCREENSHOTS

Here is where you would set the values to your liking.
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}
        }
    },
}

Last updated