Coder Social home page Coder Social logo

qbcore-framework / qb-policejob Goto Github PK

View Code? Open in Web Editor NEW
65.0 16.0 379.0 2.03 MB

Police Job & Evidence System For QB-Core :police_officer: :policewoman:

License: GNU General Public License v3.0

Lua 94.22% HTML 2.36% CSS 1.84% JavaScript 1.58%

qb-policejob's Introduction

qb-policejob

Police Job for QB-Core Framework ๐Ÿ‘ฎ

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

Dependencies

Screenshots

On Duty / Off Duty Whitelisted Police Armory Whitelisted Police Stash Vehicle Spawner Helicopter Spawner Fingerprint Scan Evidence Stash Spike Placing Object Placing Police Alert Securty Cam

Features

  • Classical requirements like on duty/off duty, clothing, vehicle, stash etc.
  • Citizen ID based armory (Whitelisted)
  • Fingerprint test
  • Evidence locker (stash)
  • Whitelisted vehicles
  • Speed radars across the map
  • Stormram
  • Impounding player vehicle (permanent / for an amount of money)
  • Integrated jail system
  • Bullet casings
  • GSR
  • Blood drop
  • Evidence bag & Money bag
  • Police radar
  • Handcuff as an item (Can used via command too. Check Commands section.)
  • Emergency services can see each other on map

Commands

  • /spikestrip - Places spike strip on ground.
  • /pobject [pion/barier/schotten/tent/light/delete] - Places or deletes an object on/from ground.
  • /cuff - Cuffs/Uncuffs nearby player
  • /escort - Escorts nearby plyer.
  • /callsign [text] - Sets the player a callsign on database.
  • /clearcasings - Clears nearby bullet casings.
  • /jail [id] [time] - Sends a player to the jail.
  • /unjail [id] - Takes the player out of jail.
  • /clearblood - Clears nearby blood drops.
  • /seizecash - Seizes nearby player's cash. (Puts in money bag)
  • /sc - Puts soft cuff on nearby player.
  • /cam [cam] - Shows the selected security cam display.
  • /flagplate [plate] [reason] - Flags the vehicle.
  • /unflagplate [plate] - Removes the flag of a vehicle.
  • /plateinfo [plate] - Displays if a vehicle is marked or not.
  • /depot [price] - Depots nearby vehicle. Player can take it after paying the cost.
  • /impound - Impounds nearby vehicle permanently.
  • /paytow [id] - Makes payment to the tow driver.
  • /paylawyer [id] - Makes payment to the lawyer.
  • /radar - Toggles the police radar.
  • /911 [message] - Sends a report to emergency services.
  • /911r [id] - Used to respond the emergency alerts.
  • /911a [message] - Sends an anonymous report to emergency services (gives no location).
  • /anklet - Places anklet (tracking device) on nearby player.
  • /removeanklet [citizenid] - Removes the anklet from player.
  • /ebutton - Used to respond an emergency alert.
  • /takedrivinglicense - Takes the driving license from nearby player.
  • /takedna [id] - Takes a DNA sample from the player.

Installation

Manual

  • Download the script and put it in the [qb] directory.
  • Add the following code to your server.cfg/resouces.cfg
ensure qb-core
ensure qb-policejob

Configuration

Config = {}

Config.Objects = { -- Objects to be placed with /pobject [object]
    ["cone"] = {model = `prop_roadcone02a`, freeze = false},
    ["barier"] = {model = `prop_barrier_work06a`, freeze = true},
    ["schotten"] = {model = `prop_snow_sign_road_06g`, freeze = true},
    ["tent"] = {model = `prop_gazebo_03`, freeze = true},
    ["light"] = {model = `prop_worklight_03b`, freeze = true},
}

