Go to any of the green dollar sign icons on the map. Get close enough and it should prompt you saying something like “Press E to activate silent alarm”. When is it activated, it will send a message in Discord stating the name of the establishment and the location (including postal [configurable]).
After this, the person will not be allowed to rob any more places for a 15 minute (default) time period.
Events
Trigger alarm (from client):
TriggerServerEvent("salarm:alertDispatch", "PUT_WEBHOOK_ADDRESS_HERE", "Name of Store", "Location of Store")
This is similar for triggering it from a server script, just do TriggerEvent instead of TriggerServerEvent
He’s recommending you, not asking how to.
If you store the webhook in the client.lua, it gets sent to the client, to where anyone with minimal computer skills can use a cache decryptor to gain access to the contents of the script, thus getting bot tokens, links, etc. and allowing them to send messages to the Discord server through it.
I was searching too, but only possible way, it seems, is to connect server and Discord via IFTTT service. But I am just too non-tech to do that on my own
“hey kinda late to this but there is a way for webhooks to mention Roles, I use IFTTT for webhooks in my server and all you have to do is copy the role id of the role you want the webhook to mention and put that id where it says content with the ingredients”
I’ve come up with another idea. Would be awesome, if your script would have been working with car thefts as well! On our server, we use esx_outlaw and esx_carthief, so you could adjust your code from there, maybe.
I really like the idea for this, but (as others have mentioned) it is really unsecure. The cooldown and webhook should be server-side and not client-side. As it is now, not only can anyone obtain the webhook address and post malicious content to Discord but they can also edit the cooldown timer to last any length of their choosing which is going to cause problems on servers with payment systems as cheaters are just going to set the timer to “1” and rob places over and over…
I am cleaning this script up for my own purposes but I would heavily suggest you heed what others have said and please make your code more secure as it’s really unprofessional to not only leave blatant security flaws in your code but to then also tell the end user to “fix it yourself” is just plain ignorant from a developer standpoint.
is there a way to make this notify users with the police job like as with the outlaw alert please feel free to message me on discord DirectorHappy#0082 i am messing around with the coding to figure this out till you message me back