From 48c5bf69ac26a5754b79b367c7e4ef18e061fe18 Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Fri, 8 Jul 2022 23:17:07 +0200 Subject: [PATCH] Delete server.lua --- ND_ShotSpotter/server.lua | 48 --------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 ND_ShotSpotter/server.lua diff --git a/ND_ShotSpotter/server.lua b/ND_ShotSpotter/server.lua deleted file mode 100644 index 86b12fd..0000000 --- a/ND_ShotSpotter/server.lua +++ /dev/null @@ -1,48 +0,0 @@ --- For support join my discord: https://discord.gg/Z9Mxu72zZ6 - -expectedName = "ND_ShotSpotter" -- This is the resource and is not suggested to be changed. -resource = GetCurrentResourceName() - --- check if resource is renamed -if resource ~= expectedName then - print("^1[^4" .. expectedName .. "^1] WARNING^0") - print("Change the resource name to ^4" .. expectedName .. " ^0or else it won't work!") -end - --- check if resource version is up to date -PerformHttpRequest("https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_ShotSpotter/fxmanifest.lua", function(error, res, head) - i, j = string.find(tostring(res), "version") - res = string.sub(tostring(res), i, j + 6) - res = string.gsub(res, "version ", "") - res = string.gsub(res, '"', "") - resp = tonumber(res) - verFile = GetResourceMetadata(expectedName, "version", 0) - - if verFile then - if tonumber(verFile) < resp then - print("^1[^4" .. expectedName .. "^1] WARNING^0") - print("^4" .. expectedName .. " ^0is outdated. Please update it from ^5https://github.com/Andyyy7666/ND_Framework ^0| Current Version: ^1" .. verFile .. " ^0| New Version: ^2" .. resp .. " ^0|") - elseif tonumber(verFile) > tonumber(resp) then - print("^1[^4" .. expectedName .. "^1] WARNING^0") - print("^4" .. expectedName .. "s ^0version number is higher than we expected. | Current Version: ^3" .. verFile .. " ^0| Expected Version: ^2" .. resp .. " ^0|") - else - print("^4" .. expectedName .. " ^0is up to date | Current Version: ^2" .. verFile .. " ^0|") - end - else - print("^1[^4" .. expectedName .. "^1] WARNING^0") - print("You may not have the latest version of ^4" .. expectedName .. "^0. A newer, improved version may be present at ^5https://github.com/Andyyy7666/ND_Framework^0") - end -end) - -RegisterNetEvent("ND:shotSpotterActive") -AddEventHandler("ND:shotSpotterActive", function(pedCoords, postal) - TriggerClientEvent("ND:shotSpotterReport", -1, pedCoords, postal) -end) - -RegisterNetEvent("ND:getDept") -AddEventHandler("ND:getDept", function() - local players = exports["ND_Core"]:getCharacterTable() - for k, v in pairs(players) do - TriggerClientEvent("ND:returnDept", k, players[k].dept) - end -end)