mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
Merge pull request #598 from roadtosixx/main
fix(esx_banking): Pin set to 0000 and ATM fix ( open everywhere )
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user