Config.Locations = {
   ["duty"] = { -- On Duty/Off Duty Marker
       [1] = vector4(440.085, -974.924, 30.689, 90.654),
       [2] = vector4(-449.811, 6012.909, 31.815, 90.654),
   },
   ["vehicle"] = { -- Vehicle Spawner Marker
       [1] = vector4(448.159, -1017.41, 28.562, 90.654),
       [2] = vector4(471.13, -1024.05, 28.17, 274.5),
       [3] = vector4(-455.39, 6002.02, 31.34, 87.93),
   },
   ["stash"] = { -- Stash Marker
       [1] = vector4(453.075, -980.124, 30.889, 90.654),
   },
   ["impound"] = { -- Impounded Vehicles Marker
       [1] = vector4(436.68, -1007.42, 27.32, 180.0),
       [2] = vector4(-436.14, 5982.63, 31.34, 136.0),
   },
   ["helicopter"] = { -- Helicopter Spawner Marker
       [1] = vector4(449.168, -981.325, 43.691, 87.234),
       [2] = vector4(-475.43, 5988.353, 31.716, 31.34),
   },
   ["armory"] = { -- Armory Marker
       [1] = vector4(462.23, -981.12, 30.68, 90.654),
   },
   ["trash"] = { -- Trash Marker
       [1] = vector4(439.0907, -976.746, 30.776, 93.03),
   },
   ["fingerprint"] = { -- Fingerprint Scan Marker
       [1] = vector4(460.9667, -989.180, 24.92, 358.5),
   },
   ["evidence"] = { -- Evidence Closet 1 Marker
       [1] = vector4(442.1722, -996.067, 30.689, 187.5),
   },
   ["evidence2"] = { -- Evidence Closet 2 Marker
       [1] = vector4(451.7031, -973.232, 30.689, 1.741),
   },
   ["evidence3"] = { -- Evidence Closet 3 Marker
       [1] = vector4(455.1456, -985.462, 30.689, 2.854),
   },
   ["stations"] = { -- Police Stations Blips
       [1] = {label = "Police Station", coords = vector4(428.23, -984.28, 29.76, 3.5)},
       [2] = {label = "Prison", coords = vector4(1845.903, 2585.873, 45.672, 272.249)},
       [3] = {label = "Police Station Paleto", coords = vector4(-451.55, 6014.25, 31.716, 223.81)},
   },
}

Config.ArmoryWhitelist = {} -- Citizen ID Based Armory Whitelist (With Export for Other Scripts)


Config.Helicopter = "POLMAV" -- Model of the Helicopter for Helicopter Spawner

