[ESX] Motion Detector

Hi, this is my first attempt and releasing a script. It’s a very basic one that allows you to specify a location for a proximity sensor (at a gang base, or stakeout location, etc) and a detection radius. If any player that is not a member of your gang/organisation enters the zone, a message is sent to all members/employee’s phones.

GitHub: here

Features:

  • Allows users to place proximity alarms at their base which will detect people who come within a preset radius of the base.
  • Gang members will be alerted at predefined intervals if someone is within that zone.
  • Config file allowing the ability to set how often members are alerted, the job that is alerted, where the alarm(s) are placed and how far the scanning radius is.

Installation:

  1. Extract esx_proximityalarms.rar into your resource folder.
  2. Start the script in your server.cfg or wherever you start scripts. Correct row: start esx_motiondetector
  3. Start/Restart your server.

Requirements:

  • es_extended
  • esx_phone

Screenshot:

To do:
Short term:
Add a control so that players can activate/deactivate it in game (in case they want to take someone who is not a member inside the base)

Medium term:
Looking at making it so that you can place a prop to activate and deactivate the sensor, allow for multiple alarms with small radiuses which will send an alert saying which direction intruders are coming from,
other ideas that pop in to my head.

I still consider myself a very novice coder, so your tips, suggestions are most welcome :slight_smile:

9 Likes

Real quick is this item based? Or is it just a command? Be dope if these could be purchased and eventually stopped working, maybe after 30 minutes or an hour. Make people buy them.

It’s neither. Coordinates are specified in the config file. It is definitely something I’m going to look at adding in the coming days, though.

1 Like

WEE WOO WEE WOO Raid Alerts Enemy Detected near base

1 Like

I have no need for this but the concept is cool. I bet a lot more people would be interested in it if you made it a usable item that you can place on the ground! That would be super easy to make too :slight_smile:

Edit: You could even allow the person who places it to name it, so when the call comes in if there’s multiple sensors you could determine which one it is.

Edit 2: Just looked over your code. You’ll need a server side script too so that it’s synced between players. Right now if someone trips the alarm you’ll never know because the script won’t tell YOUR client about it. Need to get the server involved, bud. :slight_smile: Let me know if you need help or maybe I’ll play with it tomorrow and make a pull request :wink:
Nevermind you’re outputting to the phone resource I see that now :wink:

Nice release, its possible to add more location with more jobs ?

Example:

Cartel = x y z
Ballas = x y z
Families = x y z …

I just sent a pull request through on his github. Supports multiple jobs, locations, distances. Untested with esx_phone, added ability to use ESX.ShowNotification function instead.

1 Like

Some great ideas coming through here. I kinda just did this as a little quick thing for my server and never intended for it to be much more initially but I’m really pumped to include some of these ideas and really make it something cool.

Thanks. I’ll check it out tonight!

Sure thing :slight_smile: I will leave you to your updates I see that you have some plans for it. Hopefully my PR gives you a good starting point. Let me know if you need any help with it.

1 Like

This is a really awesome script will definitely be using this would be really cool if you could do something with gcphone instead of esx phone or maybe even mythic notifications still gonna download this and test it

Thanks waiting for the confirmation ! :smiley:

He has big plans for this script so stay tuned I’m sure he will update it. :slight_smile:

1 Like

I hope there is a version that supports gcphone, because esx_phone is not easy to use … so my community gave up using this version. Looking forward to your next update, I will include it as a gang field :smiley:

causes crash

What makes you sure it’s because of this script? Got any specific information about the crashes? Any errors in the console, screenshots or crash logs?

what would I need to change in order to make it so only one org gets the notification. I know you made the change to allow multiple, but I’d like it to be for one org only. Thanks

Im receiving messages all time and not only me , all the people on th server and we dont know where this come from. Maybe you should work in a better setup system?

any update in this. hopefully support the gcphone

Maybe add so that you can add in the Config which jobs who can see the alert?