Thanks I did edit both files. But if I write in /copadd ID it tells me an error
I keep recieving this error when i try to import the police.sql
Error
SQL query:
CREATE TABLE police
(
identifier
varchar(255) NOT NULL,
rank
varchar(255) NOT NULL DEFAULT ‘Recrue’
) ENGINE=InnoDB DEFAULT CHARSET=utf8
MySQL said: Documentation
#1046 - No database selected
@ClintBeastwood : I don’t think so, I’m working with mysql-async and not many scripts are using couchdb so you have to make cops compatible with couchdb scripts by your own
@breaup : I never think about rcon commands, nice idea ^^. At the moment, you have to use the command on your chat
@tmopower : Which error ?
@Kaskamp : It’s saying : No database selected, so you have to select a database before execute the sql file
@Kyominii omg. thank you for the speedy response. My friends and i are just setting up our server and trying to get it in working condition <3
5598140] Connecting: Walter White
[ 5600078] Sending heartbeat to live-internal.fivem.net:30110
[ 5647015] Error running system event handling function for resource police: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: server/server.lua:47: attempt to index a nil value (global 'MySQL')
[ 5647047] stack traceback:
[ 5647078] server/server.lua:47: in function 'checkIsCop'
[ 5647093] server/server.lua:83: in upvalue 'handler'
[ 5647109] citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
[ 5647140] stack traceback:
[ 5647156] [C]: in function 'error'
[ 5647187] citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
[ 5647203] citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
[ 5647218] hitch warning: frame time of 242 milliseconds
[ 5668672] Error running call reference function for resource police: server/server.lua:14: attempt to index a nil value (global 'MySQL')
[ 5668687] stack traceback:
[ 5668703] server/server.lua:14: in function 'addCop'
[ 5668734] server/server.lua:239: in local 'ref'
[ 5668750] citizen:/scripting/lua/scheduler.lua:277: in function <citizen:/scripting/lua/scheduler.lua:268>
[ 5668797] 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
[ 5668812] stack traceback:
[ 5668828] [C]: in function 'error'
[ 5668859] citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow'
[ 5668875] citizen:/scripting/lua/MessagePack.lua:465: in field 'any'
[ 5668890] citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack'
[ 5668906] citizen:/scripting/lua/scheduler.lua:338: in field 'cmd'
[ 5668922] server/main.lua:101: in upvalue 'handler'
[ 5668953] citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
[ 5668984] stack traceback:
[ 5669000] [C]: in function 'error'
[ 5669031] citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
[ 5669047] citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
I love the new props. Have you considered spike strips as well? Another thread discussing this linked to a (non-lua) script for spike strips and I also discovered some promising code on pastebin:
If there is an answer to this question I can’t seem to find it… Is there a way to set a hotkey to go on duty as a leo without going to a station??? If you die and revive, it knocks you off duty and didn’t want to have to go back to a station every time… Thanks…
When i put the jail add-on in. I lose my markers. dose anyone know where i that setting is? thank you
Im using couchdb so I must have mysql?
ALL GOOD I got It yeahhh !
@Glimtech_Arms : you have to modify the script about hotkey, and if you are using emergency, you keep your job (if not please send a ticket on github)
@OfficerKane : Jail add-on isn’t up to date with the last Cops_FiveM version
hello i’m on the FX Server and forcing in vehicle doesn’t work
heres their error
Error running system event handling function for resource police: citizen:/scrip
ting/lua/scheduler.lua:39: Failed to execute thread: server/server.lua:221: atte
mpt to concatenate a nil value (field 'force_player_get_in_vehicle_part_2')
stack traceback:
server/server.lua:221: in upvalue 'handler'
citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scriptin
g/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:/scriptin
g/lua/scheduler.lua:92>
@Glimtech_Arms : When I said send a ticket, I mean send a ticket if you are using emergency AND not keeping your job ^^
@Matthew_stegink : This issue has been fixed : https://github.com/Kyominii/Cops_FiveM/commit/77860107c1189cbde2704800f1493202de8ddecc
Using this with es_rp will cause problems correct? Some way to deactivate only es_rp’s police and use this instead? So I’ve seen it seem to have more options
I don’t know how es_rp is working. I think you should ask the creator of es_rp if you want more informations about that ^^
Thanks, trying to start something in the GTA V RP, trying to understand how everything works to build a server ^^
Use IsControlJustPressed to create your hotkey and execute one of these functions : https://github.com/Kyominii/Cops_FiveM/blob/master/police-fxserver/client/cloackroom.lua#L13 (clockIn_Uniformed, clockIn_Undercover or clockIn_SWAT) to clock in
If you want to create a clockout hotkey, use clockOut function
And for die/revive, here is the death event : https://github.com/Kyominii/Cops_FiveM/blob/master/police-fxserver/client/client.lua#L595
So you can remove or modify it
Thanks for the response and sorry about the mix up. As the last time I coded was back on a Commodore 64, I must be missing the proper placement for the “IsControlJustPressed” command for the hotkey to work. Good news tho I did modify the death part so now I don’t have to return to a station and go on duty after I revive. If and only if you have time to enlighten me as to the placement of that command, great. If not that’s kewl as well and thanks for the help…