Brutal Scripts
YouTubeDiscordStore
  • 🙉About Us
  • ↗️Translate
  • Informations
    • 🔒Escrow System
    • 🔥Common Problems
  • Scripts
    • 📄Notify
      • Accessible files
      • Installation guide
    • 🔠Text-UI
      • Installation guide
      • Exports & How to use
      • Integrations
    • 🤟Gangs
      • Accessible files
      • Installation guide
      • exports / triggers
      • Create a new gang
    • 🏡Housing
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔑Keys
      • Accessible files
      • Installation guide
      • exports / triggers
    • 💥Gang Actions
      • Accessible files
      • Installation guide
      • exports / triggers
      • Controlling the menu
    • ⭕Radial
      • Accessible files
      • Installation guide
      • Adding new buttons
    • 🎯Executions
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🐶Pets + K9 V2
      • Accessible files
      • Installation guide
    • 👮Police Job
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🚑Ambulance Job
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔧Mechanic Job
      • Accessible files
      • Installation guide
      • exports / triggers
    • 💪GYM with Skills V2
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔫Paintball
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🥊Boxing
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔨Crafting
      • Accessible files
      • Installation guide
      • Creating a new crafting table
    • 🏦Banking
      • Accessible files
      • Installation guide
      • Paycheck transactions
      • Registering transactions
    • 🎳Bowling
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🦌Hunting
      • Accessible files
      • Installation guide
    • 🏁Racing Script
      • Accessible files
      • Installation guide
    • 🐛Reports
      • Accessible files
      • Installation guide
    • 🛒Shop Robbery
      • Accessible files
      • Installation guide
    • 🛥️Yacht Heist
      • Accessible files
      • Installation guide
    • 🧾Billing
      • Accessible files
      • Installation guide
      • Triggers
    • 💰Truck Robbery
      • Accessible files
      • Installation guide
    • 🏧Atm Robbery
      • Accessible files
      • Installation guide
    • 👶Baby script
      • Installation guide
      • How to add more babys
  • Others
    • Register Key Mapping
    • Drill Minigame
    • Discord Webhook
Powered by GitBook
On this page
  • Asset download
  • Upload the SQL
  • Upload the items
  • Asset positioning
  • Setting up the Webhook
  • Setting the loaded event
  • Checking the Config file
  • Most important steps
  • Using the script
  • Spike Strip
  • Hacking Minigame
  • Editing framework
  • If you got any error

Was this helpful?

  1. Scripts
  2. 👮Police Job

Installation guide

Welcome to the Brutal Police Job installation guide, here you can learn how to completely install our asset.

If you don't have any experience in development we are highly recommend to follow each step in this documentation, and if you have a developer ask them to install the script for you as they have more experience.


Asset download

Once the purchase is made on our official website, you will receive your asset directly in your Keymaster, in the Granted Assets panel you will see the asset, download it and do the following steps to install it correctly.

  • Put the script folder to your server.

  • Start the script in the server.cfg. (ensure brutal_policejob)

  • Restart your server! (And you get permission to use the script)

Click here if you haven't installed any script ever


Upload the SQL

Do not rename your previous SQL or columns to adapt them to this system, use the complete database without making use of edits in your old databases.

ALTER TABLE users DROP COLUMN IF EXISTS jail_time;

ALTER TABLE `users` ADD COLUMN `jail_inventory` longtext NULL DEFAULT NULL;
ALTER TABLE `users` ADD COLUMN `jail_time` int NULL DEFAULT NULL;
ALTER TABLE `users` ADD COLUMN `jail_reason` text NULL DEFAULT NULL;
ALTER TABLE `users` ADD COLUMN `mdt_photo` text NULL DEFAULT NULL;
ALTER TABLE `users` ADD COLUMN `mdt_notes` text NULL DEFAULT NULL;

ALTER TABLE `owned_vehicles` ADD COLUMN `mdt_photo` text NULL DEFAULT NULL;
ALTER TABLE `owned_vehicles` ADD COLUMN `mdt_notes` text NULL DEFAULT NULL;

