Merge pull request #598 from roadtosixx/main

fix(esx_banking): Pin set to 0000 and ATM fix ( open everywhere )
This commit is contained in:
Benzo
2022-10-29 17:31:58 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -172,11 +172,11 @@ local function StartThread()
PedHandler(closestPed)
end
if not isInMenu and IsPedOnFoot(PlayerPedId()) then
if IsPedOnFoot(PlayerPedId()) then
local closestBank = {}
for i = 1, #Config.AtmModels do
local atm = GetClosestObjectOfType(_GetEntityCoords, 3.0, Config.AtmModels[i], false)
local atm = GetClosestObjectOfType(_GetEntityCoords, 8.0, Config.AtmModels[i], false)
if atm ~= 0 then
local atmOffset = GetOffsetFromEntityInWorldCoords(atm, 0.0, -0.7, 0.0)
local atmHeading = GetEntityHeading(atm)
+2 -2
View File
@@ -48,7 +48,7 @@ AddEventHandler('esx_banking:doingType', function(typeData)
end
amount = ESX.Math.Round(amount)
if amount == nil or amount <= 0 then
if amount == nil or (not typeData.pincode and amount <= 0) then
TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_amount'), "error")
else
if typeData.deposit and amount <= money then
@@ -79,7 +79,7 @@ AddEventHandler('esx_banking:doingType', function(typeData)
TriggerClientEvent("esx:showNotification", source,
TranslateCap(string.format('%s_money', key), amount, typeData.transfer.playerId), "success")
else
TriggerClientEvent("esx:showNotification", source, TranslateCap(string.format('%s_money', key), amount), "success")
TriggerClientEvent("esx:showNotification", source, TranslateCap(string.format('%s_money', key), typeData.pincode and (string.format("%04d", amount)) or amount), "success")
end
if not typeData.pincode then
BANK.LogTransaction(source, string.upper(key), amount, bankMoney)