mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 14:26:03 +01:00
Updated 2.1.0
Updated everything to new format, N1K0 is about to work on some more stuff.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
author "Andyyy#7666"
|
||||
description "ND Framework Banks"
|
||||
version "2.0.0"
|
||||
version "2.1.0"
|
||||
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
@@ -17,4 +17,6 @@ files {
|
||||
}
|
||||
|
||||
server_script "source/server.lua"
|
||||
client_script "source/client.lua"
|
||||
client_script "source/client.lua"
|
||||
|
||||
dependency "ND_Core"
|
||||
@@ -1,5 +1,6 @@
|
||||
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
|
||||
|
||||
NDCore = exports["ND_Core"]:GetCoreObject()
|
||||
local display = false
|
||||
local nearModel = false
|
||||
|
||||
@@ -38,13 +39,13 @@ end
|
||||
|
||||
-- Hide/Show ui
|
||||
function SetDisplay(bool)
|
||||
local playerInfo = exports["ND_Core"]:getCharacterInfo()
|
||||
local selectedCharacter = NDCore.functions:getSelectedCharacter()
|
||||
display = bool
|
||||
SetNuiFocus(bool, bool)
|
||||
SendNUIMessage({
|
||||
status = bool,
|
||||
playerName = playerInfo.firstName .. " " .. playerInfo.lastName,
|
||||
balance = "Account Balance: $" .. playerInfo.bank .. ".00",
|
||||
playerName = selectedCharacter.firstName .. " " .. selectedCharacter.lastName,
|
||||
balance = "Account Balance: $" .. selectedCharacter.bank .. ".00",
|
||||
date = days[GetClockDayOfWeek() + 1],
|
||||
time = getTime()
|
||||
})
|
||||
@@ -145,9 +146,9 @@ end)
|
||||
RegisterNetEvent("ND_Banks:update")
|
||||
AddEventHandler("ND_Banks:update", function(status)
|
||||
Citizen.Wait(1000)
|
||||
local playerInfo = exports["ND_Core"]:getCharacterInfo()
|
||||
local selectedCharacter = NDCore.functions:getSelectedCharacter()
|
||||
SendNUIMessage({
|
||||
balance = "Account Balance: $" .. playerInfo.bank .. ".00",
|
||||
balance = "Account Balance: $" .. selectedCharacter.bank .. ".00",
|
||||
success = status
|
||||
})
|
||||
end)
|
||||
@@ -1,20 +1,23 @@
|
||||
NDCore = exports["ND_Core"]:GetCoreObject()
|
||||
NDCore.functions:versionChecker("ND_Banks", GetCurrentResourceName(), "https://github.com/Andyyy7666/ND_Framework", "https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_Banks/fxmanifest.lua")
|
||||
|
||||
RegisterNetEvent("ND_Banks:withdraw")
|
||||
AddEventHandler("ND_Banks:withdraw", function(amount)
|
||||
local player = source
|
||||
local update = exports["ND_Core"]:withdrawMoney(amount, player)
|
||||
local update = NDCore.functions:withdrawMoney(amount, player)
|
||||
TriggerClientEvent("ND_Banks:update", player, update)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("ND_Banks:deposit")
|
||||
AddEventHandler("ND_Banks:deposit", function(amount)
|
||||
local player = source
|
||||
local update = exports["ND_Core"]:depositMoney(amount, player)
|
||||
local update = NDCore.functions:depositMoney(amount, player)
|
||||
TriggerClientEvent("ND_Banks:update", player, update)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("ND_Banks:transfer")
|
||||
AddEventHandler("ND_Banks:transfer", function(amount, target)
|
||||
local player = source
|
||||
local update = exports["ND_Core"]:transferBank(amount, player, target)
|
||||
local update = NDCore.functions:transferBank(amount, player, target)
|
||||
TriggerClientEvent("ND_Banks:update", player, update)
|
||||
end)
|
||||
Reference in New Issue
Block a user