The script will go through the ATM models that are listed in the config file and see if there is one near you, if there is it will open the UI if there isn’t nothing will happen.
All the transactions (withdraws, deposits, transfers) you make are going to be saved in the database and you can see them inside of the ‘transactions’ page on the ATM.
Commands:
/atm - Open the ATM UI when near any ATM
/atmclose - If you ever get stuck in the UI you can type in atmclose in the console (F8) and it should close it
As of version 1.1.0 you can now toggle E in the config, which enables or disables the ability to press E next to an ATM to open it.
Tested on ESX version V1 Final - I’m not sure if it’s going to work on older versions, most likely not. You would have to change the way the identifiers and money functions are in the server script, shouldn’t be too difficult but I will offer no support in it.
Absolutely, you could register a key mapping and make the command execute when the button is pressed, I’m not planning on adding anything to the script anymore but you feel free to edit it yourself if you want!
Thanks mate,
I am not really sure about it working with GCPhone, it should as it just pulls the data from the database as far as I know, but don’t hold me on that.
Good work thank you, I’ll be using it. I added this to my client.lua - credit Bazookan
Citizen.Wait(100)
while true do
local sleep = 1000
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
for i = 1, #Config.Models do
local x = GetClosestObjectOfType(playerCoords, 1.0, GetHashKey(Config.Models[i]), false, false, false)
local entity = nil
if DoesEntityExist(x) then
sleep = 5
entity = x
atm = GetEntityCoords(entity)
drawText3D(atm.x, atm.y, atm.z + 2, 'Press [~g~E~s~] to use the ATM ~s~')
if IsControlJustReleased(0, 38) then
TriggerEvent('luke_atm:ATMCheck')
end
break
else
sleep = 1000
end
end
Citizen.Wait(sleep)
end
end)
drawText3D = function(x, y, z, text)
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
local px,py,pz=table.unpack(GetGameplayCamCoords())
local scale = 0.50
if onScreen then
SetTextScale(scale, scale)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextOutline()
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
end
end```