Config.SecurityCameras = { -- Security Cam Locations
    hideradar = false, -- Don't change
    cameras = {
        [1] = {label = "Pacific Bank CAM#1", coords = vector3(257.45, 210.07, 109.08), r = {x = -25.0, y = 0.0, z = 28.05}, canRotate = false, isOnline = true},
        [2] = {label = "Pacific Bank CAM#2", coords = vector3(232.86, 221.46, 107.83), r = {x = -25.0, y = 0.0, z = -140.91}, canRotate = false, isOnline = true},
        [3] = {label = "Pacific Bank CAM#3", coords = vector3(252.27, 225.52, 103.99), r = {x = -35.0, y = 0.0, z = -74.87}, canRotate = false, isOnline = true},
        [4] = {label = "Limited Ltd Grove St. CAM#1", coords = vector3(-53.1433, -1746.714, 31.546), r = {x = -35.0, y = 0.0, z = -168.9182}, canRotate = false, isOnline = true},
        [5] = {label = "Rob's Liqour Prosperity St. CAM#1", coords = vector3(-1482.9, -380.463, 42.363), r = {x = -35.0, y = 0.0, z = 79.53281}, canRotate = false, isOnline = true},
        [6] = {label = "Rob's Liqour San Andreas Ave. CAM#1", coords = vector3(-1224.874, -911.094, 14.401), r = {x = -35.0, y = 0.0, z = -6.778894}, canRotate = false, isOnline = true},
        [7] = {label = "Limited Ltd Ginger St. CAM#1", coords = vector3(-718.153, -909.211, 21.49), r = {x = -35.0, y = 0.0, z = -137.1431}, canRotate = false, isOnline = true},
        [8] = {label = "24/7 Supermarkt Innocence Blvd. CAM#1", coords = vector3(23.885, -1342.441, 31.672), r = {x = -35.0, y = 0.0, z = -142.9191}, canRotate = false, isOnline = true},
        [9] = {label = "Rob's Liqour El Rancho Blvd. CAM#1", coords = vector3(1133.024, -978.712, 48.515), r = {x = -35.0, y = 0.0, z = -137.302}, canRotate = false, isOnline = true},
        [10] = {label = "Limited Ltd West Mirror Drive CAM#1", coords = vector3(1151.93, -320.389, 71.33), r = {x = -35.0, y = 0.0, z = -119.4468}, canRotate = false, isOnline = true},
        [11] = {label = "24/7 Supermarkt Clinton Ave CAM#1", coords = vector3(383.402, 328.915, 105.541), r = {x = -35.0, y = 0.0, z = 118.585}, canRotate = false, isOnline = true},
        [12] = {label = "Limited Ltd Banham Canyon Dr CAM#1", coords = vector3(-1832.057, 789.389, 140.436), r = {x = -35.0, y = 0.0, z = -91.481}, canRotate = false, isOnline = true},
        [13] = {label = "Rob's Liqour Great Ocean Hwy CAM#1", coords = vector3(-2966.15, 387.067, 17.393), r = {x = -35.0, y = 0.0, z = 32.92229}, canRotate = false, isOnline = true},
        [14] = {label = "24/7 Supermarkt Ineseno Road CAM#1", coords = vector3(-3046.749, 592.491, 9.808), r = {x = -35.0, y = 0.0, z = -116.673}, canRotate = false, isOnline = true},
        [15] = {label = "24/7 Supermarkt Barbareno Rd. CAM#1", coords = vector3(-3246.489, 1010.408, 14.705), r = {x = -35.0, y = 0.0, z = -135.2151}, canRotate = false, isOnline = true},
        [16] = {label = "24/7 Supermarkt Route 68 CAM#1", coords = vector3(539.773, 2664.904, 44.056), r = {x = -35.0, y = 0.0, z = -42.947}, canRotate = false, isOnline = true},
        [17] = {label = "Rob's Liqour Route 68 CAM#1", coords = vector3(1169.855, 2711.493, 40.432), r = {x = -35.0, y = 0.0, z = 127.17}, canRotate = false, isOnline = true},
        [18] = {label = "24/7 Supermarkt Senora Fwy CAM#1", coords = vector3(2673.579, 3281.265, 57.541), r = {x = -35.0, y = 0.0, z = -80.242}, canRotate = false, isOnline = true},
        [19] = {label = "24/7 Supermarkt Alhambra Dr. CAM#1", coords = vector3(1966.24, 3749.545, 34.143), r = {x = -35.0, y = 0.0, z = 163.065}, canRotate = false, isOnline = true},
        [20] = {label = "24/7 Supermarkt Senora Fwy CAM#2", coords = vector3(1729.522, 6419.87, 37.262), r = {x = -35.0, y = 0.0, z = -160.089}, canRotate = false, isOnline = true},
        [21] = {label = "Fleeca Bank Hawick Ave CAM#1", coords = vector3(309.341, -281.439, 55.88), r = {x = -35.0, y = 0.0, z = -146.1595}, canRotate = false, isOnline = true},
        [22] = {label = "Fleeca Bank Legion Square CAM#1", coords = vector3(144.871, -1043.044, 31.017), r = {x = -35.0, y = 0.0, z = -143.9796}, canRotate = false, isOnline = true},
        [23] = {label = "Fleeca Bank Hawick Ave CAM#2", coords = vector3(-355.7643, -52.506, 50.746), r = {x = -35.0, y = 0.0, z = -143.8711}, canRotate = false, isOnline = true},
        [24] = {label = "Fleeca Bank Del Perro Blvd CAM#1", coords = vector3(-1214.226, -335.86, 39.515), r = {x = -35.0, y = 0.0, z = -97.862}, canRotate = false, isOnline = true},
        [25] = {label = "Fleeca Bank Great Ocean Hwy CAM#1", coords = vector3(-2958.885, 478.983, 17.406), r = {x = -35.0, y = 0.0, z = -34.69595}, canRotate = false, isOnline = true},
        [26] = {label = "Paleto Bank CAM#1", coords = vector3(-102.939, 6467.668, 33.424), r = {x = -35.0, y = 0.0, z = 24.66}, canRotate = false, isOnline = true},
        [27] = {label = "Del Vecchio Liquor Paleto Bay", coords = vector3(-163.75, 6323.45, 33.424), r = {x = -35.0, y = 0.0, z = 260.00}, canRotate = false, isOnline = true},
        [28] = {label = "Don's Country Store Paleto Bay CAM#1", coords = vector3(166.42, 6634.4, 33.69), r = {x = -35.0, y = 0.0, z = 32.00}, canRotate = false, isOnline = true},
        [29] = {label = "Don's Country Store Paleto Bay CAM#2", coords = vector3(163.74, 6644.34, 33.69), r = {x = -35.0, y = 0.0, z = 168.00}, canRotate = false, isOnline = true},
        [30] = {label = "Don's Country Store Paleto Bay CAM#3", coords = vector3(169.54, 6640.89, 33.69), r = {x = -35.0, y = 0.0, z = 5.78}, canRotate = false, isOnline = true},
        [31] = {label = "Vangelico Jewelery CAM#1", coords = vector3(-627.54, -239.74, 40.33), r = {x = -35.0, y = 0.0, z = 5.78}, canRotate = true, isOnline = true},
        [32] = {label = "Vangelico Jewelery CAM#2", coords = vector3(-627.51, -229.51, 40.24), r = {x = -35.0, y = 0.0, z = -95.78}, canRotate = true, isOnline = true},
        [33] = {label = "Vangelico Jewelery CAM#3", coords = vector3(-620.3, -224.31, 40.23), r = {x = -35.0, y = 0.0, z = 165.78}, canRotate = true, isOnline = true},
        [34] = {label = "Vangelico Jewelery CAM#4", coords = vector3(-622.57, -236.3, 40.31), r = {x = -35.0, y = 0.0, z = 5.78}, canRotate = true, isOnline = true},
    },
}

