qbcore-framework / qb-policejob Goto Github PK
View Code? Open in Web Editor NEWPolice Job & Evidence System For QB-Core :police_officer: :policewoman:
License: GNU General Public License v3.0
Police Job & Evidence System For QB-Core :police_officer: :policewoman:
License: GNU General Public License v3.0
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:
Expected behavior
You should be off duty when joining back, especially after setting defaultduty = false.
Screenshots
n/a
Questions (please complete the following information):
qb-
to something custom?: noAdditional context
n/a
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)```
I have just download this and there is no SQL
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)
Hello, there is an error in the proof box, creating many items in the same series!
Video error: https://streamable.com/y1367x
Thanks
test
qb-policealerts resource is missing
Make police vehicles purchasable
Make police vehicles storable in normal garages.
So how to do I make permissions for this?
carpark wont let you store car
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
Since the newest update whenever I go off-duty I am not able to go back on duty. The text disappears.
When reloading your weapon whatever ammo is loaded in REMOVES if you put your gun away and pull it out again
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:
Expected behavior
An accurate waypoint to be placed for /911p call location
Questions (please complete the following information):
qb-
to something custom? NoAdditional context
I have tried this with several players in several locations and have had the same result
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
I apologize if it does not correspond, but I think this part is duplicated
server/main.lua
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)
["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
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
Hello, I recently updated my files from yours.
Now I have a constant CCTV overlay bug that I cannot remove.
picture:
<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
when police goes far away gps blip is disappearing
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
Tengri,
OGN TEAM.
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.
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.
Describe the bug
As a Police officer, you are unable to remove placedspike stips
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Unable to pick back up
Questions (please complete the following information):
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.
Police and Ambulance Emergency button not working
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.
Describe the bug
After updating the police job script I have this error in server console
To Reproduce
Steps to reproduce the behaviour:
[ 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):
qb-
to something custom? Noscript error scripting/lua/scheduler..lua.968 no such export setfuel in resource legancyfuel
If you put in /jail ID TIME it only gives a notification, and not send the person to jail
Describe the bug
handcuffs item won't work when i use them
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
How do I go on duty? Where can I make myself have perms to go on duty?
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.
black screen when you buy a boat constant loading
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
the police shots fire alearts not working
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)
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.
does any one have the wf_alerts that works with the qb-policejob?
I might be overlooking something in another resource, but I can't seem to find anything in the policejob relating to writing players tickets.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.