Ghmattibanking 1.1.2

ghmattibanking

Try #2. This time with source and license, there was a miscommunication making me believe that I needed to make it more difficult to edit the resource.

This topic is a low quality copy & pasta from the old one.

Features

  • A fully operational cash / banking system that should be able to merge into any system you like.
  • Shared Accounts between Users.
  • Multiple Accounts for Users.
  • More to come, eventually. Maybe.

Requirements

  • A newer FXServer Version
  • MariaDB 10.3.1 or newer or MySQL 5.7 / 8.x

Installation

  • Download from GitHub
  • Modify both the config.client.json and the server.client.json
  • See some errors on the first startup, as the ghmattibanking has not created the tables yet.

Previews



Bindings (Server-Side Only)

These are for account and cash management. See the wiki on github for quick examples and more details.

sign in

exports.ghmattibanking:signIn(source, username): The username is the display name that ghmattibanking uses. The username does not have to be unique, but can be an Name of a character the user you wish to sign in uses or something like that. Easiest would be exports.ghmattibanking:signin(source, GetPlayerName(source))

reward

exports.ghmattibanking:reward(source, amount, [optional: origin, purpose]) This gives the source cash or transfers money to one of his bank accounts (prefering fleeca), depending on whether origin and purpose was specified or not.

pay

The same as reward
exports.ghmattibanking:reward(source, amount, callback, [optional: origin, purpose]) works the same way as reward, but has a callback that is passed true or false whether paying has succeeded or not.

Bindings (client-side)

These bindings are just for the display of cash to suit them to your system

displayDriverCallFeed

The event gets triggered every 1.5s with the current cash and total accounts balance [params: (cash, bank)].

displayDriverCallPersistantShow

In the banking interface cash should be always displayed as seen in the previews. This event gets passed a true or false value whether it wants to permanently show cash or not.

Some Random Explanations and Rambling

You can post feature requests, but I will very likely update it as I see fit. Or maybe migrate it to MongoDB.

ghmattibanking features 3 banking interfaces (which are the same but with different styles) based on vuetify. I added most bank-buildings as banks as you can see from the maze-bank one and the maze-bank tower, mainly due to inscription.

Paletos Bank and the Pacific Standard Bank have been assigned to be Lombanks, because I did not feel like making two more interfaces.

All red atms are maze-bank atms, all purple/blue ones are Lombank ones, the others are used by Fleeca.

By default you cannot create accounts or edit them at Atms, only at banks, there is although a client-side option to avoid this behaviour.

The serverside option overdrawLimit lets you set how much your users can go into negative before the queries will error out, thus failing transactions, withdrawls. Default is 0, and unless you know what you are doing, keep it at 0.

Accounts can currently not be overcharged over that limit, and then only by the user himself, I think. Not sure if pay allows overdrawing, as of writing this. Keep it at 0.

I will probably edit this topic a lot, because there is a lot of stuff I forgot and this is pretty unordered. Also be snailsome to each other and party on.

Known Issues

  • Jerky Behaviour of the NUI sometimes. Skipping frames, sometimes not recieving the message to close, etc.

For Quick Testing

RegisterCommand('signin', function (src)
  exports.ghmattibanking:signIn(src, GetPlayerName(src));
end);

to create a command to signIn. Hopefully this works in lua.

15 Likes

Videos doesn’t work, please fix it

No idea why they work now. :man_shrugging: I edited and posted the links below in case they still do not work.

zr0iq are you a Good?? you are Jesus or?

thanks for this ressource! this will make a lot of people and devs happy. Again i hope people will thank you for this (and source code too)

10 out of 10 :stuck_out_tongue:

It doesn’t work for me :frowning:
Lot of errors in log files

1 Like

You did not do that? Usually you should get 1-2 on the first startup none on the second, given you configured the mysql access in the config.server.json correctly.

This is the last time I am blindly guessing in this topic.

I have to paste my SQL login, password etc?

Well why else would the requirements say MariaDB 10.3.1 or higher? Why else would it say to edit the config files, why else would there be fields in the config.server.json for a mysql connection?

1 Like

I paste it already and still doesn’t work. 0 errors in console :confused:

Did you read about the signin?

Will this work with vRP?

@zr0iq do not pay attention to those people who don’t read you lagre explanations. i do the same. only respond to people who did efforts to put teh script work or you know they did reaad the explanations

If you get vrp/esx call the API provided by the resource. Then yes.

1 Like

If only vrp?
20 char

I wouldn’t even call ESX a Framework

1 Like

Fantastic work. Great to see a JS release!

so far so good nice work, as for quick testing in lua

RegisterCommand('signin', function (src)
    exports.ghmattibanking:signIn(src, GetPlayerName(src))
end)

is correct way

I dont know what framework you are using but i found this :

framework is a real or conceptual structure intended to serve as a support or guide for the building of something that expands the structure into something useful.

So yea esx is a framework for me. And why your statement if it has nothing to do with the topic :thinking:

And for everyone please read what the author has written before asking questions

Is there a proper way to take money? I’ve been messing around with it for awhile. The documentation isn’t that helpful.

@zr0iq

Disregard. The documentation was confusing but I figured it out.

Edit:

After literally hours of attempting to get this to work I am extremely disappointed in it. The documentation is nearly non-existent and the little that is there is incorrect. This system is a hit or miss. Sometimes it works and sometimes it doesn’t. It seems to work with 2-4 people. Putting it on my community everything breaks; connection timeouts, too many errors to count. This isn’t just one database either. From what other communities in my discord are saying is that they’re having similar issues.

From the testing I’ve done it seems amazing but as soon as it is throwing onto a public server it breaks. You have a good release here but I think it needs some work.