mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Merge branch 'master' of https://github.com/FXServer-ESX/fxserver-esx_policejob
This commit is contained in:
@@ -9,6 +9,9 @@ FXServer ESX Police Job
|
||||
* Player management (boss actions and armory with buyable weapons)
|
||||
* esx_society => https://github.com/FXServer-ESX/fxserver-esx_society
|
||||
* esx_datastore => https://github.com/FXServer-ESX/fxserver-esx_datastore
|
||||
|
||||
* ESX Identity Support
|
||||
* esx_identity => https://github.com/ArkSeyonet/fxserver-esx_identity
|
||||
|
||||
[INSTALLATION]
|
||||
|
||||
|
||||
+9
-7
@@ -3,20 +3,22 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
description 'ESX Police Job'
|
||||
|
||||
server_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'@es_extended/locale.lua',
|
||||
'locales/br.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/es.lua',
|
||||
'@mysql-async/lib/MySQL.lua',
|
||||
'config.lua',
|
||||
'server/main.lua'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
client_scripts
|
||||
'@es_extended/locale.lua',
|
||||
'locales/br.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/es.lua',
|
||||
'config.lua',
|
||||
'client/main.lua'
|
||||
}
|
||||
|
||||
+1
-1
@@ -668,7 +668,7 @@ end
|
||||
|
||||
function OpenIdentityCardMenu(player)
|
||||
|
||||
if Config.EnableGCIdentity then
|
||||
if Config.EnableESXIdentity then
|
||||
|
||||
ESX.TriggerServerCallback('esx_policejob:getOtherPlayerData', function(data)
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Config.MarkerSize = {x = 1.5, y = 1.5, z = 1.0}
|
||||
Config.MarkerColor = {r = 50, g = 50, b = 204}
|
||||
Config.EnablePlayerManagement = false
|
||||
Config.EnableArmoryManagement = false
|
||||
Config.EnableGCIdentity = false
|
||||
Config.EnableESXIdentity = false -- only turn this on if you are using esx_identity
|
||||
Config.EnableNonFreemodePeds = false -- turn this on if you want custom peds
|
||||
Config.EnableSocietyOwnedVehicles = false
|
||||
Config.EnableLicenses = false
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ Locales['en'] = {
|
||||
['handcuff'] = 'cuff / Uncuff',
|
||||
['drag'] = 'drag',
|
||||
['put_in_vehicle'] = 'put in Vehicle',
|
||||
['out_the_vehicle'] = 'take ou of vehicle',
|
||||
['out_the_vehicle'] = 'take out of vehicle',
|
||||
['fine'] = 'fine',
|
||||
['no_players_nearby'] = 'no players nearby',
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Config.MarkerSize = {x = 1.5, y = 1.5, z = 1.0}
|
||||
Config.MarkerColor = {r = 50, g = 50, b = 204}
|
||||
Config.EnablePlayerManagement = false
|
||||
Config.EnableArmoryManagement = false
|
||||
Config.EnableGCIdentity = false
|
||||
Config.EnableESXIdentity = false -- only turn this on if you are using esx_identity
|
||||
Config.EnableNonFreemodePeds = false -- turn this on if you want custom peds
|
||||
Config.EnableSocietyOwnedVehicles = false
|
||||
Config.MaxInService = -1
|
||||
@@ -79,4 +79,4 @@ Config.PoliceStations = {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Config.MarkerSize = {x = 1.5, y = 1.5, z = 1.0}
|
||||
Config.MarkerColor = {r = 50, g = 50, b = 204}
|
||||
Config.EnablePlayerManagement = false
|
||||
Config.EnableArmoryManagement = false
|
||||
Config.EnableGCIdentity = false
|
||||
Config.EnableESXIdentity = false -- only turn this on if you are using esx_identity
|
||||
Config.EnableNonFreemodePeds = false -- turn this on if you want custom peds
|
||||
Config.EnableSocietyOwnedVehicles = false
|
||||
Config.MaxInService = -1
|
||||
|
||||
@@ -15,10 +15,10 @@ INSERT INTO `jobs` (name, label) VALUES
|
||||
;
|
||||
|
||||
INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
|
||||
('police',0,'recruit','Recrue',20,'{\"tshirt_1\":57,\"torso_1\":55,\"arms\":0,\"pants_1\":35,\"glasses\":0,\"decals_2\":0,\"hair_color_2\":0,\"helmet_2\":0,\"hair_color_1\":5,\"face\":19,\"glasses_2\":1,\"torso_2\":0,\"shoes\":24,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"pants_2\":0,\"hair_2\":0,\"decals_1\":0,\"tshirt_2\":0,\"helmet_1\":8}','{\"tshirt_1\":34,\"torso_1\":48,\"shoes\":24,\"pants_1\":34,\"torso_2\":0,\"decals_2\":0,\"hair_color_2\":0,\"glasses\":0,\"helmet_2\":0,\"hair_2\":3,\"face\":21,\"decals_1\":0,\"glasses_2\":1,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"pants_2\":0,\"arms\":14,\"hair_color_1\":10,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',1,'sergeant','Sergent',40,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":0,\"decals_1\":8,\"torso_2\":0,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"hair_color_1\":5,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":14,\"pants_1\":34,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"shoes\":24,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"face\":21,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"hair_color_1\":10,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',0,'recruit','Recruit',20,'{\"tshirt_1\":57,\"torso_1\":55,\"arms\":0,\"pants_1\":35,\"glasses\":0,\"decals_2\":0,\"hair_color_2\":0,\"helmet_2\":0,\"hair_color_1\":5,\"face\":19,\"glasses_2\":1,\"torso_2\":0,\"shoes\":24,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"pants_2\":0,\"hair_2\":0,\"decals_1\":0,\"tshirt_2\":0,\"helmet_1\":8}','{\"tshirt_1\":34,\"torso_1\":48,\"shoes\":24,\"pants_1\":34,\"torso_2\":0,\"decals_2\":0,\"hair_color_2\":0,\"glasses\":0,\"helmet_2\":0,\"hair_2\":3,\"face\":21,\"decals_1\":0,\"glasses_2\":1,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"pants_2\":0,\"arms\":14,\"hair_color_1\":10,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',1,'sergeant','Sergeant',40,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":0,\"decals_1\":8,\"torso_2\":0,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"hair_color_1\":5,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":14,\"pants_1\":34,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"shoes\":24,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"face\":21,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"hair_color_1\":10,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',2,'lieutenant','Lieutenant',65,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":2,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"glasses\":0,\"decals_1\":8,\"hair_color_1\":5,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"torso_2\":0,\"arms\":41,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":44,\"pants_1\":34,\"hair_2\":3,\"decals_2\":2,\"hair_color_2\":0,\"hair_color_1\":10,\"helmet_2\":0,\"face\":21,\"shoes\":24,\"torso_2\":0,\"glasses_2\":1,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"pants_2\":0,\"decals_1\":7,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',3,'boss','Commandant',80,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":3,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":41,\"torso_2\":0,\"hair_color_1\":5,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"decals_1\":8,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":44,\"pants_1\":34,\"pants_2\":0,\"decals_2\":3,\"hair_color_2\":0,\"face\":21,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"hair_color_1\":10,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"shoes\":24,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}')
|
||||
('police',3,'boss','Chief',80,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":3,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":41,\"torso_2\":0,\"hair_color_1\":5,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"decals_1\":8,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":44,\"pants_1\":34,\"pants_2\":0,\"decals_2\":3,\"hair_color_2\":0,\"face\":21,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"hair_color_1\":10,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"shoes\":24,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}')
|
||||
;
|
||||
|
||||
CREATE TABLE `fine_types` (
|
||||
@@ -84,4 +84,4 @@ INSERT INTO `fine_types` (label, amount, category) VALUES
|
||||
('Murder of an LEO', 30000, 3),
|
||||
('Involuntary manslaughter', 1800, 3),
|
||||
('Fraud', 2000, 2);
|
||||
;
|
||||
;
|
||||
|
||||
+6
-6
@@ -121,13 +121,13 @@ end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_policejob:getOtherPlayerData', function(source, cb, target)
|
||||
|
||||
if Config.EnableGCIdentity then
|
||||
if Config.EnableESXIdentity then
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
|
||||
local identifier = GetPlayerIdentifiers(target)[1]
|
||||
|
||||
local result = MySQL.Sync.fetchAll("SELECT firstname, lastname, sex, dateofbirth, height FROM users WHERE identifier = @identifier", {
|
||||
local result = MySQL.Sync.fetchAll("SELECT * FROM characters WHERE identifier = @identifier", {
|
||||
['@identifier'] = identifier
|
||||
})
|
||||
|
||||
@@ -135,10 +135,10 @@ ESX.RegisterServerCallback('esx_policejob:getOtherPlayerData', function(source,
|
||||
local firstname = user['firstname']
|
||||
local lastname = user['lastname']
|
||||
local sex = user['sex']
|
||||
local dob = tostring(user['dateofbirth'])
|
||||
local dob = user['dateofbirth']
|
||||
local heightInit = user['height']
|
||||
local heightFeet = tonumber(string.format("%.0f",heightInit / 12, 0))
|
||||
local heightInches = heightInit % 12
|
||||
local heightInches = tonumber(string.format("%.0f",heightInit % 12, 0))
|
||||
local height = heightFeet .. "\' " .. heightInches .. "\""
|
||||
|
||||
local data = {
|
||||
@@ -219,7 +219,7 @@ end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_policejob:getVehicleInfos', function(source, cb, plate)
|
||||
|
||||
if Config.EnableGCIdentity then
|
||||
if Config.EnableESXIdentity then
|
||||
|
||||
MySQL.Async.fetchAll(
|
||||
'SELECT * FROM owned_vehicles',
|
||||
@@ -242,7 +242,7 @@ ESX.RegisterServerCallback('esx_policejob:getVehicleInfos', function(source, cb,
|
||||
if foundIdentifier ~= nil then
|
||||
|
||||
MySQL.Async.fetchAll(
|
||||
'SELECT * FROM users WHERE identifier = @identifier',
|
||||
'SELECT * FROM characters WHERE identifier = @identifier',
|
||||
{
|
||||
['@identifier'] = foundIdentifier
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user