Description
911 Caller Script for FiveM
This script adds a 911 emergency call system to your FiveM roleplay server, allowing players to submit 911 calls, and receive real-time notifications. It includes features such as blips on the map, cooldown timers, and Discord webhook integration for emergency alerts.
Features:
-
/911 Command: Players can submit a 911 call with emergency details.
Cooldown System: Prevents spamming of the /911 command by enforcing a cooldown.
Discord Webhook: Sends call details to a Discord webhook.
Notifications: Callers receive notifications when 911 is alerted to their call.
Installation Instructions:
1. Download the Script:
Download the 911 Caller Script files from the resource folder.
2. Add the Resource to Your Server:
Navigate to your server’s resources folder.
Create a new folder called Hamster-911-Script (or any other name you’d like).
Place the downloaded script files inside this folder.
3. Update server.cfg:
Open your server.cfg file.
Add the following line to ensure the resource is loaded when the server starts:bash start Hamster-911-Script
4. Configure the Discord Webhook (Optional):
In the 311/311_script.lua and 911/911_script.lua files, find the following line: local webhookUrl = “YOUR_DISCORD_WEBHOOK_URL”
Replace YOUR_DISCORD_WEBHOOK_URL with your actual Discord webhook URL. You can create a webhook by going to your server settings in Discord → “Integrations” → “Webhooks.”
5. Customize the Timeout and Cooldown (Optional):
You can adjust the cooldown time for the /911 command in 911/911_script.lua. By default, the cooldown is set to 30 seconds:
Following the line callCooldowns[playerId] = os.time() + 30 Change the 30 to the time you want/
6. Restart Your Server:
Once everything is set up, restart your FiveM server to load the new resource.
Usage Instructions:
Calling 911: Players can call 911 by typing /911 in the chat. Example:
/911 My house is on fire!
Notifications & Blips:
When a call is submitted, the caller will receive a notification saying “911 has been alerted to your call.”
Emergency responders will see a blip on the map at the reported location, labeled with the 911 call ID.
Blips will automatically disappear after 5 minutes.
Discord Alerts:
Every time a 911 call is made, call details are sent to your specified Discord channel via the webhook. This helps your team stay updated on all active emergency calls.
Troubleshooting:
Blips Not Showing Up: Ensure that the client and server scripts are both correctly configured and that the server is restarted after changes.
No Notifications: If you’re not seeing notifications, make sure the script is correctly placed in the resources folder and that the server is restarted.
Support:
For any issues or feature requests, please contact Hamster Development via our support channel – https://hsdevelopment.xyz/contact-us
Reviews
There are no reviews yet.