[ESX] Onyx Banking (orp-banking)

Screenshot_1

not good

Feel free to use something else :slight_smile:

Probably there’s something wrong with yours. The max that mine hits is 0.08ms and it’s less than the one i was using before.

orp-banking/server.lua:61: attempt to compare number with nill
if balance <= 0 or balance < tonumber(amount) or tonumber(amount) <= 0 then

Hey there!

Thanks for this nice looking bank resource. Much better than the one I had before while also quite lightweight. I did increase the wait() by 5-10 ms and it’s ms decreased while it still is responsive.

However, I do not want the players to keep remembering commands and therefore I try to make menus and keybinds for pretty much everything. Therefore, I did place the isplayernearAtm() in the first if statement like this:

if playerNearBank() and playerNearAtm() not inMenu then

This way the player can use Atms the exact same way as the other banks.
However, one issue arised with this.
When you connect to my server, right where it’s saying “Awaiting scripts”, you get for a second the prompt to “Press E to access your bank”. It’s somehow like if the script thinks for a second that you are near an atm/bank.

Is there a way that I can fix this?

And lastly, because I’m a beginner in Lua and trying to understand how it works, could you please explain to me in a few words how is it possible for your resource to know every ATM location without adding every single one’s coords? I’m just curious and would like to know.

Thanks again for your nice resource!

You might need to change this

if playerNearBank() and playerNearAtm() not inMenu then

to this

if playerNearBank() or playerNearAtm() and not inMenu then

which will allow them to be near bank or atm, but might be laggy since its calling 2 functions every 5ms

It uses GetClosestObjectOfType which gets the closest object of a certain hash, then cycles through each atm hash to find which is within 2 distance of the player

Oops, I forgot to put something on the code I mentioned above.
I already have this function as follows:

if playerNearBank() or playerNearATM() and not inMenu then

It works alright, not much lag. The “issue” is that when someone joins the server, when they get to the point that it says “Awaiting scripts” on the loading screen(bridge screen) they get an instant notification like if they are near a bank/atm (Press E to access bank). This is what I would like to solve but have no idea how.

Cant tell without seeing the loop

There you go buddy.
Im thinking about adding one more statement on:

if playerNearBank() or playerNearATM() and not inMenu then

Which will also check if the player is NOT on loadscreen but I don’t know how I can do that…

Hope you can help me out with this :smiley:

How can I change the ‘$’ to appear after the balance number?

I’m assuming you’re talking about in the bank interface itself? That would be inside index.html

change

<div class="info-label"><i class="fas fa-dollar-sign"></i>
                        <div class="balance"></div>
                    </div>

to

<div class="info-label">
                        <div class="balance"></div><i class="fas fa-dollar-sign"></i>
                    </div>

but I feel like it should be at the front.

1 Like

Are there bank scripts where the character must first create an bank account?

It works thanks. I wanted to change it because i’m using euro sign instead of dollar sign and normally euro sign comes after the value. I feel like the sign is to close to the value, how can i add a space?

this looks amazing, two questions : 1. tested with onesync, ? and 2. tested with multi character support (kashactors)?

There would be no reason it isn’t compatible for both, it still uses the same base system and currency that esx uses.

thanks for the reply, in the past i tried to upgrade to one that lets players do transfers to each other and everything worked expect that feature, ( i blamed my multi character script)

I am having the issue that when your bank account goes negative it doesnt show the minus sign in front of the amount.

everything works fine, its hows press e to access bank and /atm works but, i dont see the inserting card on screen and the bank operations. any help ?

Do you have mythic notify and progressBars?

i downloaded them both seperate, im sorry im new to this, is there something i should do or do you have a link ?