CREATE TABLE `brutal_policejob_incidents` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`title` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`date` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`creator` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`involveds` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`content` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1
;
ALTER TABLE `players` ADD COLUMN `mdt_photo` text NULL DEFAULT NULL;
ALTER TABLE `players` ADD COLUMN `mdt_notes` text NULL DEFAULT NULL;
ALTER TABLE `players` ADD COLUMN `jail_time` int NULL DEFAULT NULL;
ALTER TABLE `players` ADD COLUMN `jail_reason` text NULL DEFAULT NULL;
ALTER TABLE `players` ADD COLUMN `jail_inventory` longtext NULL DEFAULT NULL;

ALTER TABLE `player_vehicles` ADD COLUMN `mdt_photo` text NULL DEFAULT NULL;
ALTER TABLE `player_vehicles` ADD COLUMN `mdt_notes` text NULL DEFAULT NULL;

CREATE TABLE `brutal_policejob_incidents` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`title` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`date` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`creator` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`involveds` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`content` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=43
;

If you don't have the sql tables for your core's police job then upload these too below!

ESX
INSERT INTO `addon_account` (name, label, shared) VALUES
	('society_police', 'Police', 1)
;

INSERT INTO `datastore` (name, label, shared) VALUES
	('society_police', 'Police', 1)
;

INSERT INTO `addon_inventory` (name, label, shared) VALUES
	('society_police', 'Police', 1)
;

INSERT INTO `jobs` (name, label) VALUES
	('police', 'Police')
;

INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
	('police',0,'recruit','Recruit',20,'{}','{}'),
	('police',1,'officer','Officer',40,'{}','{}'),
	('police',2,'sergeant','Sergeant',60,'{}','{}'),
	('police',3,'lieutenant','Lieutenant',85,'{}','{}'),
	('police',4,'boss','Chief',100,'{}','{}')
;

