From 45c568cf5faa7bcf5aa7e8650ea57b48db6a114a Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Sat, 24 Sep 2022 21:38:36 +0200 Subject: [PATCH] Delete ND_Banks directory --- ND_Banks/fxmanifest.lua | 22 ---- ND_Banks/source/client.lua | 187 --------------------------- ND_Banks/source/server.lua | 20 --- ND_Banks/source/ui/index.html | 46 ------- ND_Banks/source/ui/script.js | 136 ------------------- ND_Banks/source/ui/style.css | 237 ---------------------------------- 6 files changed, 648 deletions(-) delete mode 100644 ND_Banks/fxmanifest.lua delete mode 100644 ND_Banks/source/client.lua delete mode 100644 ND_Banks/source/server.lua delete mode 100644 ND_Banks/source/ui/index.html delete mode 100644 ND_Banks/source/ui/script.js delete mode 100644 ND_Banks/source/ui/style.css diff --git a/ND_Banks/fxmanifest.lua b/ND_Banks/fxmanifest.lua deleted file mode 100644 index 27118dc..0000000 --- a/ND_Banks/fxmanifest.lua +++ /dev/null @@ -1,22 +0,0 @@ --- For support join my discord: https://discord.gg/Z9Mxu72zZ6 - -author "Andyyy#7666, N1K0#0001" -description "ND Framework Banks" -version "2.1.0" - -fx_version "cerulean" -game "gta5" -lua54 "yes" - -ui_page "source/ui/index.html" - -files { - "source/ui/index.html", - "source/ui/script.js", - "source/ui/style.css" -} - -server_script "source/server.lua" -client_script "source/client.lua" - -dependency "ND_Core" \ No newline at end of file diff --git a/ND_Banks/source/client.lua b/ND_Banks/source/client.lua deleted file mode 100644 index 17f7a26..0000000 --- a/ND_Banks/source/client.lua +++ /dev/null @@ -1,187 +0,0 @@ --- For support join my discord: https://discord.gg/Z9Mxu72zZ6 - -NDCore = exports["ND_Core"]:GetCoreObject() -local display = false -local nearModel = false - -local banks = { - { - ["coords"] = vector3(1175.77, 2706.89, 38.09), -- harmony fleeca bank - ["name"] = "Fleeca Bank" - }, - { - ["coords"] = vector3(149.23, -1040.57, 29.36), -- legion square fleeca bank - ["name"] = "Fleeca Bank" - }, - { - ["coords"] = vector3(-2962.53, 482.25, 15.69), -- great ocean hwy fleeca bank - ["name"] = "Fleeca Bank" - }, - { - ["coords"] = vector3(-112.02, 6469.13, 31.62), -- paleto bay bank - ["name"] = "Blaine County Savings Bank" - }, - { - ["coords"] = vector3(-351.56, -49.70, 49.02), -- burton hawick fleeca bank - ["name"] = "Fleeca Bank" - }, - { - ["coords"] = vector3(313.66, -278.90, 54.16), -- alta hawick fleeca bank - ["name"] = "Fleeca Bank" - }, - { - ["coords"] = vector3(-1213.08, -330.93, 37.77), -- rockford hills fleeca bank - ["name"] = "Fleeca Bank" - } -} - -local days = { - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -} - --- Get the time -function getTime() - local hours = GetClockHours() - local minutes = GetClockMinutes() - if hours <= 9 then - hours = "0" .. hours - end - if minutes <= 9 then - minutes = "0" .. minutes - end - return hours .. ":" .. minutes -end - --- Hide/Show ui -function SetDisplay(bool) - local selectedCharacter = NDCore.Functions.GetSelectedCharacter() - display = bool - SetNuiFocus(bool, bool) - SendNUIMessage({ - status = bool, - playerName = selectedCharacter.firstName .. " " .. selectedCharacter.lastName, - balance = "Account Balance: $" .. selectedCharacter.bank .. ".00", - date = days[GetClockDayOfWeek() + 1], - time = getTime() - }) -end - -function drawText3D(coords, text) - local onScreen, _x, _y = GetScreenCoordFromWorldCoord(coords.x, coords.y, coords.z + 0.3) - local pX, pY, pZ = table.unpack(GetGameplayCamCoords()) - SetTextScale(0.4, 0.4) - SetTextFont(4) - SetTextProportional(1) - SetTextEntry("STRING") - SetTextCentre(true) - SetTextColour(255, 255, 255, 255) - SetTextOutline() - AddTextComponentString(text) - DrawText(_x, _y) -end - --- check if ped is close to a bank coordinate. -function inRange(ped) - playerCoords = GetEntityCoords(ped) - for _, bank in pairs(banks) do - if (#(playerCoords - bank.coords)) < 1.5 then - return bank.coords - end - end - return false -end - -Citizen.CreateThread(function() - while true do - Citizen.Wait(500) - ped = PlayerPedId() - nearModel = inRange(ped) - end -end) - -Citizen.CreateThread(function() - while true do - Citizen.Wait(0) - if not display and nearModel then - drawText3D(nearModel, "~w~Press ~g~E ~w~to use the bank") - if IsControlJustPressed(0, 51) then - SetDisplay(true) - TriggerScreenblurFadeIn(1000) - end - end - end -end) - -CreateThread(function() - for _, blips in ipairs(banks) do - local blip = AddBlipForCoord(blips.coords) - SetBlipSprite(blip, 431) - SetBlipColour(blip, 2) - SetBlipScale(blip, 1.0) - SetBlipAsShortRange(blip, true) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString(blips.name) - EndTextCommandSetBlipName(blip) - end -end) - --- close the ui. -RegisterNUICallback("close", function(data) - PlaySoundFrontend(-1, "PIN_BUTTON", "ATM_SOUNDS", 1) - SetDisplay(false) - TriggerScreenblurFadeOut(1000) -end) - --- makes a button sount for when the ui is clicked. -RegisterNUICallback("sound", function(data) - PlaySoundFrontend(-1, "PIN_BUTTON", "ATM_SOUNDS", 1) -end) - --- deposit/withdraw -RegisterNUICallback("useATM", function(data) - local action = string.gsub(data.action, " ", "") - if action == "WITHDRAW" then - if data.amount == "" then - Citizen.Wait(1000) - SendNUIMessage({ - success = false - }) - return - end - TriggerServerEvent("ND_Banks:withdraw", data.amount) - elseif action == "DEPOSIT" then - if data.amount == "" then - Citizen.Wait(1000) - SendNUIMessage({ - success = false - }) - return - end - TriggerServerEvent("ND_Banks:deposit", data.amount) - elseif action == "TRANSFER" then - if data.transferAmount == "" or data.transferTarget == "" then - Citizen.Wait(1000) - SendNUIMessage({ - success = false - }) - return - end - TriggerServerEvent("ND_Banks:transfer", data.transferAmount, data.transferTarget) - end -end) - --- update the balance on the ui and confirm if the deposit/withdraw was successful. -RegisterNetEvent("ND_Banks:update", function(status) - Citizen.Wait(1000) - local selectedCharacter = NDCore.Functions.GetSelectedCharacter() - SendNUIMessage({ - balance = "Account Balance: $" .. selectedCharacter.bank .. ".00", - success = status - }) -end) diff --git a/ND_Banks/source/server.lua b/ND_Banks/source/server.lua deleted file mode 100644 index 09d81ba..0000000 --- a/ND_Banks/source/server.lua +++ /dev/null @@ -1,20 +0,0 @@ -NDCore = exports["ND_Core"]:GetCoreObject() -NDCore.Functions.VersionChecker("ND_Banks", GetCurrentResourceName(), "https://github.com/ND-Framework/ND_Framework", "https://raw.githubusercontent.com/ND-Framework/ND_Framework/main/ND_Banks/fxmanifest.lua") - -RegisterNetEvent("ND_Banks:withdraw", function(amount) - local player = source - local update = NDCore.Functions.WithdrawMoney(amount, player) - TriggerClientEvent("ND_Banks:update", player, update) -end) - -RegisterNetEvent("ND_Banks:deposit", function(amount) - local player = source - local update = NDCore.Functions.DepositMoney(amount, player) - TriggerClientEvent("ND_Banks:update", player, update) -end) - -RegisterNetEvent("ND_Banks:transfer", function(amount, target) - local player = source - local update = NDCore.Functions.TransferBank(amount, player, target) - TriggerClientEvent("ND_Banks:update", player, update) -end) diff --git a/ND_Banks/source/ui/index.html b/ND_Banks/source/ui/index.html deleted file mode 100644 index 4bbb15e..0000000 --- a/ND_Banks/source/ui/index.html +++ /dev/null @@ -1,46 +0,0 @@ - -
- - - - - - - -
-
-
- Welcome back
- -Are you sure you'd like to perform this action
- - -Success!
- -Failed!
- -