[Release] jsfour-criminalrecord [ESX]


#41

can anybody help me? I have separate jobs, like CHP, Sheriff, FBI and others. How can I allow these other jobs to access Criminal Records?
I am not a professional programmer, but I am trying to become alone, but this one is difficult. I tried to put this code here, could someone help me where I went wrong?

-- 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" and PlayerData.job.name == "chp" and PlayerData.job.name == "sheriff" 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)

These other professions can not access, because the marking does not appear for them, in fact it even appears to the police. Can someone help me?


#43

It did not work, thank you anyway.


#44

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)

#45

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


#47

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

My discord: jonassvensson4#3011


#48

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.


#49

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.


#50

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 …


#51

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


#52

Maybe you should read the instructions at the github?

You have the wrong name of the folder…