Config.AuthorizedVehicles = { -- Police Vehicles and required grade
	-- Grade 0
	[0] = {
		["police"] = "Police Car 1",
		["police2"] = "Police Car 2",
		["police3"] = "Police Car 3",
		["police4"] = "Police Car 4",
		["policeb"] = "Police Car 5",
		["policet"] = "Police Car 6",
		["sheriff"] = "Sheriff Car 1",
		["sheriff2"] = "Sheriff Car 2",
	},
	-- Grade 1
	[1] = {
		["police"] = "Police Car 1",
		["police2"] = "Police Car 2",
		["police3"] = "Police Car 3",
		["police4"] = "Police Car 4",
		["policeb"] = "Police Car 5",
		["policet"] = "Police Car 6",
		["sheriff"] = "Sheriff Car 1",
		["sheriff2"] = "Sheriff Car 2",

	},
	-- Grade 2
	[2] = {
		["police"] = "Police Car 1",
		["police2"] = "Police Car 2",
		["police3"] = "Police Car 3",
		["police4"] = "Police Car 4",
		["policeb"] = "Police Car 5",
		["policet"] = "Police Car 6",
		["sheriff"] = "Sheriff Car 1",
		["sheriff2"] = "Sheriff Car 2",
	},
	-- Grade 3
	[3] = {
		["police"] = "Police Car 1",
		["police2"] = "Police Car 2",
		["police3"] = "Police Car 3",
		["police4"] = "Police Car 4",
		["policeb"] = "Police Car 5",
		["policet"] = "Police Car 6",
		["sheriff"] = "Sheriff Car 1",
		["sheriff2"] = "Sheriff Car 2",
	},
	-- Grade 4
	[4] = {
		["police"] = "Police Car 1",
		["police2"] = "Police Car 2",
		["police3"] = "Police Car 3",
		["police4"] = "Police Car 4",
		["policeb"] = "Police Car 5",
		["policet"] = "Police Car 6",
		["sheriff"] = "Sheriff Car 1",
		["sheriff2"] = "Sheriff Car 2",
	}
}

Config.WhitelistedVehicles = {}

Config.AmmoLabels = { -- Labels for Weapon Ammo
    ["AMMO_PISTOL"] = "9x19mm parabellum bullet",
    ["AMMO_SMG"] = "9x19mm parabellum bullet",
    ["AMMO_RIFLE"] = "7.62x39mm bullet",
    ["AMMO_MG"] = "7.92x57mm mauser bullet",
    ["AMMO_SHOTGUN"] = "12-gauge bullet",
    ["AMMO_SNIPER"] = "Large caliber bullet",
}

Config.Radars = { -- Radar Locations
	vector4(-623.44421386719, -823.08361816406, 25.25704574585, 145.0),
	vector4(-652.44421386719, -854.08361816406, 24.55704574585, 325.0),
	vector4(1623.0114746094, 1068.9924316406, 80.903594970703, 84.0),
	vector4(-2604.8994140625, 2996.3391113281, 27.528566360474, 175.0),
	vector4(2136.65234375, -591.81469726563, 94.272926330566, 318.0),
	vector4(2117.5764160156, -558.51013183594, 95.683128356934, 158.0),
	vector4(406.89505004883, -969.06286621094, 29.436267852783, 33.0),
	vector4(657.315, -218.819, 44.06, 320.0),
	vector4(2118.287, 6040.027, 50.928, 172.0),
	vector4(-106.304, -1127.5530, 30.778, 230.0),
	vector4(-823.3688, -1146.980, 8.0, 300.0),
}

