I would love to install this, excpet i dont know how to, any help or a walk through on team viewer?
Is there any way to change officer skin? I uploaded custom skin to the server, and Iâm not sure how to add that for police officers
essentialmode.addon_inventory doesn t exist
When I select my uniform in the cloakroom, I canât edit my pedâs face/skintone. Not sure if Iâm not doing something right or if itâs just not an available option yet.
I seem to be having an issue where the locality wont change despite me settting âconfig.locale = âfrâ to config.locale = 'enâ
I have changed that line in all of the preceding scripts as well (es_extended, esx_society, etcâŠ)
the main issue im having is that I modified the authorized vehicles list in config.lua but when i approach the garage point, i get french localizations for base vehicles instead of the english localizations for my custom vehicles. any thoughts?
on config.lua:
AuthorizedVehicles = {
{ name = 'police', label = 'VĂ©hicule de patrouille 1' },
{ name = 'police2', label = 'VĂ©hicule de patrouille 2' },
{ name = 'police3', label = 'VĂ©hicule de patrouille 3' },
{ name = 'police4', label = 'VĂ©hicule civil' },
{ name = 'policeb', label = 'Moto' },
{ name = 'policet', label = 'Van de transport' },
},
on client/ main.lua:
table.insert(elements, { label = 'VĂ©lo', value = 'fixter' })
table.insert(elements, { label = 'Cruiser', value = 'police' })
table.insert(elements, { label = 'Sheriff Cruiser', value = 'sheriff' })
if PlayerData.job.grade_name == 'officer' then
table.insert(elements, { label = 'Interceptor', value = 'police3'})
end
if PlayerData.job.grade_name == 'sergeant' then
table.insert(elements, { label = 'Sheriff SUV', value = 'sheriff2'})
table.insert(elements, { label = 'Interceptor', value = 'police3'})
table.insert(elements, { label = 'Buffalo', value = 'police2'})
table.insert(elements, { label = 'Moto', value = 'policeb'})
table.insert(elements, { label = 'Bus pénitentiaire', value = 'pbus'})
table.insert(elements, { label = 'Bus de transport', value = 'policet'})
table.insert(elements, { label = 'Antiémeute', value = 'riot'})
end
if PlayerData.job.grade_name == 'lieutenant' then
table.insert(elements, { label = 'Sheriff SUV', value = 'sheriff2'})
table.insert(elements, { label = 'Interceptor', value = 'police3'})
table.insert(elements, { label = 'Buffalo', value = 'police2'})
table.insert(elements, { label = 'Moto', value = 'policeb'})
table.insert(elements, { label = 'Bus pénitentiaire', value = 'pbus'})
table.insert(elements, { label = 'Bus de transport', value = 'policet'})
table.insert(elements, { label = 'Antiémeute', value = 'riot'})
table.insert(elements, { label = 'FBI', value = 'fbi'})
table.insert(elements, { label = 'FBI SUV', value = 'fbi2'})
end
if PlayerData.job.grade_name == 'boss' then
table.insert(elements, { label = 'Sheriff SUV', value = 'sheriff2'})
table.insert(elements, { label = 'Interceptor', value = 'police3'})
table.insert(elements, { label = 'Buffalo', value = 'police2'})
table.insert(elements, { label = 'Moto', value = 'policeb'})
table.insert(elements, { label = 'Bus pénitentiaire', value = 'pbus'})
table.insert(elements, { label = 'Bus de transport', value = 'policet'})
table.insert(elements, { label = 'Antiémeute', value = 'riot'})
table.insert(elements, { label = 'FBI', value = 'fbi'})
table.insert(elements, { label = 'FBI SUV', value = 'fbi2'})
table.insert(elements, { label = 'Voiture Banalisée ', value = 'police4'})
end
on locales/en.lua:
-- Authorized Vehicles
['police'] = 'patrol Vehicle 1',
['police2'] = 'patrol Vehicle 2',
['police3'] = 'patrol Vehicle 3',
['police4'] = 'unmarked Vehicle',
['policeb'] = 'motorcycle',
['policet'] = 'transport Van',
You can just replace the original config.lua(which is in french) to englishconfig(en.lua). you can find english config in localization/en_config. Then change main.lua labels.
Is there a way to add the impound command from the tow truck menu to the cop menu? this way if no tow truck drivers are on the police can impound
Hi there
I was wondering if I could get a line of code, that would allow me to restrict a specific job grade from issuing fines. Iâm not the best scripter, but I understand that I could perhaps nest an if statement I could make it work but Iâm unsure how.
Thanks,
Ethan
How can i set maxseats to 2 or 3?
Now i can put only 1 guy in a car
RegisterNetEvent('esx_policejob:putInVehicle')
AddEventHandler('esx_policejob:putInVehicle', function()
local playerPed = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then
local vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 5.0, 0, 71)
if DoesEntityExist(vehicle) then
local maxSeats = GetVehicleMaxNumberOfPassengers(vehicle)
local freeSeat = nil
for i=maxSeats - 1, 0, -1 do
if IsVehicleSeatFree(vehicle, i) then
freeSeat = i
break
end
end
if freeSeat ~= nil then
TaskWarpPedIntoVehicle(playerPed, vehicle, freeSeat)
end
end
end
end)
You canât⊠If you tried to increase the âmaxSeatsâ you couldnât put the player in the car because, the seat youâre trying to put the player into doesnât exist.
For example, on a bike thereâs only two seats (driver and passenger) if you tried to put another player onto the âthirdâ seat, it wouldnât work because it doesnât exist.
But i cant put 2 players in a police car. There is 3 slots free i can put only 1 guy.
How can i fix it?
Let me explain the code that youâve sent for you:
for i=maxSeats - 1, 0, -1 do if IsVehicleSeatFree(vehicle, i) then freeSeat = i break end end --> in this part it gets the maximum number of seats of a vehicle with âi=maxSeatsâ and then checks if there are any free seats from the maximum seat for example if you are trying on a bike as Havok said:
It has 2 maximum seats, then it checks if there is any free seat or both two seats are occupiedâŠ
So as the result you canât, change it because you are not going to just detain the players in only one specific vehicle.
if freeSeat ~= nil then TaskWarpPedIntoVehicle(playerPed, vehicle, freeSeat) end
This part says if there is even one freeSeat, detain or warp the player, as Havok says it works correctly and I think that you are making a mistakeâŠ
Good luck!
It is not workin for me at all. When i put 1 guy in car i just cant put another one. No idea what im doin wrong
How would i go about adding officer to the police job_grades?
because i see that officer is in the job_grades but isnât in the SQL
if PlayerData.job.grade_name == ârecruitâ then
table.insert(elements, {label = _U(âcadet_wearâ), value = âcadet_wearâ})
end
if PlayerData.job.grade_name == âofficerâ then
table.insert(elements, {label = _U(âpolice_wearâ), value = âpolice_wearâ})
end
if PlayerData.job.grade_name == âsergeantâ then
table.insert(elements, {label = _U(âsergeant_wearâ), value = âsergeant_wearâ})
end
in main.lua step1:
if data.current.value == 'police_wear' then
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin.sex == 0 then
SetPedComponentVariation(GetPlayerPed(-1), 3, 30, 0, 0)--Gants
SetPedComponentVariation(GetPlayerPed(-1), 4, 35, 0, 0)--Jean
SetPedComponentVariation(GetPlayerPed(-1), 6, 24, 0, 0)--Chaussure
SetPedComponentVariation(GetPlayerPed(-1), 8, 58, 0, 0)--mattraque
SetPedComponentVariation(GetPlayerPed(-1), 11, 55, 0, 0)--Veste
SetPedComponentVariation(GetPlayerPed(-1), 10, 8, 0, 0)--Grade
SetPedComponentVariation(GetPlayerPed(-1), 5, 0, 0, 2) --Bag
SetPedPropIndex(GetPlayerPed(-1), 2, 2, 0, 1)--Oreillete
SetPedPropIndex(GetPlayerPed(-1), 6, 3, 0, 1)--Montre
ClearPedProp(GetPlayerPed(-1), 0) -- Helmet
else
TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female)
end
end)
end
step 2
if PlayerData.job.grade_name == 'officer' then
table.insert(elements, {label = _U('police_wear'), value = 'police_wear'})
table.insert(elements, {label = _U('cop_wear'), value = 'cop_wear_freemode'})
table.insert(elements, {label = _U('sheriff_wear'), value = 'sheriff_wear_freemode'})
table.insert(elements, {label = _U('ranger_wear'), value = 'ranger_wear_freemode'})
table.insert(elements, {label = _U('highway_wear'), value = 'highway_wear_freemode'})
table.insert(elements, {label = _U('swat_wear'), value = 'swat_wear_freemode'})
end
+step 3 en.lua:
['police_wear'] = 'Officer Outfit',
Just delete all the peds and keep police_wear in main.lua if you dont use peds on server. if you want to use peds,
go to config and enable Config.EnableNonFreemodePeds = true
Getting this error when loading up the server
Error parsing script config.lua in resource esx_policejob: config.lua:1: unexpec
ted symbol near â<\239>â
Failed to load script config.lua.
Error loading script server/main.lua in resource esx_policejob: server/main.lua:
5: attempt to index a nil value (global âConfigâ)
stack traceback:
server/main.lua:5: in main chunk
Failed to load script server/main.lua.
Need help with this ASAP
Thanks,
Liam
I could use some direction on how to go about getting the Uniform Menu to work properly. Iâm referring to the marker at the Sandy Shores HQ where you can choose from a list of PEDS . PED doesnât load (Iâm assuming it has to be setup first) and the console shows a response from server.
Thanks Up Time, Iâm grabbing that now and cross my fingers.
- Perry
Be sure to grab the requirements of esx_skin also. That should work for you. Let me know