Cops_FiveM is a resource mainly for RP servers. It gives servers a cops system with loadouts, vehicles, fines, …
You can find a complete overview with all the features here.
If you are using a database then you need to setup ghmattimysql before you can start using Cops_FiveM.
Are you using ZAP-Hosting and don’t know what your database name/username/password is then watch this video.
Add start police in server.cfg (make sure you start this resource after all dependencies).
The first time when you enter the game you will need to add yourself to the police database.
you can do this in your server console enter CopAddAdmin 1 or CopAdd 1 press enter and you should receive a confirmation message.
Commands
You can use these commands with RCON (CopAdd / CopAddAdmin / CopDept/ CopRem / CopRank).
To see how to use them, just type the command you want without any parameter.
Departments
ID
Name
0
Park Rangers
1
Los Santos Police Department
2
Sheriff’s Department
3
State Highway Patrol
4
Prison Department
Ranks
ID
Name
0
Trainee
1
Trooper
2
Master Police Officer
3
Sergeant
4
Lieutenant
5
Captain
6
Chief of Police
7
Admin Police Rank
Contribute
If you are a developer and would like to contribute any help is welcome!.
The contribution guide can be found here.
Thanks Kyo. i just dunno where to put the line you wrote. Creating the Column in the table it’s Ok. But I don’t realy understand this :
Step 2 :
add "i1.limitation AS raw_lim, i2.limitation AS treat_lim" in SQL request and add "'raw_lim', 'treat_lim'" in getResults (server.lua in vdk_recolt : jobs:getJobs event handler)
AddEventHandler("jobs:getJobs", function ()
jobs = {}
if(not result) then
local executed_query = MySQL:executeQuery("SELECT price, i1.`id` AS raw_id, i1.`libelle` AS raw_item, i2.`id` AS treat_id, i2.`libelle` AS treat_item, p1.x AS fx, p1.y AS fy, p1.z AS fz, p2.x AS tx, p2.y AS ty, p2.z AS tz, p3.x AS sx, p3.y AS sy, p3.z AS sz, job_id, i1.limitation AS raw_lim, i2.limitation AS treat_lim FROM recolt LEFT JOIN items i1 ON recolt.`raw_id`=i1.id LEFT JOIN items i2 ON recolt.`treated_id`=i2.id LEFT JOIN coordinates p1 ON recolt.`field_id`=p1.id LEFT JOIN coordinates p2 ON recolt.`treatment_id`=p2.id LEFT JOIN coordinates p3 ON recolt.`seller_id`=p3.id")
result = MySQL:getResults(executed_query, { 'price', 'raw_id', 'raw_item', 'treat_id', 'treat_item', 'fx', 'fy', 'fz', 'tx', 'ty', 'tz', 'sx', 'sy', 'sz', 'job_id', 'raw_lim', 'treat_lim' })
if (result) then
jobs = result
end
else
jobs = result
end
TriggerClientEvent("cli:getJobs", source, jobs)
end)
In modification #2 there is no instruction, are we supposed to write your code inside the end of the function like this ?
function setBlip(x, y, z, num)
local blip = AddBlipForCoord(x, y, z)
SetBlipSprite(blip, tonumber(num))
SetBlipAsShortRange(blip, true)
table.insert(BLIPS, blip)
local name = ""
if(tonumber(num) == 17) then
name = "Recolt"
else
if(tonumber(num) == 18) then
name = "Treatment"
else
name = "Sell"
end
end
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(name)
EndTextCommandSetBlipName(blip)
end