CREATE TABLE `fine_types` (
	`id` int NOT NULL AUTO_INCREMENT,
	`label` varchar(255) DEFAULT NULL,
	`amount` int DEFAULT NULL,
	`category` int DEFAULT NULL,

	PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


INSERT INTO `fine_types` (label, amount, category) VALUES
	('Misuse of a horn', 30, 0),
	('Illegally Crossing a continuous Line', 40, 0),
	('Driving on the wrong side of the road', 250, 0),
	('Illegal U-Turn', 250, 0),
	('Illegally Driving Off-road', 170, 0),
	('Refusing a Lawful Command', 30, 0),
	('Illegally Stopping a Vehicle', 150, 0),
	('Illegal Parking', 70, 0),
	('Failing to Yield to the right', 70, 0),
	('Failure to comply with Vehicle Information', 90, 0),
	('Failing to stop at a Stop Sign ', 105, 0),
	('Failing to stop at a Red Light', 130, 0),
	('Illegal Passing', 100, 0),
	('Driving an illegal Vehicle', 100, 0),
	('Driving without a License', 1500, 0),
	('Hit and Run', 800, 0),
	('Exceeding Speeds Over < 5 mph', 90, 0),
	('Exceeding Speeds Over 5-15 mph', 120, 0),
	('Exceeding Speeds Over 15-30 mph', 180, 0),
	('Exceeding Speeds Over > 30 mph', 300, 0),
	('Impeding traffic flow', 110, 1),
	('Public Intoxication', 90, 1),
	('Disorderly conduct', 90, 1),
	('Obstruction of Justice', 130, 1),
	('Insults towards Civilans', 75, 1),
	('Disrespecting of an LEO', 110, 1),
	('Verbal Threat towards a Civilan', 90, 1),
	('Verbal Threat towards an LEO', 150, 1),
	('Providing False Information', 250, 1),
	('Attempt of Corruption', 1500, 1),
	('Brandishing a weapon in city Limits', 120, 2),
	('Brandishing a Lethal Weapon in city Limits', 300, 2),
	('No Firearms License', 600, 2),
	('Possession of an Illegal Weapon', 700, 2),
	('Possession of Burglary Tools', 300, 2),
	('Grand Theft Auto', 1800, 2),
	('Intent to Sell/Distrube of an illegal Substance', 1500, 2),
	('Frabrication of an Illegal Substance', 1500, 2),
	('Possession of an Illegal Substance ', 650, 2),
	('Kidnapping of a Civilan', 1500, 2),
	('Kidnapping of an LEO', 2000, 2),
	('Robbery', 650, 2),
	('Armed Robbery of a Store', 650, 2),
	('Armed Robbery of a Bank', 1500, 2),
	('Assault on a Civilian', 2000, 3),
	('Assault of an LEO', 2500, 3),
	('Attempt of Murder of a Civilian', 3000, 3),
	('Attempt of Murder of an LEO', 5000, 3),
	('Murder of a Civilian', 10000, 3),
	('Murder of an LEO', 30000, 3),
	('Involuntary manslaughter', 1800, 3),
	('Fraud', 2000, 2);
;

Click here if you don't know how to upload the sql, here is a quick guide


Upload the items

If you don't have the items integrated correctly, you will receive random errors.

Check that you don't have duplicate items in your inventory or database before integrating them, otherwise you might have some errors.

This asset depends on certain items for its operation, so don't forget to integrate all items correctly into your database or inventory system, depending on how you use your server.

If your inventory is not among the following, you can create the file yourself using the examples of each item by displaying any of the following tabs.

Items for esx_inventory
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('handcuff_key', 'Handcuff Key', 1, 0, 1),
('police_bulletproof', 'Police Bulletproof', 1, 0, 1),
('sheriff_bulletproof', 'Sheriff Bulletproof', 1, 0, 1),
('cam_hacking', 'Camera Hack', 1, 0, 1);
Items for qb-inventory
['handcuff_key'] 			 		 = {['name'] = 'handcuff_key', 						['label'] = 'Handcuff Key', 						['weight'] = 1, 		['type'] = 'item', 		['image'] = 'handcuff_key.png', 				['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = ''},
['police_bulletproof'] 			 			 = {['name'] = 'police_bulletproof', 							['label'] = 'Police Bulletproof', 						['weight'] = 1, 		['type'] = 'item', 		['image'] = 'police_bulletproof.png', 				['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = ''},
['sheriff_bulletproof'] 					 = {['name'] = 'sheriff_bulletproof', 						['label'] = 'Sheriff Bulletproof', 						['weight'] = 1, 		['type'] = 'item', 		['image'] = 'sheriff_bulletproof.png', 				['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = ''},
['cam_hacking'] 					 = {['name'] = 'cam_hacking', 						['label'] = 'Camera Hack', 						['weight'] = 1, 		['type'] = 'item', 		['image'] = 'cam_hacking.png', 				['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = ''},
Items for qs-inventory
["handcuff_key"] = {
    ["name"] = "handcuff_key",
    ["label"] = "Handcuff Key",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "handcuff_key.png",
    ["unique"] = false,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = "Not have"
},

["police_bulletproof"] = {
    ["name"] = "police_bulletproof",
    ["label"] = "Police Bulletproof",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "police_bulletproof.png",
    ["unique"] = false,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = "Not have"
},

["sheriff_bulletproof"] = {
    ["name"] = "sheriff_bulletproof",
    ["label"] = "Sheriff Bulletproof",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "sheriff_bulletproof.png",
    ["unique"] = false,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = "Not have"
},

["cam_hacking"] = {
    ["name"] = "cam_hacking",
    ["label"] = "Camera Hack",
    ["weight"] = 10,
    ["type"] = "item",
    ["image"] = "cam_hacking.png",
    ["unique"] = false,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = "Not have"
},
Items for ox-inventory
["handcuff_key"] = {
    label = "Handcuff Key",
    weight = 1,
    stack = true,
    close = false,
},

["police_bulletproof"] = {
    label = "Police Bulletproof",
    weight = 1,
    stack = true,
    close = false,
},

["sheriff_bulletproof"] = {
    label = "Sheriff Bulletproof",
    weight = 1,
    stack = true,
    close = false,
},

["cam_hacking"] = {
    label = "Camera Hack",
    weight = 1,
    stack = true,
    close = false,
},

Click here if you don't know how to upload the sql, here is a quick guide

The images which we used to the items are in the html/assets folder


Asset positioning

Correctly position the assets in the server.cfg by following this step, if something goes wrong you will probably get errors about exports not found, do not skip this step!

-- First we will start the cores, never below
ensure es_extended or qb-core

-- The Notify / TextUI or target system / Progressbar / Inventory / Billing have to be above our asset
ensure [notify]
ensure [inventory]
ensure [billing]
ensure [textui] -- or target system 

-- Start the Brutal Police Job at the end
ensure brutal_policejob

Setting up the Webhook

If you want to use the opportunnities which can be given by a webhook then you will have to set it up in our assets. You can do it by changeing a value to your discord webhook in the sv-utils.lua file.

Discord Webhook

Setting the loaded event

If you are using a multicharacter system then this step is really important to make our script working propetly! If you don't use any or the loaded event is the same as the basic core one then you are done with this step.

In the client-core.lua file go to the LoadedEvent variable and if you are using a different event then paste there your event which is used on your server.


Checking the Config file

Please make sure that you go through the whole file during the installation and check everything. It is one of the most important things as if you miss this step the script might won't work propetly.

Most important steps

The most important things always at the top of the config so pay the most attencion to these elements.

Setting the Core

Set your server's core wether it's using es_extended or qb-core, other cores aren't supported .

Setting the Notify

If you are using the Brutal Notify then it is good news, you don't have to do anything. If you aren't then set the BrutalNotify value to false in the config and set up your own notify in the cl-utils.lua

Setting the TextUI or Target

Set the TextUI from the options which are commented out. If your server using an other TextUI it is not a problem, you can set it up in the cl-utils.lua. If you want to use a target system then set the TextUI to false and set your target.


Using the script

To use any functions of the script players have to duty in every time they join to the server. If they miss this step then they won't be able to use the mdt and many other functions!

Spike Strip

If you want to use the spike strip function to punctures the tyres you will need to add this script to your server. It will only work with this older version!

Hacking Minigame

Download this script if you want to use the camera hacking part.


Editing framework

To use this script you will have to make some changes in your core. These steps have to be done to make our asset work 100% instead of the core police jo

Navigate to esx_society/server/main.lua and replace this function:

function isPlayerBoss(playerId, job)
	local xPlayer = ESX.GetPlayerFromId(playerId)

	if xPlayer.job.name == job then
		return true
	else
		print(('esx_society: %s attempted open a society boss menu!'):format(xPlayer.identifier))
		return false
	end
end

If you want the players only get paycheck if they are on duty then replace this function: es_extended/server /paycheck.lua

Navigate to qb-smallresources/client/handsup.lua and replace it:

exports["qb-policejob"]:IsHandcuffed() -> exports["brutal_policejob"]:IsHandcuffed()

Navigate to qb-core/shared/job.lua and set the defaultDuty to false:


If you don't use our Ambulance Job

Navigate to qb-ambulancejob/client/laststand.lua and add this event to the right position.

TriggerEvent('brutal_policejob:client:PlayerDied')

Navigate to qb-ambulancejob/client/main.lua and replace it:

exports["qb-policejob"]:IsHandcuffed() -> exports["brutal_policejob"]:IsHandcuffed()


Remove the basic Police Job from your server

If you have the esx_policejob, qb-policejob, or any other similar basic job like these, you don't need them anymore, so you can easily remove them from your server files!

If you got any error

If you followed the installational guide and the script still don't work or you get any errors the please check the common errors, here in the docs and in our discord server, for more informations.

PreviousAccessible filesNextexports / triggers

Last updated 3 months ago

Was this helpful?

49KB
loaf_spikestrips-1.1.2.zip
archive
83KB
mhacking.zip
archive
30KB
paycheck.lua
paycheck.lua
sv-utils.lua
client-core.lua
job.lua
laststand.lua
Page cover image