[Release] [ESX] [Police Job]


#1

Posted on behalf of @GiZz, the developer of ESX (ES Extended).

[Requirements]:

MySQL
EssentialMode Base by @Kanersps: [Release] EssentialMode base
ES Extended (ESX) by @GiZz: https://github.com/FXServer-ESX/fxserver-es_extended

Auto Mode:
esx_billing: https://github.com/FXServer-ESX/fxserver-esx_billing

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

[Features]:

-Allows users to play a the police on your server
-Dressing Room/Armory/Helicopter/Vehicle blips at the police station
-Cuff/Uncuff
-Fine players
-Put in vehicle commands
-Check IDs of players
-Searching of players
-Vehicle information
-Spawn objects such as cones, barriers, spikestrips, etc.
-French and English translations available (configurable in the config.lua file)

[Screenshots]:

SoonTM

[Installation]:

  1. Change directory to resources/[esx]/

  2. Clone the Git repository (https://github.com/FXServer-ESX/fxserver-esx_policejob)

  3. Automated (no player/armory management)
    a. Import esx_policejobminimal.sql into your MySQL database.

    Player/Armory Management
    b. Import esx_policejob_full.sql into your MYSQL database.

  4. Add this to your server.cfg “start esx_policejob”

Optional Steps:
5. Set Config.EnablePlayerManagement to true in config.lua for player management and set Config.EnableArmoryManagement to true in config.lua for armory management.

[Additional Information]
For any and all support please visit the ESX Discord: https://discord.gg/3b3N8Ut as I do not provide support and have been away from quite some time.

There are more plugins available which you can view at: https://github.com/FXServer-ESX


[ESX] esx_policejob / Police menu help
[Release][ESX] Base
Command Support (DEV WOULD BE NICE HELP)
ESX Jobs only show blips of selected job/Where do I find translation
#2

How to add cops ? in the scripts ?


Asking about menu
#3

u need to be admin ingame and u can set peoples job by doing: /setjob [ID] [job] [job_grade]. For example /setjob 1 police 0


#4

Can cops jail and drag?


#5

Not right now, maybe in future patches.


#6

Is there a whitelist or is that still not implimented yet?


#7

that is why you use /setjob I think


#8

well you can just go to job place and select a police job and I dont really want everyone running around as a cop


#9

i have this errors when i try to setjob

Player will not have the ability to save/load.
Error running call reference function for resource es_extended: server/main.lua:216: attempt to index a nil value (global 'Async')
stack traceback:
        server/main.lua:216: in local 'ref'
        citizen:/scripting/lua/scheduler.lua:277: in function <citizen:/scripting/lua/scheduler.lua:268>
        [C]: in function 'coroutine.resume'
        citizen:/scripting/lua/scheduler.lua:33: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow'
        citizen:/scripting/lua/MessagePack.lua:465: in field 'any'
        citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack'
        citizen:/scripting/lua/scheduler.lua:338: in local 'cb'
        server/player/login.lua:84: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
        [C]: in function 'coroutine.resume'
        citizen:/scripting/lua/scheduler.lua:33: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
Error running call reference function for resource es_extended: server/main.lua:216: attempt to index a nil value (global 'Async')
stack traceback:
        server/main.lua:216: in local 'ref'
        citizen:/scripting/lua/scheduler.lua:277: in function <citizen:/scripting/lua/scheduler.lua:268>
        [C]: in function 'coroutine.resume'
        citizen:/scripting/lua/scheduler.lua:33: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow'
        citizen:/scripting/lua/MessagePack.lua:465: in field 'any'
        citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack'
        citizen:/scripting/lua/scheduler.lua:338: in local 'cb'
        server/player/login.lua:84: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
        [C]: in function 'coroutine.resume'
        citizen:/scripting/lua/scheduler.lua:33: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
hitch warning: frame time of 336 milliseconds
Error resuming coroutine: server/functions.lua:138: attempt to index a nil value (global 'Async')
stack traceback:
        server/functions.lua:138: in field 'SavePlayers'
        server/functions.lua:153: in function 'saveData'
Error running call reference function for resource es_extended: server/commands.lua:15: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/commands.lua:15: in local 'ref'
        citizen:/scripting/lua/scheduler.lua:277: in function <citizen:/scripting/lua/scheduler.lua:268>
Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow'
        citizen:/scripting/lua/MessagePack.lua:465: in field 'any'
        citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack'
        citizen:/scripting/lua/scheduler.lua:338: in field 'cmd'
        server/main.lua:94: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
TriggerServerCallback => [esx_billing:getBills] does not exists
TriggerServerCallback => [esx_billing:getBills] does not exists
Sending heartbeat to live-internal.fivem.net:30110
hitch warning: frame time of 71049 milliseconds

#10

Whitelist is not implemented yet, SoonTM.


#11

can you add dragging and cuffing?


#12

Cuffing is already implemented. Dragging will be added soon. They’re working on a lot.


#13

Everything works except for the Armory. I can’t select any of the menu items.


#14

i have this error when i try to setjob command

       [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
        [C]: in upvalue '_in'
        citizen:/scripting/lua/natives_server.lua:243: in function 'TriggerEventInternal'
        (...tail calls...)
        server/player/login.lua:11: in local 'ref'
        citizen:/scripting/lua/scheduler.lua:277: in function <citizen:/scripting/lua/scheduler.lua:268>
Error running system event handling function for resource vdk_inventory-master: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: server.lua:18: attempt to index a nil value (global 'MySQL')
stack traceback:
        server.lua:18: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
Error resuming coroutine: server/functions.lua:138: attempt to index a nil value (global 'Async')
stack traceback:
        server/functions.lua:138: in field 'SavePlayers'
        server/functions.lua:153: in function 'saveData'
Error running call reference function for resource es_extended: server/commands.lua:15: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/commands.lua:15: in local 'ref'
        citizen:/scripting/lua/scheduler.lua:277: in function <citizen:/scripting/lua/scheduler.lua:268>
Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow'
        citizen:/scripting/lua/MessagePack.lua:465: in field 'any'
        citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack'
        citizen:/scripting/lua/scheduler.lua:338: in field 'cmd'
        server/main.lua:94: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
[vRP] 127.0.0.1 disconnected (user_id = 1)
Sending heartbeat to live-internal.fivem.net:30110

#15

Use the Discord for additional support please.


#16

How do I put a custom Police skin?


#17

For custom skins look up how to stream models/vehicles, it’s the same idea and you need to edit the code within the job itself.


#18

can you add other uniform for recrute commander sergent, so other players can see your grade. also if you are recrute you only may have tazer and mini gun and only one car for example. would be great if you implement this


#19

As I said above, if you want additional/custom skins, you need to look up how to stream models/vehicles and edit coding within the job itself (I believe the skin was placed under the config.lua file). The plugins ESX release are foundation plugins and are the basics in which you need to get everything online and functional. It is on you the developers/admins of servers to edit particular settings to your liking. We cannot edit the github repository for individual user needs as it’ll be way too much work and in the long run, for some users, it’ll push updates unintentionally to their servers.


#21

Make sure that you are under the police job