Code Monkey home page Code Monkey logo

qb-policejob's Introduction

qb-policejob

Police Job for QB-Core Framework ๐Ÿ‘ฎ

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
  • /palert [text] - Sends an alert.
  • /escort - Escorts nearby plyer.
  • /mdt - Opens the MDT.
  • /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.
  • Import qb-policejob.sql in your database
  • Add the following code to your server.cfg/resouces.cfg
ensure qb-core
ensure qb-policejob

Configuration

Config = {}

local StringCharset = {}
local NumberCharset = {}

for i = 48,  57 do table.insert(NumberCharset, string.char(i)) end -- Don't touch
for i = 65,  90 do table.insert(StringCharset, string.char(i)) end -- Don't touch
for i = 97, 122 do table.insert(StringCharset, string.char(i)) end -- Don't touch

Config.RandomStr = function(length) -- Don't touch
	if length > 0 then
		return Config.RandomStr(length-1) .. StringCharset[math.random(1, #StringCharset)]
	else
		return ''
	end
end

Config.RandomInt = function(length) -- Don't touch
	if length > 0 then
		return Config.RandomInt(length-1) .. NumberCharset[math.random(1, #NumberCharset)]
	else
		return ''
	end
end

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] = {x = 440.085, y = -974.924, z = 30.689, h = 90.654},
       [2] = {x = -449.811, y = 6012.909, z = 31.815, h = 90.654},
   },    
   ["vehicle"] = { -- Vehicle Spawner Marker
       [1] = {x = 448.159, y = -1017.41, z = 28.562, h = 90.654},
       [2] = {x = 471.13, y = -1024.05, z = 28.17, h = 274.5},
       [3] = {x = -455.39, y = 6002.02, z = 31.34, h = 87.93},
   },    
   ["stash"] = { -- Stash Marker
       [1] = {x = 453.075, y = -980.124, z = 30.889, h = 90.654},
       [2] = {x = -434.63, y = 6001.63, z = 31.71, h = 316.5, r = 1.0},
   },     
   ["impound"] = { -- Impounded Vehicles Marker
       [1] = {x = 436.68, y = -1007.42, z = 27.32, h = 180.0},
       [2] = {x = -436.14, y = 5982.63, z = 31.34, h = 136.0, r = 1.0},
   }, 
   ["helicopter"] = { -- Helicopter Spawner Marker
       [1] = {x = 449.168, y = -981.325, z = 43.691, h = 87.234},
       [2] = {x = -475.43, y = 5988.353, z = 31.716, h = 31.34},
   }, 
   ["armory"] = { -- Armory Marker
       [1] = {x = 462.23, y = -981.12, z = 30.68, h = 90.654},
       [2] = {x = -436.82, y = 5996.98, z = 31.716, h = 90.654},
   },   
   ["trash"] = { -- Trash Marker
       [1] = {x = 471.01, y = -988.05, z = 24.92, h = 299.5},
   },      
   ["fingerprint"] = { -- Fingerprint Scan Marker
       [1] = {x = 479.64, y = -990.71, z = 24.26, h = 358.5},
       [2] = {x = -442.38, y = 6011.9, z = 27.98, h = 311.5},
   },
   ["evidence"] = { -- Evidence Closet 1 Marker
       [1] = {x = 467.72, y = -992.02, z = 24.92, h = 358.5},
       [2] = {x = -439.09, y = 6003.12, z = 31.84, h = 90.654},
   },    
   ["evidence2"] = { -- Evidence Closet 2 Marker
       [1] = {x = 466.42, y = -988.71, z = 24.92, h = 90.5},
       [2] = {x = -439.54, y = 6011.42, z = 27.98, h = 44.5, r = 1.0},
   },   
   ["evidence3"] = { -- Evidence Closet 3 Marker
       [1] = {x = 468.47, y = -988.78, z = 24.92, h = 272.5},
       [2] = {x = -439.43, y = 6009.45, z = 27.98, h = 134.5, r = 1.0},
   },        
   ["stations"] = { -- Police Stations Blips
       [1] = {label = "Police Station", coords = {x = 428.23, y = -984.28, z = 29.76, h = 3.5}},
       [2] = {label = "Prison", coords = {x = 1845.903, y = 2585.873, z = 45.672, h = 272.249}},
       [3] = {label = "Police Station Paleto", coords = {x = -451.55, y = 6014.25, z = 31.716, h = 223.81}},
   },
}

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

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", x = 257.45, y = 210.07, z = 109.08, r = {x = -25.0, y = 0.0, z = 28.05}, canRotate = false, isOnline = true},
        [2] = {label = "Pacific Bank CAM#2", x = 232.86, y = 221.46, z = 107.83, r = {x = -25.0, y = 0.0, z = -140.91}, canRotate = false, isOnline = true},
        [3] = {label = "Pacific Bank CAM#3", x = 252.27, y = 225.52, z = 103.99, r = {x = -35.0, y = 0.0, z = -74.87}, canRotate = false, isOnline = true},
        [4] = {label = "Limited Ltd Grove St. CAM#1", x = -53.1433, y = -1746.714, z = 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", x = -1482.9, y = -380.463, z = 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", x = -1224.874, y = -911.094, z = 14.401, r = {x = -35.0, y = 0.0, z = -6.778894}, canRotate = false, isOnline = true},
        [7] = {label = "Limited Ltd Ginger St. CAM#1", x = -718.153, y = -909.211, z = 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", x = 23.885, y = -1342.441, z = 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", x = 1133.024, y = -978.712, z = 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", x = 1151.93, y = -320.389, z = 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", x = 383.402, y = 328.915, z = 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", x = -1832.057, y = 789.389, z = 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", x = -2966.15, y = 387.067, z = 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", x = -3046.749, y = 592.491, z = 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", x = -3246.489, y = 1010.408, z = 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", x = 539.773, y = 2664.904, z = 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", x = 1169.855, y = 2711.493, z = 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", x = 2673.579, y = 3281.265, z = 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", x = 1966.24, y = 3749.545, z = 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", x = 1729.522, y = 6419.87, z = 37.262, r = {x = -35.0, y = 0.0, z = -160.089}, canRotate = false, isOnline = true},
        [21] = {label = "Fleeca Bank Hawick Ave CAM#1", x = 309.341, y = -281.439, z = 55.88, r = {x = -35.0, y = 0.0, z = -146.1595}, canRotate = false, isOnline = true},
        [22] = {label = "Fleeca Bank Legion Square CAM#1", x = 144.871, y = -1043.044, z = 31.017, r = {x = -35.0, y = 0.0, z = -143.9796}, canRotate = false, isOnline = true},
        [23] = {label = "Fleeca Bank Hawick Ave CAM#2", x = -355.7643, y = -52.506, z = 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", x = -1214.226, y = -335.86, z = 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", x = -2958.885, y = 478.983, z = 17.406, r = {x = -35.0, y = 0.0, z = -34.69595}, canRotate = false, isOnline = true},
        [26] = {label = "Paleto Bank CAM#1", x = -102.939, y = 6467.668, z = 33.424, r = {x = -35.0, y = 0.0, z = 24.66}, canRotate = false, isOnline = true},
        [27] = {label = "Del Vecchio Liquor Paleto Bay", x = -163.75, y = 6323.45, z = 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", x = 166.42, y = 6634.4, z = 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", x = 163.74, y = 6644.34, z = 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", x = 169.54, y = 6640.89, z = 33.69, r = {x = -35.0, y = 0.0, z = 5.78}, canRotate = false, isOnline = true},
        [31] = {label = "Vangelico Juwelier CAM#1", x = -627.54, y = -239.74, z = 40.33, r = {x = -35.0, y = 0.0, z = 5.78}, canRotate = true, isOnline = true},
        [32] = {label = "Vangelico Juwelier CAM#2", x = -627.51, y = -229.51, z = 40.24, r = {x = -35.0, y = 0.0, z = -95.78}, canRotate = true, isOnline = true},
        [33] = {label = "Vangelico Juwelier CAM#3", x = -620.3, y = -224.31, z = 40.23, r = {x = -35.0, y = 0.0, z = 165.78}, canRotate = true, isOnline = true},
        [34] = {label = "Vangelico Juwelier CAM#4", x = -622.57, y = -236.3, z = 40.31, r = {x = -35.0, y = 0.0, z = 5.78}, canRotate = true, isOnline = true},
    },
}

Config.Vehicles = { -- Vehicle Spawner Vehicles
    ["police2"] = "Police 2",
}

Config.WhitelistedVehicles = { -- Whitelisted Police Vehicles
    ["pcharger"] = "Dodge Charger (UC)",
}

Config.AmmoLabels = { -- Labels for Weapon Ammo
    ["AMMO_PISTOL"] = "9x19mm Parabellum kogel",
    ["AMMO_SMG"] = "9x19mm Parabellum kogel",
    ["AMMO_RIFLE"] = "7.62x39mm kogel",
    ["AMMO_MG"] = "7.92x57mm Mauser kogel",
    ["AMMO_SHOTGUN"] = "12-gauge kogel",
    ["AMMO_SNIPER"] = "Groot caliber kogel",
}

Config.Radars = { -- Radar Locations
	{x = -623.44421386719, y = -823.08361816406, z = 25.25704574585, h = 145.0 },
	{x = -652.44421386719, y = -854.08361816406, z = 24.55704574585, h = 325.0 },
	{x = 1623.0114746094, y = 1068.9924316406, z = 80.903594970703, h = 84.0 },
	{x = -2604.8994140625, y = 2996.3391113281, z = 27.528566360474, h = 175.0 },
	{x = 2136.65234375, y = -591.81469726563, z = 94.272926330566, h = 318.0 },
	{x = 2117.5764160156, y = -558.51013183594, z = 95.683128356934, h = 158.0 },
	{x = 406.89505004883, y = -969.06286621094, z = 29.436267852783, h = 33.0 },
	{x = 657.315, y = -218.819, z = 44.06, h = 320.0 },
	{x = 2118.287, y = 6040.027, z = 50.928, h = 172.0 },
	{x = -106.304, y = -1127.5530, z = 30.778, h = 230.0 },
	{x = -823.3688, y = -1146.980, z = 8.0, h = 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,
        },
        [2] = {
            name = "weapon_stungun",
            price = 0,
            amount = 1,
            info = {
                serie = "",            
            },
            type = "weapon",
            slot = 2,
        },
        [3] = {
            name = "weapon_pumpshotgun",
            price = 0,
            amount = 1,
            info = {
                serie = "",
                attachments = {
                    {component = "COMPONENT_AT_AR_FLSH", label = "Flashlight"},
                }
            },
            type = "weapon",
            slot = 3,
        },
        [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,
        },
        [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,
        },
        [6] = {
            name = "weapon_nightstick",
            price = 0,
            amount = 1,
            info = {},
            type = "weapon",
            slot = 6,
        },
        [7] = {
            name = "pistol_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 7,
        },
        [8] = {
            name = "smg_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 8,
        },
        [9] = {
            name = "shotgun_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 9,
        },
        [10] = {
            name = "rifle_ammo",
            price = 0,
            amount = 5,
            info = {},
            type = "item",
            slot = 10,
        },
        [11] = {
            name = "handcuffs",
            price = 0,
            amount = 1,
            info = {},
            type = "item",
            slot = 11,
        },
        [12] = {
            name = "weapon_flashlight",
            price = 0,
            amount = 1,
            info = {},
            type = "weapon",
            slot = 12,
        },
        [13] = {
            name = "empty_evidence_bag",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 13,
        },
        [14] = {
            name = "police_stormram",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 14,
        },
        [15] = {
            name = "armor",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 15,
        },
        [16] = {
            name = "radio",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 16,
        },
        [17] = {
            name = "heavyarmor",
            price = 0,
            amount = 50,
            info = {},
            type = "item",
            slot = 17,
        },
    }
}

qb-policejob's People

Contributors

berkiebb avatar ghostfacerp avatar ghzgarage avatar jericofx avatar usmanwarraich007 avatar yarpii avatar

Watchers

 avatar

Forkers

renovate-bot

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.