From 350a99732a6259372e1b339af15c5142bfd99503 Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Sat, 24 Sep 2022 21:40:46 +0200 Subject: [PATCH] Delete ND_Chat directory --- ND_Chat/config.lua | 26 --------- ND_Chat/fxmanifest.lua | 14 ----- ND_Chat/source/client.lua | 49 ---------------- ND_Chat/source/server.lua | 119 -------------------------------------- 4 files changed, 208 deletions(-) delete mode 100644 ND_Chat/config.lua delete mode 100644 ND_Chat/fxmanifest.lua delete mode 100644 ND_Chat/source/client.lua delete mode 100644 ND_Chat/source/server.lua diff --git a/ND_Chat/config.lua b/ND_Chat/config.lua deleted file mode 100644 index 10e59ef..0000000 --- a/ND_Chat/config.lua +++ /dev/null @@ -1,26 +0,0 @@ -config = { - ["/me"] = true, - ["/gme"] = true, - ["/ooc"] = true, - ["/twt"] = true, - ["/pay"] = true, - ["/give"] = true, - ["/darkweb"] = { - enabled = true, - canNotSee = { - "LSPD", - "BCSO", - "SAHP", - "LSFD" - } - }, - ["/911"] = { - enabled = true, - callTo = { - "LSPD", - "BCSO", - "SAHP", - "LSFD" - } - } -} diff --git a/ND_Chat/fxmanifest.lua b/ND_Chat/fxmanifest.lua deleted file mode 100644 index 6375dcf..0000000 --- a/ND_Chat/fxmanifest.lua +++ /dev/null @@ -1,14 +0,0 @@ --- For support join my discord: https://discord.gg/Z9Mxu72zZ6 -author "Andyyy#7666, N1K0#0001" -description "ND Chat commands" -version "2.2.0" - -fx_version "cerulean" -game "gta5" -lua54 "yes" - -shared_script "config.lua" -client_script "source/client.lua" -server_script "source/server.lua" - -dependency "ND_Core" diff --git a/ND_Chat/source/client.lua b/ND_Chat/source/client.lua deleted file mode 100644 index 1190d89..0000000 --- a/ND_Chat/source/client.lua +++ /dev/null @@ -1,49 +0,0 @@ -NDCore = exports["ND_Core"]:GetCoreObject() - -if config["/me"] then - TriggerEvent("chat:addSuggestion", "/me", "Send message in the third person (Proximity).", {{ name="Action", help="Describe your action."}}) -end - -if config["/gme"] then - TriggerEvent("chat:addSuggestion", "/gme", "Send message in the third person (Global).", {{ name="Action", help="Describe your action."}}) -end - -if config["/ooc"] then - TriggerEvent("chat:addSuggestion", "/ooc", "Out of Character chat message (Global).", {{name="Message", help="Put your questions or help request."}}) -end - -if config["/twt"] then - TriggerEvent("chat:addSuggestion", "/twt", "Send a Twotter in game. (Global)", {{name="Message", help="Twotter Message."}}) -end - -if config["/darkweb"].enabled then - TriggerEvent("chat:addSuggestion", "/darkweb", "Send a anonymous message in game (Global).", {{ name="Message", help=""}}) -end - -if config["/911"].enabled then - RegisterNetEvent("ND_Chat:911", function(coords, callDescription) - local selectedCharacter - NDCore.Functions.GetSelectedCharacter(function(character) - selectedCharacter = character - end) - for _, department in pairs(config["/911"].callTo) do - if selectedCharacter.job == department then - local location = GetStreetNameFromHashKey(GetStreetNameAtCoord(coords.x, coords.y, coords.z)) - TriggerEvent("chat:addMessage", { - color = {255, 0, 0}, - args = {"^*[911] ^3Location: " .. location .. " ^1| Call infomation^0", callDescription} - }) - local blip = AddBlipForCoord(coords.x, coords.y, coords.z) - SetBlipSprite(blip, 817) - SetBlipAsShortRange(blip, true) - BeginTextCommandSetBlipName("STRING") - SetBlipColour(blip, 1) - AddTextComponentString("911 CALL: " .. location) - EndTextCommandSetBlipName(blip) - Citizen.Wait(60 * 1000) - RemoveBlip(blip) - break - end - end - end) -end diff --git a/ND_Chat/source/server.lua b/ND_Chat/source/server.lua deleted file mode 100644 index f7345f7..0000000 --- a/ND_Chat/source/server.lua +++ /dev/null @@ -1,119 +0,0 @@ -NDCore = exports["ND_Core"]:GetCoreObject() -NDCore.Functions.VersionChecker("ND_Chat", GetCurrentResourceName(), "https://github.com/ND-Framework/ND_Framework", "https://raw.githubusercontent.com/ND-Framework/ND_Framework/main/ND_Chat/fxmanifest.lua") - -if config["/me"] then - RegisterCommand("me", function(source, args, rawCommand) - local player = source - local players = NDCore.Functions.GetPlayers() - local playerCoords = GetEntityCoords(GetPlayerPed(player)) - for serverPlayer, _ in pairs(players) do - local targetCoords = GetEntityCoords(GetPlayerPed(serverPlayer)) - if (#(playerCoords - targetCoords) < 20.0) then - TriggerClientEvent("chat:addMessage", serverPlayer, { - color = {255, 0, 0}, - args = {"^*ME | ^0" .. players[player].firstName .. " " .. players[player].lastName .. " (#" .. player .. ")", table.concat(args, " ")} - }) - end - end - end, false) -end - -if config["/gme"] then - RegisterCommand("gme", function(source, args, rawCommand) - local player = source - local players = NDCore.Functions.GetPlayers() - TriggerClientEvent("chat:addMessage", -1, { - color = {255, 0, 0}, - args = {"^*GME | ^0" .. players[player].firstName .. " " .. players[player].lastName .. " (#" .. player .. ")", table.concat(args, " ")} - }) - end, false) -end - -if config["/ooc"] then - RegisterCommand("ooc", function(source, args, rawCommand) - local player = source - TriggerClientEvent("chat:addMessage", -1, { - color = {150, 150, 150}, - args = {"^*OOC | ^0" .. GetPlayerName(player) .. " (#" .. player .. ")", table.concat(args, " ")} - }) - end, false) -end - -if config["/twt"] then - RegisterCommand("twt", function(source, args, rawCommand) - local player = source - local players = NDCore.Functions.GetPlayers() - TriggerClientEvent("chat:addMessage", -1, { - template = " {0}: {1}", - multiline = true, - args = {"^4@" .. players[player].twt .. " (#" .. player .. ")", table.concat(args, " ")} - }) - end, false) -end - -if config["pay"] then - RegisterCommand("pay", function(source, args, rawCommand) - local player = source - local target = tonumber(args[1]) - local amount = tonumber(args[2]) - if target and amount ~= nil then - NDCore.Functions.TransferBank(amount, player, target) - else - -- Wrong syntax, it's /pay - TriggerClientEvent('chatMessage', source, '^1ERROR: Wrong usage. /pay ') - end - - end, false) -end - -if config["give"] then - RegisterCommand("give", function(source, args, rawCommand) - local player = source - local amount = tonumber(args[1]) - if amount ~= nil then - NDCore.Functions.GiveCashToNearbyPlayer(player, amount) - else - -- Wrong syntax, it's /give - TriggerClientEvent('chatMessage', source, '^1ERROR: Wrong usage. /give ') - end - end, false) -end - - -function hasDarkWebPermission(player, players, args) - for _, department in pairs(config["/darkweb"].canNotSee) do - if players[player].job == department then - TriggerClientEvent("chat:addMessage", player, { - color = {255, 0, 0}, - args = {"^*Error", players[player].job .. " cannot access this command."} - }) - return false - end - end - for serverPlayer, playerInfo in pairs(players) do - for _, department in pairs(config["/darkweb"].canNotSee) do - if playerInfo.job == department then - return false - end - end - TriggerClientEvent("chat:addMessage", serverPlayer, { - color = {0, 0, 0}, - args = {"^*Dark web | ^0Anonymous (#" .. player .. ")", table.concat(args, " ")} - }) - end -end - -if config["/darkweb"].enabled then - RegisterCommand("darkweb", function(source, args, rawCommand) - local player = source - local players = NDCore.Functions.GetPlayers() - hasDarkWebPermission(player, players, args) - end, false) -end - -if config["/911"].enabled then - RegisterCommand("911", function(source, args, rawCommand) - local player = source - TriggerClientEvent("ND_Chat:911", -1, GetEntityCoords(GetPlayerPed(player)), table.concat(args, " ")) - end, false) -end