├── [inferno-collection] └── inferno-fire-ems-pager │ ├── html │ ├── sounds │ │ ├── end.mp3 │ │ ├── fire.mp3 │ │ ├── cancel.mp3 │ │ ├── medical.mp3 │ │ ├── other.mp3 │ │ ├── rescue.mp3 │ │ ├── siren1.mp3 │ │ ├── siren2.mp3 │ │ └── vibrate.mp3 │ └── index.html │ ├── whitelist.json │ ├── fxmanifest.lua │ ├── inferno-fire-ems-pager.cfg │ ├── server.lua │ └── client.lua ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── suggestion.md ├── LICENCE.txt ├── .travis.yml └── README.md /[inferno-collection]/inferno-fire-ems-pager/html/sounds/end.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/end.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/fire.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/fire.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/cancel.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/cancel.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/medical.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/medical.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/other.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/other.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/rescue.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/rescue.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/siren1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/siren1.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/siren2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/siren2.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/sounds/vibrate.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inferno-collection/Fire-EMS-Pager/HEAD/[inferno-collection]/inferno-fire-ems-pager/html/sounds/vibrate.mp3 -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/whitelist.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "steamhex" : "steam:1100001076264E1", 4 | "pager" : true, 5 | "page" : true, 6 | "firesiren" : true, 7 | "cancelpage" : true, 8 | "pagerwhitelist": true 9 | } 10 | ] -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help squash them 4 | title: "[Bug]" 5 | labels: Unconfirmed Bug 6 | assignees: cm8263 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **Steps to reproduce** 14 | Steps to reproduce the behavior. 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem. 21 | 22 | **Resource version** 23 | What resource version are you running, and have you tried the latest version? 24 | 25 | **Additional context** 26 | Add any other context about the problem here. 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggestion.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Suggestion 3 | about: Suggest an idea for this resource 4 | title: "[Suggestion]" 5 | labels: New Suggestion 6 | assignees: cm8263 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you would like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you have considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /LICENCE.txt: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, modify, and merge the software, under the following conditions: 2 | 3 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 4 | 5 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD. 6 | -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/fxmanifest.lua: -------------------------------------------------------------------------------- 1 | -- Inferno Collection Fire/EMS Pager + Fire Siren Version 4.55 Beta 2 | -- 3 | -- Copyright (c) 2019, Christopher M, Inferno Collection. All rights reserved. 4 | -- 5 | -- This project is licensed under the following: 6 | -- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to use, copy, modify, and merge the software, under the following conditions: 7 | -- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | -- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD. 9 | -- 10 | 11 | name 'Fire/EMS Pager + Fire Siren - Inferno Collection' 12 | 13 | description 'The Fire/EMS Pager + Fire Siren is a resource that allows players to have a pager on their person at all times.' 14 | 15 | author 'Inferno Collection (inferno-collection.com)' 16 | 17 | version '4.55 Beta' 18 | 19 | url 'https://inferno-collection.com' 20 | 21 | client_script 'client.lua' 22 | 23 | server_script 'server.lua' 24 | 25 | ui_page 'html/index.html' 26 | 27 | files { 28 | 'whitelist.json', 29 | 'html/index.html', 30 | 'html/sounds/*.mp3' 31 | } 32 | 33 | fx_version 'bodacious' 34 | 35 | game 'gta5' 36 | -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/inferno-fire-ems-pager.cfg: -------------------------------------------------------------------------------- 1 | # Inferno Collection Fire/EMS Pager + Fire Siren Version 4.54 Beta 2 | # 3 | # Copyright (c) 2019, Christopher M, Inferno Collection. All rights reserved. 4 | # 5 | # This project is licensed under the following: 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, modify, and merge the software, under the following conditions: 7 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD. 9 | # 10 | 11 | # 12 | # Permissions 13 | # Add your player's identifiers in the sections below. 14 | # https://github.com/inferno-collection/Fire-EMS-Pager/wiki/Whitelisting 15 | # 16 | 17 | # User 18 | # Commands: 19 | # - /pager 20 | add_principal identifier.steam:1100001076264E1 fire-ems-pager.group.user 21 | 22 | # Supervisor 23 | # Commands: 24 | # - /pager 25 | # - /page 26 | # - /firesiren 27 | # - /cancelpage 28 | add_principal identifier.steam:1100001076264E1 fire-ems-pager.group.supervisor 29 | 30 | # 31 | # Nothing past this point needs to be edited, all the whitelisting needs to be done ABOVE this line. 32 | # Do not make changes below this line unless you know what you are doing! 33 | # 34 | 35 | add_principal fire-ems-pager.group.supervisor fire-ems-pager.group.user 36 | add_ace fire-ems-pager.group.user "fire-ems-pager.pager" allow 37 | add_ace fire-ems-pager.group.supervisor "fire-ems-pager.page" allow 38 | add_ace fire-ems-pager.group.supervisor "fire-ems-pager.firesiren" allow 39 | add_ace fire-ems-pager.group.supervisor "fire-ems-pager.cancelpage" allow -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Inferno Collection Fire/EMS Pager + Fire Siren Version 4.54 Beta 2 | # 3 | # Copyright (c) 2019, Christopher M, Inferno Collection. All rights reserved. 4 | # 5 | # This project is licensed under the following: 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, modify, and merge the software, under the following conditions: 7 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD. 9 | # 10 | 11 | # 12 | # This file is used by Travis CI to make sure all the code is this project is error free, and up conventional standards. 13 | # This file does not do anything within FiveM, so feel free to delete it. Keeping it will not do any harm to the resource or your server. 14 | # 15 | 16 | language: python 17 | sudo: false 18 | 19 | env: 20 | - LUA="lua=5.1" 21 | - LUA="lua=5.2" 22 | - LUA="lua=5.3" 23 | - LUA="luajit=2.0" 24 | - LUA="luajit=2.1" 25 | 26 | before_install: 27 | - pip install hererocks 28 | - hererocks lua_install -r^ --$LUA 29 | - export PATH=$PATH:$PWD/lua_install/bin 30 | 31 | install: 32 | - luarocks install luacheck 33 | 34 | script: 35 | - luacheck -g -a --no-max-line-length --no-max-comment-line-length [inferno-collection]/inferno-fire-ems-pager 36 | 37 | after_success: 38 | - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh 39 | - chmod +x send.sh 40 | - ./send.sh success $WEBHOOK_URL 41 | after_failure: 42 | - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh 43 | - chmod +x send.sh 44 | - ./send.sh failure $WEBHOOK_URL -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/html/index.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 | 21 | 22 | 23 | 60 | 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > Unsupported as of 03/21/2021 - Downloads still available, but no support will be provided for any issues found. 2 | 3 | *** 4 | 5 |  6 | # Inferno Collection: Fire/EMS Pager + Fire Siren 7 | [](https://travis-ci.com/inferno-collection/Fire-EMS-Pager) 8 | 9 | __Public Beta Version 4.55__ 10 | 11 | The Fire/EMS Pager + Fire Siren is a resource that allows players to have a pager on their person at all times. The pager is turned off by default, and must be tuned to tones in order to be paged. Once a tone or tones are paged, pagers tuned to these tones will receive the tone/s; if a tone is paged that a player is tuned to, they will hear a vibration sound and a notification will pop-up on their screen informing them of the call type, if a player is not tuned to a paged tone they will hear the tone sound, but not hear a vibration or receive a notification. 12 | 13 | The fire siren allows a custom siren to be sounded at any of the fire stations around the map ([custom stations for the fire siren](https://github.com/inferno-collection/Fire-EMS-Pager/wiki/Adding-custom-stations), as well as [custom tones for the pager](https://github.com/inferno-collection/Fire-EMS-Pager/wiki/Adding-custom-tones) can also be added to the resource). Once sounded, a siren can be heard within a predefined radius per station, and the further from the origin of the siren a player is, the quieter it will sound for them. Multiple sirens can be added, allowing you to choice which stations have what siren sound. 14 | 15 | In the case of the pager, multiple tones can be tuned to, and paged at once; for the fire siren, multiple stations can be sounded at once as well. Once tones are being paged, or a siren sounded, they must finish completely before more tones are paged or sirens sounded, as tones cannot be paged over other tones, and sirens cannot be sounded over other sirens (note however, sirens can be sounded at the same time as tones paged, and vice versa). 16 | 17 | The Fire/EMS Pager + Fire Siren resource is not only designed to be as efficient and lightweight as possible, but also to be customizable, and allow server owners to have as much control as possible over the resource, without the need to edit any code (with the exception of the configuration). 18 | 19 | Presently, the following can be customized: 20 | - [Tones](https://github.com/inferno-collection/Fire-EMS-Pager/wiki/Adding-custom-tones). 21 | - [Stations](https://github.com/inferno-collection/Fire-EMS-Pager/wiki/Adding-custom-stations). 22 | - Including different sirens per station. 23 | - Radius fire siren can be heard in per station. 24 | - Department name in messages. 25 | - Default /page message. 26 | - Wait time between tones played. 27 | - Whether to display chat suggestions. 28 | - Whether to display messages at all. 29 | - I.E. disable all messages for realism. 30 | - Which players can use which command (via a whitelist). 31 | - Choice of three whitelist options:. 32 | 1. Steam ID based JSON file 33 | 2. Ace Permissions 34 | 3. No whitelist 35 | 36 | *** 37 | ### Development Showcase Video (Showing Version 4.2) 38 | [](https://www.youtube.com/watch?v=ItzmndFpmpc) 39 | *** 40 | ### Installation Video (Showing Version 4.2) 41 | [](https://www.youtube.com/watch?v=7ri7Ubpy7t8) 42 | *** 43 | 44 | > Download Link 45 | 46 | https://github.com/inferno-collection/Fire-EMS-Pager/releases 47 | 48 | > Pictures 49 | 50 |  51 | 52 |  53 | 54 |  55 | 56 |  57 | 58 |  59 | 60 |  61 | 62 |  63 | 64 |  65 | *** 66 | Check out the Wiki for an [installation guide](https://github.com/inferno-collection/Fire-EMS-Pager/wiki), as well as to find out how to use the resource. 67 | 68 | If you have any troubles, suggestions, feedback, etc, please [check the Wiki](https://github.com/inferno-collection/Fire-EMS-Pager/wiki) and/or [create a new issue](https://github.com/inferno-collection/Fire-EMS-Pager/issues/new) on GitHub. 69 | 70 | Thank you to everyone that helped tested this resource. 71 | 72 | > The Inferno Collection Team 73 | * @ChristopherM 74 | * @Scott_UK 75 | * @FrozenN00b 76 | *** 77 | Interested in keeping up-to-date with what we are working on? [Check out our roadmap](https://inferno-collection.com/roadmap). 78 | -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/server.lua: -------------------------------------------------------------------------------- 1 | -- Inferno Collection Fire/EMS Pager + Fire Siren Version 4.55 Beta 2 | -- 3 | -- Copyright (c) 2019, Christopher M, Inferno Collection. All rights reserved. 4 | -- 5 | -- This project is licensed under the following: 6 | -- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, modify, and merge the software, under the following conditions: 7 | -- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD. 9 | -- 10 | 11 | -- 12 | -- Nothing past this point needs to be edited, all the settings for the resource are found ABOVE this line. 13 | -- Do not make changes below this line unless you know what you are doing! 14 | -- 15 | 16 | -- Master Fire Siren storage variable 17 | local FireSirens = {} 18 | 19 | RegisterServerEvent("Fire-EMS-Pager:StoreSiren") 20 | AddEventHandler("Fire-EMS-Pager:StoreSiren", function(Station) 21 | if not FireSirens[Station.Name:lower()] then 22 | FireSirens[Station.Name:lower()] = Station 23 | FireSirens[Station.Name:lower()].ID = source 24 | 25 | TriggerClientEvent("Fire-EMS-Pager:Bounce:ServerValues", -1, FireSirens) 26 | end 27 | end) 28 | 29 | RegisterServerEvent("Fire-EMS-Pager:RemoveSiren") 30 | AddEventHandler("Fire-EMS-Pager:RemoveSiren", function(StationName) 31 | if FireSirens[StationName] then 32 | FireSirens[StationName] = nil 33 | end 34 | end) 35 | 36 | -- Plays tones on all clients 37 | RegisterServerEvent("Fire-EMS-Pager:PageTones") 38 | AddEventHandler("Fire-EMS-Pager:PageTones", function(Tones, HasDetails, Details) 39 | TriggerClientEvent("Fire-EMS-Pager:PlayTones", -1, Tones, HasDetails, Details) 40 | end) 41 | 42 | -- Plays cancel sound on all clients 43 | RegisterServerEvent("Fire-EMS-Pager:CancelPage") 44 | AddEventHandler("Fire-EMS-Pager:CancelPage", function(Tones, HasDetails, Details) 45 | TriggerClientEvent("Fire-EMS-Pager:CancelPage", -1, Tones, HasDetails, Details) 46 | end) 47 | 48 | -- Play fire siren on all clients 49 | RegisterServerEvent("Fire-EMS-Pager:SoundSirens") 50 | AddEventHandler("Fire-EMS-Pager:SoundSirens", function() 51 | TriggerClientEvent("Fire-EMS-Pager:PlaySirens", -1) 52 | end) 53 | 54 | -- Whitelist check on server join 55 | RegisterServerEvent("Fire-EMS-Pager:WhitelistCheck") 56 | AddEventHandler("Fire-EMS-Pager:WhitelistCheck", function(Whitelist) 57 | for i in pairs(Whitelist.Command) do 58 | Whitelist.Command[i] = "pending" 59 | end 60 | 61 | -- If usin json file as whitelist 62 | if Whitelist.Enabled:lower() == "json" then 63 | -- Collect all the data from the whitelist.json file 64 | local Data = LoadResourceFile(GetCurrentResourceName(), "whitelist.json") 65 | if Data then 66 | local Entries = json.decode(Data) 67 | 68 | -- Loop through the whitelist array 69 | for _, Entry in ipairs(Entries) do 70 | -- Check if the player exists in the array. 71 | if GetPlayerIdentifier(source):lower() == Entry.steamhex:lower() then 72 | -- Loop though all values in whitelist entry 73 | for i in pairs(Entry) do 74 | -- If the value is not the player's steam hex 75 | if i ~= "steamhex" then 76 | -- If whitelist value is true, aka they have access to a command 77 | if Entry[i] then 78 | -- If command is a valid command 79 | if Whitelist.Command[i] then 80 | -- Allow player to use that command 81 | Whitelist.Command[i] = true 82 | -- If command is not valid 83 | else 84 | print("===================================================================") 85 | print("==============================WARNING==============================") 86 | print("/" .. i .. " is not a valid command, but is listed in ") 87 | print(Entry.steamhex:lower() .. "'s whitelist entry. Please correct this") 88 | print("issue, and reload the whitelist with /pagerwhitelist reload.") 89 | print("Note: Entries are CaSe SeNsItIvE.") 90 | print("===================================================================") 91 | end 92 | end 93 | end 94 | end 95 | 96 | break 97 | end 98 | end 99 | -- If unable to load json file 100 | else 101 | print("===================================================================") 102 | print("==============================WARNING==============================") 103 | print("Unable to load whitelist file for Inferno-Fire-EMS-Pager. The white") 104 | print("list has been disabled. This message will appear every time someone") 105 | print("joins the server until the issue is corrected.") 106 | print("===================================================================") 107 | -- Loop through all commands 108 | for i in pairs(Whitelist.Command) do 109 | -- Grant players all permissions 110 | Whitelist.Command[i] = true 111 | end 112 | -- Override whitelist permission 113 | Whitelist.Command.pagerwhitelist = false 114 | end 115 | 116 | -- Loop through all commands 117 | for i in pairs(Whitelist.Command) do 118 | -- If command is still pending 119 | if Whitelist.Command[i] == "pending" then 120 | -- Deny access 121 | Whitelist.Command[i] = false 122 | end 123 | end 124 | -- If using Ace permissions 125 | elseif Whitelist.Enabled:lower() == "ace" then 126 | -- Loop through all commands 127 | for i in pairs(Whitelist.Command) do 128 | -- Grant player permission to command based on Ace group 129 | Whitelist.Command[i] = IsPlayerAceAllowed(source, "fire-ems-pager." .. i) 130 | end 131 | -- If using neither json, Ace, or disabled 132 | else 133 | print("===================================================================") 134 | print("==============================WARNING==============================") 135 | print("''" .. tostring(Whitelist.Enabled) .. "'' is not a valid Whitelist option.") 136 | print("The whitelist has been disabled.") 137 | print("===================================================================") 138 | -- Loop through all commands 139 | for i in pairs(Whitelist.Command) do 140 | -- Grant players all permissions 141 | Whitelist.Command[i] = true 142 | end 143 | -- Override whitelist permission 144 | Whitelist.Command.pagerwhitelist = false 145 | end 146 | 147 | TriggerClientEvent("Fire-EMS-Pager:return:WhitelistCheck", source, Whitelist) 148 | end) 149 | 150 | -- Whitelist reload on all clients 151 | RegisterServerEvent("Fire-EMS-Pager:WhitelistReload") 152 | AddEventHandler("Fire-EMS-Pager:WhitelistReload", function() 153 | TriggerClientEvent("Fire-EMS-Pager:WhitelistRecheck", -1) 154 | end) 155 | 156 | -- Add entry to whitelist (json only) 157 | RegisterServerEvent("Fire-EMS-Pager:WhitelistAdd") 158 | AddEventHandler("Fire-EMS-Pager:WhitelistAdd", function(ID, Entry) 159 | -- Collect all the data from the whitelist.json file 160 | local Data = json.decode(LoadResourceFile(GetCurrentResourceName(), "whitelist.json")) 161 | 162 | -- If 'steam hex' provided was a number 163 | if tonumber(ID) then 164 | -- Get steam hex based off of number 165 | ID = GetPlayerIdentifier(ID) 166 | end 167 | 168 | -- Add the steam hex to the whitelist entry 169 | Entry.steamhex = ID 170 | -- Add the entry to the existing whitelist 171 | table.insert(Data, Entry) 172 | -- Covert the entire object to a json format, then save it over the existing file 173 | SaveResourceFile(GetCurrentResourceName(), "whitelist.json", json.encode(Data), -1) 174 | 175 | TriggerClientEvent("Fire-EMS-Pager:WhitelistRecheck", -1) 176 | end) -------------------------------------------------------------------------------- /[inferno-collection]/inferno-fire-ems-pager/client.lua: -------------------------------------------------------------------------------- 1 | -- Inferno Collection Fire/EMS Pager + Fire Siren Version 4.55 Beta 2 | -- 3 | -- Copyright (c) 2019, Christopher M, Inferno Collection. All rights reserved. 4 | -- 5 | -- This project is licensed under the following: 6 | -- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the software'), to use, copy, modify, and merge the software, under the following conditions: 7 | -- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | -- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD. 9 | -- 10 | 11 | -- 12 | -- Resource Configuration 13 | -- PLEASE RESTART SERVER AFTER MAKING CHANGES TO THIS CONFIGURATION 14 | -- 15 | local Config = {} -- Do not edit this line 16 | -- Whether or not to disable all on-screen messages, exect call details 17 | Config.DisableAllMessages = false 18 | -- Whether or not to enable chat suggestions 19 | Config.ChatSuggestions = true 20 | -- Whether or not to enable a reminder for whitelisted people to enable their pagers shortly 21 | -- after they join the server, if they have not done so already 22 | Config.Reminder = true 23 | -- Whether or not to enable command whitelist. 24 | -- 'ace' to use Ace permissions, 'json' to use whitelist.json file, or false to disable. 25 | Config.WhitelistEnabled = false 26 | -- Separator character, goes between tones and details in /page command 27 | Config.PageSep = '-' 28 | -- Default fire department name, used in /page command 29 | Config.DeptName = 'Los Santos Fire' 30 | -- Default text shown when page details are not provided 31 | Config.DefaultDetails = 'Report to Station' 32 | -- Time in ms between the beginning of each tone played. 33 | -- 7.5 seconds by default, do not edit unless you need to 34 | Config.WaitTime = 7500 35 | -- List of tones that can be paged, read the wiki page below to learn how to add more 36 | -- https://github.com/inferno-collection/Fire-EMS-Pager/wiki/Adding-custom-tones 37 | Config.Tones = {'medical', 'rescue', 'fire', 'other'} 38 | -- List of stations fire sirens can be played at, read the wiki page below to learn how to add more 39 | -- https://github.com/inferno-collection/Fire-EMS-Pager/wiki/Adding-custom-stations 40 | Config.Stations = {} -- Do not edit this line 41 | table.insert(Config.Stations, {Name = 'pb', Loc = vector3(-379.53, 6118.32, 31.85), Radius = 800, Siren = 'siren1'}) -- Paleto Bay 42 | table.insert(Config.Stations, {Name = 'fz', Loc = vector3(-2095.92, 2830.22, 32.96), Radius = 1000, Siren = 'siren2'}) -- Fort Zancudo 43 | table.insert(Config.Stations, {Name = 'ss', Loc = vector3(1691.24, 3585.83, 35.62), Radius = 500, Siren = 'siren1'}) -- Sandy Shores 44 | table.insert(Config.Stations, {Name = 'rh', Loc = vector3(-635.09, -124.29, 39.01), Radius = 400, Siren = 'siren1'}) -- Rockford Hills 45 | table.insert(Config.Stations, {Name = 'els', Loc = vector3(1193.42, -1473.72, 34.86), Radius = 400, Siren = 'siren1'}) -- East Los Santos 46 | table.insert(Config.Stations, {Name = 'sls', Loc = vector3(199.83, -1643.38, 29.8), Radius = 400, Siren = 'siren1'}) -- South Los Santos 47 | table.insert(Config.Stations, {Name = 'dpb', Loc = vector3(-1183.13, -1773.91, 4.05), Radius = 400, Siren = 'siren1'}) -- Del Perro Beach 48 | table.insert(Config.Stations, {Name = 'lsia', Loc = vector3(-1068.74, -2379.96, 14.05), Radius = 500, Siren = 'siren2'}) -- LSIA 49 | 50 | -- 51 | -- Nothing past this point needs to be edited, all the settings for the resource are found ABOVE this line. 52 | -- Do not make changes below this line unless you know what you are doing! 53 | -- 54 | 55 | -- Local Pager Variables 56 | local Pager = {} 57 | -- Is the clients local pager enabled 58 | Pager.Enabled = false 59 | -- Are all clients currently being paged 60 | Pager.Paging = false 61 | -- What the clients local pager is tuned to 62 | Pager.TunedTo = {} 63 | -- How long to wait between tones being played 64 | Pager.WaitTime = Config.WaitTime 65 | -- List of tones that can be paged 66 | Pager.Tones = Config.Tones 67 | 68 | -- Local Fire Siren Variables 69 | local FireSiren = {} 70 | -- Stations that currently have a fire siren being played 71 | FireSiren.EnabledStations = {} 72 | -- Fire Station Variables 73 | FireSiren.Stations = Config.Stations 74 | 75 | -- Local whitelist variable 76 | local Whitelist = {} 77 | -- Boolean for whether the whitelist is enabled 78 | Whitelist.Enabled = Config.WhitelistEnabled 79 | -- Whitelist variable for commands 80 | Whitelist.Command = {} 81 | -- Boolean for whether player is whitelisted for pager command 82 | Whitelist.Command.pager = false 83 | -- Boolean for whether player is whitelisted for page command 84 | Whitelist.Command.page = false 85 | -- Boolean for whether player is whitelisted for firesiren command 86 | Whitelist.Command.firesiren = false 87 | -- Boolean for whether player is whitelisted for cancelpage command 88 | Whitelist.Command.cancelpage = false 89 | -- Boolean for whether player is whitelisted for pagerwhitelist command 90 | Whitelist.Command.pagerwhitelist = false 91 | 92 | AddEventHandler('onClientResourceStart', function (ResourceName) 93 | if(GetCurrentResourceName() == ResourceName) then 94 | if Whitelist.Enabled then 95 | TriggerServerEvent('Fire-EMS-Pager:WhitelistCheck', Whitelist) 96 | else 97 | for i in pairs(Whitelist.Command) do 98 | Whitelist.Command[i] = true 99 | end 100 | 101 | Whitelist.Command.pagerwhitelist = false 102 | end 103 | end 104 | end) 105 | 106 | -- On client join server 107 | AddEventHandler('onClientMapStart', function() 108 | if Config.ChatSuggestions then 109 | -- Create a temporary variables to add more text to 110 | local ValidTones = 'Valid tones:' 111 | local ValidStations = 'Valid stations:' 112 | 113 | -- Loop though all the tones 114 | for _, Tone in ipairs(Pager.Tones) do 115 | -- Add a tone to temporary string 116 | ValidTones = ValidTones .. ' ' .. Tone 117 | end 118 | 119 | -- Loop though all the stations 120 | for _, Station in ipairs(FireSiren.Stations) do 121 | -- Add a station to temporary string 122 | ValidStations = ValidStations .. ' ' .. Station.Name 123 | end 124 | 125 | TriggerEvent('chat:addSuggestion', '/pager', 'From already being tuned, will turn off Pager. From the pager being off, enter tones to be tuned to, or if already tuned, tones to be retuned to. Put a space between each tone.', { 126 | { name = 'tone', help = ValidTones } 127 | }) 128 | 129 | TriggerEvent('chat:addSuggestion', '/page', 'If no other tones are currently being paged, will page entered tones. Put a space between each tone.', { 130 | { name = 'tones', help = ValidTones }, 131 | { name = '- call details', help = 'To add optional details, add a space after the last tone, then a '-', then another space, then your details. For example: /page fire medical - Your Details Go Here' } 132 | }) 133 | 134 | TriggerEvent('chat:addSuggestion', '/cancelpage', 'Plays cancel tone for selected tones, and shows disregard notification.', { 135 | { name = 'tones', help = ValidTones }, 136 | { name = '- disregard details', help = 'To add optional disregard details, add a space after the last tone, then a '-', then another space, then your details. For example: /cancelpage fire medical - Your Disregard Details Go Here' } 137 | }) 138 | 139 | TriggerEvent('chat:addSuggestion', '/firesiren', 'If no other sirens are currently being sounded, will page fire siren at entered stations. Put a space between each station.', { 140 | { name = 'stations', help = ValidStations } 141 | }) 142 | 143 | TriggerEvent('chat:addSuggestion', '/pagerwhitelist', 'Add to, and/or reload the command whitelist.', { 144 | { name = '{reload} or {player hex/server id}', help = 'Type "reload" to reload the current whitelist, or if you are adding to the whitelist, type out the players steam hex, or put the players server ID from the player list.' }, 145 | { name = 'commands', help = 'List all the commands you want this person to have access to.'} 146 | }) 147 | end 148 | 149 | if Whitelist.Enabled then 150 | TriggerServerEvent('Fire-EMS-Pager:WhitelistCheck', Whitelist) 151 | else 152 | for i in pairs(Whitelist.Command) do 153 | Whitelist.Command[i] = true 154 | end 155 | 156 | Whitelist.Command.pagerwhitelist = false 157 | end 158 | 159 | -- Adds page command chat template, including pager icon 160 | TriggerEvent('chat:addTemplate', 'page', '