[ESX] Detector / Detect if you have weapons

Hello, this is a script to make policemen have a better look at people walking in at the policestation or something else. Makes a sound if the guy have a weapon and walking through the detector.

Much thanks to InteractSound

Video

Youtube Video

Easy Configurable, you can have up to 100 detectors. Added into the config as shown. README.md for tutorial.

Download

Github

11 Likes

Name of the map please?

Already in game you just need to find it : )

Thank you :).
20char

So if I add concordance for the pd, will the detector be there?

Just do Detector3 in config and change coords, it will work whatever you name em, you can have up too 100.

OK I’ll give it a shot

Thank you :slight_smile: I’ll try this too :smiley:

So I added detector 3 changed the location to the PD, but nothing shows up or happens.

New update, test now.

  Detector = {
    Pos   = { x = 2133.14, y = 2919.72, z = -61.8 },
    Size  = { x = 2.5, y = 2.5, z = 1.5 },
    Color = { r = 255, g = 255, b = 0 },  
    Type  = -1,
  },

  Detector2 = {
    Pos   = { x = 2138.6, y = 2920.57, z = -61.9 },
    Size  = { x = 2.5, y = 2.5, z = 1.5 },
    Color = { r = 255, g = 255, b = 0 },  
    Type  = -1,
  },

Just updated and still nothing at the Mission Row PD. I added Detector3 and only changed the Pos location.

esx_detector.rar (3.9 KB)
This works at the pd.

Well, I put this in, changed the language and nothing. Is it because I am a cop? When I teleport to to the one in the bunker, it works, but nothing at the pd

UPDATE. I teleported to the Detector 2 and I am at the PD. It might not be working as I am police. I will have a non police person try when they are on. Thanks for the help. Hope it works.

Yes police is whitelisted you can remove that in client.lua

What do I need to change?

change

			if PlayerData.job ~= nil and PlayerData.job.name == 'police' then
				--
			else

to

			if PlayerData.job ~= nil then
				--
			else

I made this change and still no marker or nothing. Thanks for the help though and you have been very patient. I don’t know why it’s not working so I guess I will just give up on this. I don’t want to bug you too much.

You cant see the marker, if you wanna see the marker then in marker type edit from -1 to 1