[Release] jsfour-criminalrecord [ESX]

Daim realistic!

me too

No you shouldn’t post that here… Go make an issue on the GitHub repo.

Is there a way to add another interaction circle

Of course there are. Just modify the config and the client

Nothing happens when i press ADD. (
Yes, I filled all the fields)

adding more positions… do you just add another

Pos   = {x = numbers, y = numbers, z = numbers},

line? or do i have to change more?

You gotta make some changes to the client.lua as well

What’s the name of the script you’re using?

jsfour-mdc

Thank you :heart:

Thank you but changed it to a keybind in order to access it anywhere, then changed the ability for civs to not add people to it but they can look at their own database.

Hello Guys,

I was trying to get this script working on the F6 menu. But I need some help. Because I can’t get it.

This is only the end part of the F6 menu in ESX_policejob
The esx_criminalrecords:open is a other script as backup. But I wan’t this one as replace.

					elseif action == 'communityservice' then
						SendToCommunityService(GetPlayerServerId(closestPlayer))
					elseif action == 'criminalrecords' then
						--TriggerEvent('esx_criminalrecords:open', GetPlayerServerId(closestPlayer))
						ESX.TriggerServerCallback('jsfour-criminalrecord:fetch', function( d )
							SetNuiFocus(true, true)
--
							SendNUIMessage({
				  				action = "open",
									array  = d
								})
		  				end, data, 'start')
					elseif action == 'unpaid_bills' then
						OpenUnpaidBillsMenu(closestPlayer)
					end

Can someone help me and maybe others to fix this?

Thanks,
Seniix3

Quick question. When it talks about last digits. What are they? Are they any numbers I choose or what?

Hi !
If someone could help to add to a menu would be nice :

In Jsfour client.lua

RegisterNetEvent('jsfour-criminalrecord:fetch')
AddEventHandler('jsfour-criminalrecord:fetch', function()
			ESX.TriggerServerCallback('jsfour-criminalrecord:fetch', function( d )
				SetNuiFocus(true, true)

				SendNUIMessage({
				  action = "open",
					array  = d
				})
		  end, data, 'start')
end)

and trigger the event in the police menu with :

		elseif action == 'criminalrecords' then
						TriggerServerEvent('jsfour-criminalrecord:fetch')

No way to get it working , nothing happens, no error messages or w/e, any help is welcome …

I would also like to know how to add locations.

Would there be a way to sync this with openCad? So when you enter the info, it also goes into the cad?

I’ve never used it so I don’t know. Probably? Since it’s most likely using a database.

Ran into a problem after a certain amount of enteries into the database the system was duplicating case ids i

[ERROR] [MySQL] [jsfour-criminalrecord] An error happens on MySQL for query “[object Object]”: ER_DUP_ENTRY: Duplicate entry ‘A-108’ for key ‘PRIMARY’

why didnt the system generate a new case id? i had to delete my entire database for it to work again

Create an issue at the github next time.

The “case id” is generated in the server.lua. It doesn’t check if the ID already exists. It generates a random number between 100-999 and a random letter, there are 10 letters it can use. There’s a really small percentage of it getting the same ID which will give you the error.

I don’t know why you would delete your entire database since it never inserted any values into it. You would just simply press the add button again and it would probably work.

I’ll update the resource some day. In the meantime you could add more letters to the letters array which will decrease the percentage of getting the same ID.