Config.CarItems = { -- Default Trunk Items for Police Vehicles
    [1] = {
        name = "heavyarmor",
        amount = 2,
        info = {},
        type = "item",
        slot = 1,
    },
    [2] = {
        name = "empty_evidence_bag",
        amount = 10,
        info = {},
        type = "item",
        slot = 2,
    },
    [3] = {
        name = "police_stormram",
        amount = 1,
        info = {},
        type = "item",
        slot = 3,
    },
}

Config.Items = { -- Items to be displayed on Armory
    label = "Police Armory",
    slots = 30,
    items = {
        [1] = {
            name = "weapon_pistol",
            price = 0,
            amount = 1,
            info = {
                serie = "",
                attachments = {
                    {component = "COMPONENT_AT_PI_FLSH", label = "Flashlight"},
                }
            },
            type = "weapon",
            slot = 1,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [2] = {
            name = "weapon_stungun",
            price = 0,
            amount = 1,
            info = {
                serie = "",
            },
            type = "weapon",
            slot = 2,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [3] = {
            name = "weapon_pumpshotgun",
            price = 0,
            amount = 1,
            info = {
                serie = "",
                attachments = {
                    {component = "COMPONENT_AT_AR_FLSH", label = "Flashlight"},
                }
            },
            type = "weapon",
            slot = 3,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [4] = {
            name = "weapon_smg",
            price = 0,
            amount = 1,
            info = {
                serie = "",
                attachments = {
                    {component = "COMPONENT_AT_SCOPE_MACRO_02", label = "1x Scope"},
                    {component = "COMPONENT_AT_AR_FLSH", label = "Flashlight"},
                }
            },
            type = "weapon",
            slot = 4,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [5] = {
            name = "weapon_carbinerifle",
            price = 0,
            amount = 1,
            info = {
                serie = "",
                attachments = {
                    {component = "COMPONENT_AT_AR_FLSH", label = "Flashlight"},
                    {component = "COMPONENT_AT_SCOPE_MEDIUM", label = "3x Scope"},
                }
            },
            type = "weapon",
            slot = 5,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [6] = {
            name = "weapon_nightstick",
            price = 0,
            amount = 1,
            info = {},
            type = "weapon",
            slot = 6,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [7] = {
            name = "pistol_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 7,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [8] = {
            name = "smg_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 8,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [9] = {
            name = "shotgun_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 9,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [10] = {
            name = "rifle_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 10,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [11] = {
            name = "handcuffs",
            price = 0,
            amount = 1,
            info = {},
            type = "item",
            slot = 11,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [12] = {
            name = "weapon_flashlight",
            price = 0,
            amount = 1,
            info = {},
            type = "weapon",
            slot = 12,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [13] = {
            name = "empty_evidence_bag",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 13,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [14] = {
            name = "police_stormram",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 14,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [15] = {
            name = "armor",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 15,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [16] = {
            name = "radio",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 16,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        },
        [17] = {
            name = "heavyarmor",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 17,
            authorizedJobGrades = {0, 1, 2, 3, 4}
        }
    }
}

qb-policejob's People

Contributors

amantu-qbit avatar berkiebb avatar citrattv avatar darknight2590 avatar demo4889 avatar developer-bear avatar evanillaa avatar ghzgarage avatar holidayy95 avatar i-kulgu avatar idrisdose avatar izmystic avatar jnccloud avatar kamuikody avatar mataskc avatar mk3ext avatar mmoftah avatar newtonzz avatar nick-perry14 avatar radhwanedz avatar s33g avatar singh-manavv avatar suelthedev avatar tom-osborne avatar tonybynmp4 avatar trclassic92 avatar worapolburaphan avatar yeahitshayden avatar z3rio avatar zfbx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qb-policejob's Issues

Bug with Kidnap Player !

We can carry / kidnap more than 1 player. Suppose if we're kidnapping someone on should, and if we go to another dead person try to kidnap, we can kidnap that person also without uncarrying the current person

Police Radar

The police radar will not appear for me no matter what vehicle I'm in. I have tried the default GTA police vehicles and also my own addon vehicles and it does not appear.

uhmm..

        <div id="databank">
            <div class="databank-container">
                <div class="databank-bg" style="display:none; background: #ffffff; position: absolute; margin: 0 auto; left:0; right: 0; top: 12vh; width:70vw;height:70vh;"></div>
                <iframe src="https://databank.qbusroleplay.nl" name="databank" frameborder="0" style="display:none; position: absolute; margin: 0 auto; left:0; right: 0; top: 12vh; width:70vw;height:70vh;"></iframe>
                <img src="tablet-frame.png" alt="tablet" class="tablet-frame" style="display:none; pointer-events: none; position: absolute; margin: 0 auto; left:0; right: 0; top: 2.5vh; width:80vw;height:89vh;" />
            </div>
        </div>

What do or should we use for replaement or recreate this part

https://databank.qbusroleplay.nl

issues item for callsign

I wrote a simple script a while ago and the proposal was closed
According to my little experience
But the suggestion is:
When a citizen kidnaps a policeman
It will appear on the map when you log in callsign
But the police will track down the kidnapped policeman
And the kidnapper can't stop them from that
The kidnapper must be allowed to remove item callsign
To prevent them from tracking
The solution for sure was the following
The idea is simply written here
But you need help completing the code

["radar"] = {["name"] = "radar", ["label"] = "Signal Radar", ["weight"] = 2500, ["type"] = "item", ["image"] = "radar.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Police Tracking Device"},

local radar = player.Functions.GetItemByName('radar') ~= nil and true or false

        if radar == true then
            local callsign = player.PlayerData.metadata["callsign"] ~= nil and player.PlayerData.metadata["callsign"] or "Police"
            if player.PlayerData.job.name == "police" and player.PlayerData.job.onduty then
                table.insert(Blips, {v, 'police', callsign})
            elseif player.PlayerData.job.name == "ambulance" and player.PlayerData.job.onduty then
                table.insert(Blips, {v, 'ambulance', callsign})
            end
        end
    end

TriggerClientEvent(':updateBlips

CreateThread(function()
    while true do
        TriggerEvent("qb-policejob:server:updateBlips")
        Wait(25000)
    end
end)

legancyfuel

script error scripting/lua/scheduler..lua.968 no such export setfuel in resource legancyfuel

No SQL

I have just download this and there is no SQL

[BUG]

Describe the bug
As a Police officer, you are unable to remove placedspike stips

To Reproduce
Steps to reproduce the behavior:

  1. become police
  2. place spikestip

Expected behavior
Unable to pick back up

Questions (please complete the following information):

  • When you last updated: [e.g. last week]
    today

Remove objet

On the qb-policejob file, it is impossible to remove an object placed on the ground.

Error message:
script:qb-policejob > callback (@qp-radialmenu/client/main.lua:171)
script:qb-policejob > SCRIPT ERROR : @qb-policejob/client/objects.lua:107: attempt to compare nil with number

Impound bug

You can instantly impound any NPC vehicle, so people can bug abuse this.

Also, as an improvement, you could add a progress bar to impound cars.

[QUETION]

So how to do I make permissions for this?

[SUGGESTION] Make items remove when using the bin

Is your feature request related to a problem? Please describe.
Not really, it's just frustrating

Describe the feature you'd like
Please add a feature so that items that are dropped in the police trash (bin) will be removed from the server
For example, if the police want to destroy a gun they can use the bin.

Describe alternatives you've considered
There is none

[BUG]Handcuffs

Describe the bug
handcuffs item won't work when i use them

add some features

RegisterNetEvent('police:client:checkBank')
AddEventHandler('police:client:checkBank', function()
    local player, distance = GetClosestPlayer()
    if player ~= -1 and distance < 2.5 then
        local playerId = GetPlayerServerId(player)
        TriggerServerEvent("police:server:checkBank", playerId)
    else
        QBCore.Functions.Notify("No one around!", "error")
    end
end)

RegisterNetEvent('police:client:checkLicenses')
AddEventHandler('police:client:checkLicenses', function()
    local player, distance = GetClosestPlayer()
    if player ~= -1 and distance < 2.5 then
        local playerId = GetPlayerServerId(player)
        TriggerServerEvent("police:server:checkLicenses", playerId)
    else
        QBCore.Functions.Notify("No one around!", "error")
    end
end)

and put sound in handcuff
TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 2.0, 'handcuff', 0.9)

bug: When a person is stolen

When someone is killed through, for example, a group of people
Everyone can use RegisterNetEvent('police:client:RobPlayer')
You should make it like a trunk car
when using show error busy
It's not reasonable for three people to open one person's bag at the same time

No locker rooms?

I for the life of me cannot find any locker rooms anywhere. In the config or anything. I can find them via the boss menu but that is it. Was it accidentally removed? Or am I missing something.

Thank you.

Missing policejob.sql

Hi,

When I followed the installation instructions, you said import the policejob.sql. currently this sql database is not present after the download. Could you add it please?

Thank for your help.

police blips

when police goes far away gps blip is disappearing

/jail not working

If you put in /jail ID TIME it only gives a notification, and not send the person to jail

On / Off Duty

Since the newest update whenever I go off-duty I am not able to go back on duty. The text disappears.

handcuff issues

When using hardcuff ; the animation keeps playing back every 2 seconds or so ; even when you put a player in a vehicle the animation keeps resetting/playing back.

Softcuff ; when you take player out of the vehicle, it only shows the cuffed animation on the player side, not the cop side.

[BUG] After the new update

Describe the bug
After updating the police job script I have this error in server console
To Reproduce
Steps to reproduce the behaviour:

  1. Update the script
  2. you will get this error
    [ script:qb-policejob] SCRIPT ERROR: @qb-policejob/server/main.lua:473: attempt to call a nil value (field 'GetQBPlayers') [ script:qb-policejob] > fn (@qb-policejob/server/main.lua:1141)

Expected behavior
Run without errors

Questions (please complete the following information):

  • When you last updated: Today
  • Are you using custom resource? which ones? None curently
  • Have you renamed qb- to something custom? No

Police Job

Good day, This will include all the functions that we've found from the police that work and do not work.

For the Police Department location ,only if you have the police job , you can unlock any areas (armory, lockers, jail) and you can start duty by going at the PC in the lobby.
If you are the Police Chief (rank 4) you can also access the boss menu, which let's you hire, promote people and also let's you deposit money for the police.
At the Police Department at the moment from what I can see the only thing that is missing is either a system for the police outfits, or adding all the police uniforms to the clothing store so we can change them there.
-The armory has weapons and police equipment inside and can be accessed by any people in the Police Department.

Radial Work menu for Police.
-The "take license" option does not seem to work
-From Police interaction , the jail function doesn't seem to work ,it says that it jails the person but it doesn't , I will try with higher amounts of time also) -- Jail MLO required with the appropriate event trigger.
-The Emergency button we do not know what it does
-Check tune status i do not believe it's available (it says NULL: Chiptuned:no)
-Reset house key I do not know what it does
Apart from those, the rest seem to work just fine.
-Cuffing a player, either by /cuff or using the radial menu.
-Search a player
-Escort a player
-You can place down several types of objects including spike strips which work

The pings for Police work, if someone is driving recklessly or shoots a weapon you receive a message in the top right of the screen with a description of the suspect and relative location. :D

image
image

Tengri,
OGN TEAM.

[BUG] location in phone MDT always sets to the same spot for 911p

Describe the bug
When a player makes a 911p call, the blip on the map for the alert is correct, but when an officer clicks on the call in the MDT in the phone, it always places a blip on postal 570 (Map screenshot attached)

To Reproduce
Steps to reproduce the behavior:

  1. Civ place a /911p call
  2. Officer opens the MDT on the phone
  3. Officer clicks alert in phone's MDT
  4. Waypoint always set at the same location, not the location of the incident

Expected behavior
An accurate waypoint to be placed for /911p call location

Screenshots
FiveM - Wee Woo Crew Public RP Server 10_21_2021 2_07_51 AM
FiveM - Wee Woo Crew Public RP Server 10_21_2021 2_07_53 AM

Questions (please complete the following information):

  • When you last updated: qb-policejob: tonight after commit message sent in discord
  • Are you using custom resource? which ones? The Garage's MDT, but this script is not applicable to this issue
  • Have you renamed qb- to something custom? No

Additional context
I have tried this with several players in several locations and have had the same result

Police alerts

does any one have the wf_alerts that works with the qb-policejob?

trash delete ?

["trash"] = {
[1] = vector4(439.0907, -976.746, 30.776, 93.03),
},

for k, v in pairs(Config.Locations["trash"]) do

Hello, I have a suggestion or request
And there's a trash can
At the police station
We need a way to make this store delete its contents after a certain period
For example, every month
I've tried through the databases to syntax to delete the content of the trash but unfortunately the results are poor
It will be a great example of dealing with databases and can be used in many places

Possible Duplication - RegisterServerEvent police:server:TakeOutImpound (?)

I apologize if it does not correspond, but I think this part is duplicated

Lines 18-23

RegisterServerEvent('police:server:TakeOutImpound')
AddEventHandler('police:server:TakeOutImpound', function(plate)
    local src = source       
    exports['ghmattimysql']:execute('UPDATE player_vehicles SET state = @state WHERE plate = @plate', {['@state'] = 0, ['@plate'] = plate})
    TriggerClientEvent('QBCore:Notify', src, "Vehicle is taken out of Impound!")  
end)

Lines 377-383

RegisterServerEvent('police:server:TakeOutImpound')
AddEventHandler('police:server:TakeOutImpound', function(plate)
    local src = source       
    exports['ghmattimysql']:execute('UPDATE player_vehicles SET state = @state WHERE plate = @plate', {['@state'] = 0, ['@plate'] = plate})
    TriggerClientEvent('QBCore:Notify', src, "Vehicle is taken out of Impound!")
      
end)

Bug i think

Screenshot_2

where is E - Go on duty i think need to say E - Go off duty

Sorry for bad English

BUG: index.html contains a random dodgy iframe?

Not sure is the author of this has been a bit naughty and is planning to make ad revenue from an external site but this
package has an iframe in it to a very questionable site.

offending line: 225
<iframe src="https://databank.qbusroleplay.nl" name="databank" frameborder="0" style="display:none; position: absolute; margin: 0 auto; left:0; right: 0; top: 12vh; width:70vw;height:70vh;"></iframe>

Either way this is pretty disappointing to see and suggest either you remove it or let it be known rather than it being sneaked into some code.

shots fire

the police shots fire alearts not working

Police Grades

I have looked through the majority of files and am trying to figure out how to add more police grades.

I hope I can get some help from you.

[QUESTION]

How do I go on duty? Where can I make myself have perms to go on duty?

Police Uniforms?

I cant seem to find where to change into a police uniform. I have everything set up correctly but when i go into the locker room nothing happens

[BUG] Always log in as ON DUTY?

Describe the bug
Whenever I log in I'll always be on duty already. This is not just a "visual bug" regarding the /job command saying that I'm on duty when I'm not.

To Reproduce
Steps to reproduce the behavior:

  1. Go to qb-core/shared.lua and set police defaultduty = false.
  2. Go to PD and clock off.
  3. Leave the server, restart, whatever you want, join back. You're on duty again anyway.

Expected behavior
You should be off duty when joining back, especially after setting defaultduty = false.

Screenshots
n/a

Questions (please complete the following information):

  • When you last updated: core and police-job are up to date.
  • Are you using custom resource? which ones?: no?
  • Have you renamed qb- to something custom?: no

Additional context
n/a

help for oxmysql

hello i want help for complete this

    local src = source
    local id = tonumber(args[1])
	if id then
		local xPlayer = QBCore.Functions.GetPlayer(id)
		local xReciv = QBCore.Functions.GetPlayer(src)
        
        if xPlayer and xReciv and xReciv.PlayerData.job.name == 'police' then
			local distance = xPlayer.PlayerData.metadata["inlaststand"] and 3.0 or 10.0
			if #(GetEntityCoords(GetPlayerPed(src)) - GetEntityCoords(GetPlayerPed(id))) < distance then
                          exports.oxmysql:fetch('SELECT * FROM `phone_invoices` WHERE citizenid = ?', {xPlayer.PlayerData.citizenid }, function(result)
			-- "SELECT * FROM `phone_invoices` WHERE `citizenid` = '" .. xPlayer.PlayerData.citizenid .. "'", function(result)
				if result[1] ~= nil then
					TriggerClientEvent('QBCore:Notify', src, "This person has " .. #result .. " unpaid fines.", "success")
				else
					TriggerClientEvent('QBCore:Notify', src, "This person has no unpaid fines.", "success")
				end
			else
				TriggerClientEvent('QBCore:Notify', src, "You are too far away.", "error")
			end
		else
			TriggerClientEvent('QBCore:Notify', src, "This command is for officers only!", "error")
		end
	else
		TriggerClientEvent('QBCore:Notify', src, "Wrong ID.", "error")
	end
end)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.