[Release-Archived] Cops FiveM

Lunga, do it via IceCon…

Open your chat, not your client console.
You can also use CopAdd with IceCon (or your server console)

I have now looked into this icecon, and saw this:
https://wiki.fivem.net/wiki/IceCon

but this line ($ icecon -c “restart resource” localhost: 30120 lovely) I do not know where to put it.
I put it on server.cfg?
If that is where I put it?

The RCON password I’ve already put in the correct line!

you dont need to put it anywhere… just download icecon, make a shortcut for it, in the shortcut path you need to add your server and your password… then start the icecon via the shortcut and it auto logs in. for mine is like that “C:\Users\xxx\Downloads\icecon_windows_amd64.exe -g 127.0.0.1:30120 password” so you need to add -g your ip:port and the rcon password…
you can change the password in the server cfg and make shure its not commented with a hashtag #

have a new problem… clean install and now that

InvokeNative: execution failed: type must be object, but is array
Error loading script server/server.lua in resource police: Execution of native 000000008e8cc653 in script host failed.
stack traceback:
[C]: in upvalue ‘_in’
citizen:/scripting/lua/natives_server.lua:190: in function ‘PerformHttpRequestInternal’
citizen:/scripting/lua/scheduler.lua:233: in function ‘PerformHttpRequest’
server/server.lua:10: in main chunk
Failed to load script server/server.lua.
Started resource police

Nice script mate, very good stuff, everything working like a charm. Only thing it doesnt work are blips for cops, do you maybe know what is the problem ? I dont have any errors in console, but nobody can see blips on the map… Thanks anyways, script is awesome !

@Kyominii having this weird issue where inside the sandy shores police station the blue ring flickers and when I stand it in hitting E sometimes doesn’t work and I have to hit it several times; plus once in the menu half my inputs are ignored and once again I have to press keys several times for them to work. Not sure if this is due to another resource or what. Are you able to replicate it? Been having this problem since I last played FiveM back in November. It seems that as the blue circle flickers, my control inputs only get accepted during frames during which the circle is visible.

thats above yout pay grade! can some one help?

1 Like

Sorry for delay :frowning:
I remember you can join the Cops Discord for assistance

@maj0r1337 : it’s not a fatal error, don’t worry (it’s related to the version checker)

@nax0r : you can open a ticket on github for that I think

@Drift_91 : I see what you mean, you can decrease the value of the thread loop here : https://github.com/FiveM-Scripts/Cops_FiveM/blob/master/police/client/client.lua#L575
Cops needs some optimization on this side but for the most of cops’ users, it’s not a problem. So I think you have a performance issue with your server you should fix :slight_smile:

@Jhonyquest : Make sure you are registered as a cop in the whitelist embedded system (refer to commands)

Getting this error?

" Error running system event handling function for resource police: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/server.lua:15: attempt to index a nil value (local ‘decode_text’)
stack traceback:
server/server.lua:15: in local ‘userCallback’
citizen:/scripting/lua/scheduler.lua:274: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138 "

Streetcorps - Today at 1:22 AM
seems like a error regarding the version check
you can “ignore” that error
Probably its because you placed the resource in another folder, or changed something in the config or server file
or there is an issue with the api
@bpn35

1 Like

Thanks, that fixed the flickering and menu inputs. How would I go about finding the source of such a performance issue? I don’t see any excessive CPU usage on the server or anything so I’m guessing it’s client side script issue?

Yes, it’s client-side. It can be too much thread / too many trigger event at the same time I guess (I’m not sure as I not a FiveM developper).
I don’t know any profiler for FiveM so I don’t know, you have to check your scripts to detect which one is using too much ressources

I have a problem with the script, to display the menu must press 3 or 4 times the key before you can perform the action (open the menu and launch actions)

Good evening, my script is not creating the tables in my database, what could it be? * I added the start police on server.cfg

thats above yout pay grade i keep getting this

@h0ldhaven :

@To_siq1 : Please check you have mysql-async installed

@JakeODon : Make sure you are in the police whitelist (refer to RCON command in the OP)

how do i get into the police whitelist whats the command

You can find them in the README file …

how do i know if I’m in police whitelist?