Mar 16, 2019, 08:21 PM
Hello everyone!
I've spent the last few days re-working the panic button to add more functionality and to fix various bugs with it. This project started off as adding simple custom locations and expanded to almost a complete re-work. The core functionality is the exact same, with an GUI menu for those who wish to tweak how the button works.
Bug Fixes
I've fixed several bugs with the panic button, the most noticeable being the locations. I've added several fallbacks to how the panic button obtains its current location. This means the panic button will always now display the correct location unless it is off the map, which it will now correctly display "Unknown Location" or the default location instead of nothing.
Custom Locations + Local /IT Message
Support for custom locations has been added, so you can now be more specific with the location of a panic button to help whoever responds. The custom location will display alongside the real location to prevent abuse and can be set in the new menu. Pressing on a panic button will now also display a /it message which only you can see. This is just so you know you've pressed it.
New GUI Menu + Model Selection + Custom Recipients
One limitation with the panic buttons is that they've all been the same model and all always send a message to the government. After an interesting discussion with some staff, we decided allowing the owner to select who they want to send the panic message to opens up a bunch of opportunities such as private security and even mafia/gang roleplay (protection money can actually mean something now!).
New Menu:
Pressing Shift + E on the panic button will open up this menu
The menu allows you to easily change the custom location, model and recipients of the panic button. Only the owner or those with prop access can open this menu.
Here's a rundown of what the checkbox options do:
Send to Government Dispatch: Send panic message to the government, as it currently does
Send to Clan Radio: Send panic message to everyone in your clan
Send to Private Radio: Send panic message to everyone on the same /frequency as you
It should be noted that you can send the panic message to all three options at once if you wanted. For example, if I was a legal store owner with a private security service I could select both the Government Dispatch and Private Radio options to alert both at the same time.
Changing the model does pretty much exactly what you'd expect it to do, it also opens up the possibility of a custom panic button model being added in the future.
Current Models:
If you have any suggestions, feel free to post it below or leave a suggestion.
I hope you all like the rework, it took a lot longer than expected.
Credits