[Release-Archived] Cops FiveM

Hi,
The inventory notification does not work, yet the sql request in the console is good …

V1.2.0

@Valderg : I’ll see about that

@elstryfe : Just read previous posts

@Wry : Please provide me more precise information like console log (server and client), config and db used

Hello @Kyominii I love your work really great job. I’m just running into one issue and that is that I am unable to call the addCop function even after I put in your fix for the MySQL databases. I am running just plain sql with essential 2 and es_freeroam. When I go to call the function the server tells me that addCop is an unknown command. My police database has the identifier and rank columns but it doesn’t even seem to be calling it in the first place. Thanks for any help.
Edit:
Wow sorry I am dumb the command is copadd not addcop. :frowning:

Just incase you need it, im using Simple Banking2.0 and this is their bankBalance return function.

function bankBalance(player)
  local executed_query = MySQL:executeQuery("SELECT * FROM users WHERE identifier = '@name'", {['@name'] = player})
  local result = MySQL:getResults(executed_query, {'bankbalance'}, "identifier")
  return tonumber(result[1].bankbalance)
end

Also having issues with the police database being created in CouchDB but it being completely empty. Anyone else encounter this issue and found a fix?

Same as me last night, in config.lua do you have it set to useCopWhitelist = true
If you do then in game if you’re the only one on the server type /copadd 1 or whatever your number is on the scoreboard, presuming you’re admin aswell.

How would I need to be admin, through CouchDB? or just an admin on the server? Im set on the server as Owner and permission level 6. I am also admin on CouchDB.

Okay i have found a issue when a white-listed cop is off-duty i cannot cuff or do anything with him is there any fix to this bug it would be nice!

Is anyone having an issue with the emergency resource? When a user presses E it says it has called for a medic, but it doesn’t… I also have read that you need to disable scripthook which I have and it’s still not working. Do I need vdk_call for this to work ???

the checking plate and checking inventory doesnt work. need help please

@Jeb32 : If you are admin in your server, just use copadd and coprem commands

@Jake.ryan : I’m not sure that i understand what you mean, you can’t cuff someone when you’re not in duty, that’s it ? Because it’s normal :slight_smile:

@Don : It is Cops_FiveM thread here, not emergency thread. Please post in correct thread

@roboticgamer : [quote=“Kyominii, post:1, topic:17460”]

This script works on few server, so if it doesn’t work, please make an effort before posting your issue.
I won’t provide support for people asking help without minimal details (logs are appreciated)
[/quote]

I’ve already done so. Since you incorporated the script in your package I’d assume that you have it working and could possibly point me in the right direction. There are no error logs in console, unless there is another place I am missing…

I have enough work with Cops_FiveM support ^^’
And I’m not including emergency in any package, Cops_FiveM support features based on it (with a simple modification).

Ask to the author in his thread

I am having a weird issue now where no one can start police duty. I have tried with the white list on and off but no matter what the cloakroom of the vespuchi police station is empty. I have added myself to the police database and have the recrue rank. I am still using simple sql and all administration commands work (copadd coprem). It’s just that no one can go on duty. Thanks.

If it’s empty, it can be caused by 2 reasons

  1. you’re not whitelist as cop
  2. the script crash at startup and then you have errors (so send theses errors)

I had the problem that “police:checkIsCop” was not greenlit for invocation. Not sure why though, it looked fine to me.

So I know I am a cop. Used addcop my id and it successfully updated my police table with identifier = steam:11098653ac and set to default rank of recrue. I also tried running it with the whitelist turned off and it was still empty. I think I may have some other resource (es_free roam or something) that is blocking the police scripts from even running. When I start my server all resources load with no errors I’ll upload a picture of server starting soon.

@Sojobo : Because you probably didn’t enable copWhitelist

@CaptainTenneal : Ok so I’ll wait for the screen

@Kyominii thanks you for this upgrade :wink:

I am just wondering if Can we get some way to have a Police counter in service?

cheers

What do you mean by police counter ? Are you talking about swat ? because it is already available