Updated 2.1.0

Updated everything to new format, N1K0 is about to work on some more stuff.
This commit is contained in:
Andyyy7666
2022-07-16 04:46:27 +02:00
parent e25da65776
commit 96f89d60ff
37 changed files with 924 additions and 854 deletions

View File

@@ -1,21 +1,21 @@
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
config = {
shotSpotterDelay = 10, -- How long until the police are notified about the shooting (in seconds).
shotSpotterDelay = 10, -- delay (in seconds) when cops will receive a notification after there has been a shooting.
shotSpotterTimer = 120, -- How long should the shot spotter stay on the map.
shotSpotterCooldown = 30, -- How long until the shot spotter can be activated again.
shotSpotterCooldown = 30, -- Cooldown for the next time a player can trigger it again.
shotSpotterUsePostal = true, -- If you're using a postal script turn this to true.
postalResourceName = "nearest-postal", -- the resource name of the postal script, this is used for the export.
shotSpotterUsePostal = true, -- if you're using the nearest postal script turn this to true.
postalResourceName = "nearest-postal", -- the resource name of the nearest postal script, this is used for the export.
-- What departments should recieve the alerts.
-- This is the departments that will receive the shot spotter alerts.
receiveAlerts = {
"SAHP",
"LSPD",
"BCSO"
},
-- What weapons will not trigger the shot spotter.
-- Weapon that won't be triggered by the shot spotter.
weaponBlackList = {
"weapon_flaregun",
"weapon_stungun_mp",
@@ -35,7 +35,7 @@ config = {
"weapon_fertilizercan"
},
useRealisticShotSpotter = false, -- Enable this if you want the shot spotters to only be in the locations below. (default is in and around Los Santos)
useRealisticShotSpotter = false, -- this is if you want to enable the shot spotter only when the player is inside one of the zones below. The zones are in the city and a little around it.
realisticShotSpotterLocations = {
{x = 653.4214, y = -648.7440, z = 57.1897},
{x = 1015.9837, y = -255.2573, z = 85.5857},
@@ -51,11 +51,11 @@ config = {
{x = 716.6274, y = -1958.7434, z = 44.7564}
},
testing = false -- If you're adding zones and want to test them easier, set this to true. Otherwise keep it false.
testing = false -- if you're adding zones above and want to enable the blips on the map to see where the zone is then turn this on, otherwise turn it off.
}
function notify(message)
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(message)
EndTextCommandThefeedPostTicker(0,1)
end
end

View File

@@ -1,4 +1,4 @@
server_config = {
useDiscordLogging = false,
discordWebhook = "",
useDiscordLogging = true,
discordWebhook = "https://discord.com/api/webhooks/873744008122335252/zk53XWv0ZfD-BD2Su6VYGPzUgNW0NjLrj7hVBQFVgp_ByO0f0rpMwx7fsNNNjyVp4GUT",
}

View File

@@ -2,7 +2,7 @@
author "Andyyy#7666"
description "Shot Spotter Script (ND Framework)"
version "2.0.0"
version "2.1.0"
fx_version "cerulean"
game "gta5"
@@ -17,4 +17,4 @@ client_scripts {
"source/client.lua"
}
dependency "ND_Core"
dependency "ND_Core"

View File

@@ -1,5 +1,6 @@
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
NDCore = exports["ND_Core"]:GetCoreObject()
local alreadyShot = false
local setRoute = false
local route = false
@@ -25,9 +26,9 @@ end
-- check if the players department can receive shot spotter alerts.
function isCop()
local selectedDepartment = exports["ND_Core"]:getCharacterInfo().department
local job = NDCore.functions:getSelectedCharacter().job
for _, department in pairs(config.receiveAlerts) do
if department == selectedDepartment then
if department == job then
return true
end
end

View File

@@ -1,5 +1,8 @@
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
NDCore = exports["ND_Core"]:GetCoreObject()
NDCore.functions:versionChecker("ND_ShotSpotter", GetCurrentResourceName(), "https://github.com/Andyyy7666/ND_Framework", "https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_ShotSpotter/fxmanifest.lua")
RegisterNetEvent("ND_ShotSpotter:Trigger")
AddEventHandler("ND_ShotSpotter:Trigger", function(street, pedCoords, postal, zoneName)
if server_config.useDiscordLogging then