[RELEASE][C#] ActivateAlarm - Custom External Sound (British Alarm)

London Studios

London Studios - Update

Since forming London Studios in April 2020 we’ve created a number of high quality and premium resources for the FiveM project, focusing on the emergency services and aiming to bring your server to the next level.

Although we made a number of free resources such as this one in the first year, we’ve now switched to creating paid content, keeping them constantly updated and working along with providing the best possible support to our customers.

Our most popular resources now include Smart Fires, Police Grappler and Smart Hose.

With thousands of happy customers we are confident you’ll love our resources and our active support team are on hand to help if you have any questions!

Our store: https://store.londonstudios.net/forum

Therefore, this resource is now likely out of date and is no longer supported by us. The full source code is available should you wish to make any changes. All of our paid resources however are constantly updated and we invite you to take a look!

ActivateAlarm Banner

ActivateAlarm - Now with Discord Integration

A FiveM resource used to activate a custom alarm sound in an area coded in C#. This uses another resource called PlayCustomSounds, a standalone resource used to play external sounds. This resource integrates with Discord and sends notifications to a channel upon Alarm Activations or Deactivations.

The alarm included as part of the installation is a British security alarm with a length of 4 seconds. This is played on a loop upon alarm activation.
This may be changed, however must be named “alarm” in an ogg format and be at a length of 4 seconds.

Usage

In game, use /alarm to activate the alarm. The distance is not changeable and is set at 30.0. This is a good distance to cover most locations in game, including stores, nightclubs and more.
To deactivate the alarm, use /alarm.

Download

Download from GitHub here.

Installation

  1. Create a new folder in server resources named “activatealarm”. Inside the folder place the “Client.net.dll”, “notification.lua” and “fxmanifest.lua”.
  2. To enable Discord Integration, create a new Webhook on your server and select the channel. Open “notification.lua” and enter the Webhook ID at the top. If you do not want Discord Integration, set “enabled” to false at the top. Do not edit anything below. Recommended webhook image here.
  3. In server.cfg, add “ensure activatealarm” or “start” if on an older server version.
  4. Ensure you have PlayCustomSounds installed on the server. Download here.

Discord Integration

PlayCustomSounds

In the “Sound” folder in master, you will find the “alarm.ogg” file. This needs to be placed in html/sounds/ location in the PlayCustomSounds resource.

Errors and Bugs

There are no recorded errors or bugs at this time, however create a pull request or create an Issue if you encounter any, and they will be resolved.
Suggestions are also highly appreciated.

Licence

GNU General Public License v3.0

Please see the licence file for more information.

2 Likes

Hello how to change the name / alarm

@LeJoker

Hi,
In the PlayCustomSounds folder html/sounds - Replace the alarm.ogg with another alarm.ogg. This must be called alarm.ogg as this is detected by the plugin.
It must also be at a length of roughly 4 seconds as it plays on a loop.

Best wishes,
London Studios.

I would like to add a / alarm 1, / alarm 2

1 Like

@LeJoker
Hi,
That is something I will get added in the next update, hopefully in the next day or so.

Best wishes,
London Studios.

Oh thank you very much

Hello,

I cannot hear the alarm as the person who has started it. Should this happen?

Thanks

Hi,

This should not happen, you should be able to hear the alarm as the person who started it.
When starting the alarm, it gets your current location and this is where it continues to play the alarm until you stop the alarm.
Please confirm you have PlayCustomSounds installed and added the alarm.ogg file correctly.

Best wishes,
London Studios

Helo is here some way to do it when someone rob a bank?

Hi,
Not currently in this version however I will look into this.

Best wishes,
London Studios

is there a showcase video of this? would love to see it work before i download it.

@BlackKnife1car3

Hi,
Unfortunately a showcase video has not been produced at this time.

Best wishes,
London Studios.

Introducing Discord Integration

Discord Integration
Changelog:

  • Added Discord Integration
  • Improved Documentation

London Studios

London Studios - Update

Since forming London Studios in April 2020 we’ve created a number of high quality and premium resources for the FiveM project, focusing on the emergency services and aiming to bring your server to the next level.

Although we made a number of free resources such as this one in the first year, we’ve now switched to creating paid content, keeping them constantly updated and working along with providing the best possible support to our customers.

Our most popular resources now include Smart Fires, Police Grappler and Smart Hose.

With thousands of happy customers we are confident you’ll love our resources and our active support team are on hand to help if you have any questions!

Our store: https://store.londonstudios.net/forum