[Release] GCphone attack alerts only with weapons

Pretty simple little script that will send a text to police with co-ordinates via GCPhone when someone swings a weapon or shoots a bullet etc.

This script will trigger for anything other than fists, now you can start a fight club without the cops being called.

Main bulk of the script was made by MikeTheMadKiwi who’s profile you can find HERE i just adjusted it to work with ESX and GC Phone.

It could probably be done cleaner but it is what it is and it works.

Requirements: ESX & GCPhone

Edit: Forgot a small thing in the resource.lua which has since been fixed

Github link: GitHub - MrMallenby/ESX_PoliceAlert

8 Likes

for vrp

its for gcphone, and esx. just read it lol

2 Likes

Requirements: ESX & GCPhone

As stated in the requirements you need esx and gcphone. The code is fairly simple though just swap out the esx calls for vrp equivalents and then swap out the trigger for the gc phone call to your preferred system. I have no knowledge with vrp so can’t help you with this.

any screen ?

Will get one uploaded when I get home, its just like when someone messages the police via the phones favourites

Added screenshots

change this
if PlayerData.job ~= ‘police’ then
to
if PlayerData.job and PlayerData.job.name ~= ‘police’ then

i couldnt get the script to work like that, however your free to edit the script

Anyone know the easiest way to ignore/not alert if someone pours a Jerrycan?

Is there anyway to make it only alert once or few times only instead of spamming the notification message in gcphone ?

Edited : I think i found a way to not make it too much spam by increasing the Citizen.Wait(1000) issue here probably if 2 person shoot you might only get the notification a bit late or maybe never ? Will try it out more.

1 Like

have u find out / fix it ?

i dont want when PD shoots it give u an sms and only when 1 bullet is shot it will give u a sms

It will be off topic but how did ui do it? I know it’s esx customui but I don’t have it, can you please send it to me?

How can you prove it with the button F10 as if it was an emergency call button

Nice release

1 Like

Would be nice to include it also when an officer is in service otherwise you get spammed

You are welcome to mess with the code and submit a pull request https://github.com/MrMallenby/ESX_PoliceAlert

Yo did you find out about that? :smiley: The thing with the jerrycan

I think so!

With:

if Weapon ~= 883325847 and Weapon ~= 101631238 and Weapon ~= 1233104067 and Weapon ~= 1198879012 and Weapon ~= 911657153 then
1 Like