[Release-Archived] Cops FiveM

Hello @Kyominii I installed the script in my server, when I go on the cloakroom marker I click on any choice but nothing happens. I read some comments here and I added this to my server.lua file:

require "resources/essentialmode/lib/MySQL"
MySQL:open("localhost", "vrpfx", "-", "-")

With correct username and pass ofc. I restarted the script by console and I get this:

Immagine

What I do wrong? Is this script working with EssentialMode 4.6.3? Thanks.

Rename police-fxserver folder to police

1 Like

image

i am getting this now tried to change my permission level but it does nothing, also i want to keep the rank system but it seems i cant get into it.

@Kyominii When you whitelist someone in the server, once they leave or sometimes die, you must rewhitelist them.

@Gamer0304 : coprank, copadd and coprem isn’t working with essnetialmode anymore but with your rank (https://github.com/Kyominii/Cops_FiveM_dev/blob/master/police/config/config.lua#L80)

@NickModzGTA : Fixed in v1.4 (https://github.com/Kyominii/Cops_FiveM/issues/67 see the last comment)

image
image

Cleared the cache, changed the rank to 0.

i cant get it to work O_o

ok i got it now thnx

Issue about forcing player entering in a vehicle should be fixed now, can you confirm that ?

1 Like

ok so now i have the rank but when i go to the cloackroom i get this

and i cant choose anything how can i fix this

i deleted the server cache, but nothing apears there so i cant choose to be a cop.

@Dreigh : Is it working ? Because you said that the player is instant eject ^^

@Gamer0304 : Have you delete the cache and restart the server ?

yes 4 times now, nothing will make it apear

Mmmmh, have you some logs ? Server side ? Client side (F8) ?

nvm 5th time a charm it works now

Okay, so I’ll open a ticket on my repo to permit ppl to put a player in the vehicle while dragging the same player

Done, same error :confused: I get the same error using another script when I add this require line.

Mmmh, are you sure you have the latest version of police ?
You can also try the pre-1.4 : [Release] Cops FiveM

EDIT 1 : and why are you trying to add require ? require isn’t support by fxserver
EDIT 2 : Ohhhhh I get it, mysql isn’t support by fxserver at all !!! You have to use MySQL-Async if you want to use mysql on FXServer

Can someone have a look to : https://github.com/Kyominii/Cops_FiveM/issues/40
And thanks @Dreigh for all your contributions ^^

1 Like

Okok I’m setting up Async, thanks!

Hi again. It works now, thanks :smiley:
I just wanted to share with you my translation in Italian. config.lua (28.0 KB) garage.lua (1.5 KB).

Also, I have a question for you. I noticed that the garage can spawn only 3 models (police3, fbi and policeb) I have some add-on cars for the cops and I edited the code to add one of them.

local buttons = {}
buttons[#buttons+1] = {name = "Pattuglia", func = "Spawnpolice3"}
buttons[#buttons+1] = {name = "Sotto copertura", func = "Spawnfbi"}
buttons[#buttons+1] = {name = "Porsche 718 Cayman S", func = "Spawnpolicepor"}
buttons[#buttons+1] = {name = "Moto", func = "Spawnpoliceb"}

function Spawnpolice3()
	SpawnerVeh("police3")
	CloseMenu()
end

function Spawnfbi()
	SpawnerVeh("fbi")
	CloseMenu()
end

function Spawnpolicepor()
	SpawnerVeh("pol718")
	CloseMenu()
end

function Spawnpoliceb()
	SpawnerVeh("policeb")
	CloseMenu()
end

It works, but I ask to you if you can set the script to get the police.garage list or we have to manually add every car? Thanks.