[Release] jsfour-criminalrecord [ESX]

try this

-- Display marker and Enter/Exit events
Citizen.CreateThread(function ()
  while true do
    Wait(0)
		if PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' and PlayerData.job.name == "police" or
		PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' and PlayerData.job.name == "jobname" or
		PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' and PlayerData.job.name == "jobname" or
		PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' and PlayerData.job.name == "jobname" or
		PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' and PlayerData.job.name == "jobname" or
		PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' and PlayerData.job.name == "jobname" or
		PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' and PlayerData.job.name == "jobname" then
			v = Config.Marker
	    if( v.Type ~= -1 and GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), v.Pos.x, v.Pos.y, v.Pos.z, true) < 50 ) then
	      DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, false, false, false)
	    end
			if( v.Type ~= -1 and GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x ) then
	      inMarker = true
				hintToDisplay(v.Hint)
			else
				inMarker = false
	    end
		end
	end
end)
2 Likes

Thank you, solved my problem. Now everything is working.

Since people can’t read I’ll say this one more time. I will turn of notifications for this post.

Create an issue at github if you need help

1 Like

It’s a nice idea but there’s lot of problems that you need to fix

  1. Why not searching the man name ONLY and use offense?
  2. Why using DOB?
  3. Line 51: Why checking every frame is marker and ispressed instead moving in to the display?
    BTW You did that none police can join too.
  4. A lot of junk code on css, and lua.
    Look like its not ready yet and you just released it.
  5. Things like eye color that only stays on db…

And I’m sure I can find more.
I recommend you to rewrite the whole script. I can help you btw.

There was 1 problem you found, thanks for pointing that out.

  1. Have no idea what you’re talking about, “man name”?
  2. It’s my script I decide what it will use. Don’ want to use it? Create your own.
  3. Thanks for pointing that out, I’ll update it. (Have no idea what you mean by “none police can join” though)
  4. This is pure bullcrap, come up with something more concrete. There are no junk code in the css. It’s ugly, I know, but it’s not like I have to make it responsive = ugly code is fine.
  5. What?

I won’t rewrite it but you’re more than welcome to write your own and share it with the community.

2 Likes

I’m using his ressources since a “long time” and I can tell you that his job his amazing.
Of course as each ressource you download you will have to modify it to make it correspond to your requirements.
Using DOB and Lastdigits is a great idea to get a “personnal number” that is unique.
For my case I have modified the type of DOB, the lastdigits to phone number and transposed this format to all of his resources.
Now, criminal logs, the police mobile computer, the ID cards works perfectly and totally communicate between them.
Of course for that, you will have to do some edits that are more than a simple drag and drop.
Don’t forget that he is sharing his work and doing readmes to help “drag and drop devs” and you are still finding things to complain about …

Eeee, how to exit this menu? Cause if i press ESC , menu is hiding and mouse is freezing.

Maybe you should read the instructions at the github?

You have the wrong name of the folder…

1 Like

Hey, Don’t get me wrong. Your scripts are amazing and you are a great developer.
I just pointed out couple things.
By meaning police join I meant that people without the police job can use it.
On the database it saves the color eye. Why?
I just showed you couple thing that will make the script better.
Oh and if I want to search on someone. How the hell I will get his ID? that’s the main problem

You’re asking me why I’m saving the eye color but not the hair color or the gender? Since we can’t send the mugshot to the javascript this is the best I could do. It’s not much but it’s something that could help the police finding the right person. If I remove those two, sure it would take up a couple of bytes less but if you don’t have those extra bytes on your server you should considering upgrading it. But hey, if you don’t want them just remove them?

if you’ve downloaded the new version it should only allow players with the police job to use it. (It was updated before you wrote the first post).

It’s not my problem how you decide to get the players ID. Use a script for it? It would be really weird to have a criminal record without the DOB. You must be the only one that’s not using the DOB.

I have a problem that I when I exit the mouse freezes.

Because you did not name it jsfour-criminalrecord if you name it something else that wil happen

I need your help

Unfortunately you cut the screenshot off right at the part where it’s important. You’ll want to paste or screenshot the whole error if you want people to be able to tell you what’s wrong.

I have problem. There is good information about suspect but… https://cdn.discordapp.com/attachments/480668937126674432/507965701655494658/unknown.png

You have test as a dob in the database as well?

I dont know. It worked only once, but more failed

Very nice script. However, I turned it into two scripts. One only allows searching the database at the 2 sheriff stations and the LSPD @ Mission Row. The other is set in the booking room and that is where you add records when booking a prisoner.

still always have this error

You don’t need 2 scripts for that. That’s a waste of resources. You could just make a new html file with a javascript in the same resource.