Ghmattibanking 1.1.2

even with a dependency to ghmattibanking?

because that would be super odd. as I know at least 2 people who did not need it, excluding me.

ill recheck everything and give you a report and steps to reproduce it, i am also running one of the latest server versions and it has been acting weird with allot of stuff

That would be good. Because I will start refining it soon.

Gonna probably make it compatible with some other versions of mysql. MariaDB 10.1 will be always excluded due to the limits on the index size.

Very nice release! Good job :smiley:

EDIT

disregard, found error was an error on my side accidentally left a ‘;’ in place when converted to lua and failed out code

Works fine for me. I just tried it on lua in a different resource.

Guess I was too late answering. Nice you found it.

I’m still very confused. I understand I don’t need to do anything with the database, and that the export thing is already there. (I hope if would be considering the obvious) On my server the resource has no errors at all, but when you get in game it does not work. I hate to be a nuisance, but I’m missing something very crucial. I don’t know exactly what to do with the signIn code. Some Guidance on that would be nice. Once again I appreciate all the help.

You need to call the signin export once per character that joined with their character name and their source.

You cannot do that on connecting, because you need a proper source.

Update to 1.0.1

  • Changed from mysql2 to mysql, which makes the entire library smaller, but also a bit slower on queries.
  • Removed unneeded dependencies.

I wanted to push more, but due to afk-issues I have I could not test thoroughly if anything breaks. So this will have to do for now.

This should increase the overall stability. I might write a migration guide at some point from the normal essentialmode / whatever esx uses and vrp.

1 Like

great thank you ! this will help a lot of people that are not common whith mysql2

Update to 1.1.0

  • Rewrote the entire backend, which uses now smaller faster queries. Which will also run with other databases than just MariaDB 10.3; Namely the Oracle MySQL versions. I am not really certain if lower versions of MariaDB can be supported right now. You can try on 10.2. I am certain 10.1 will still error out (index issue).
  • Breaking Change Caching is done by the FXServer now, thus the two caching tables are no longer needed.
  • Breaking Change Added an Account Limit (Default 3), currently server-side only.
  • Breaking Change By default your first account gets money on reward with purpose.
  • Breaking Change On pay every single account is tried first before trying to pay with cash on pay.
  • Breaking Change The display event is only called on change.

TODO:

  • Add a method to fine people, so the overdraw limit is ignored.
  • Signing in with one character and then the second without changing the source might break stuff at the moment.
  • Write some drop-in replacement for some frameworks? ESX?
  • Externalize the data for the bank locations, maybe. Currently changing those requires a recompile.
1 Like

Update to 1.1.1

  • Added a fine export, to ignore overdraw limit, so you can fine people into negative balances.
  • Fixed the multi-character signin.

The fine export works the following way:

exports('fine', (src, amount, recipient, purpose, [callback]))

e.g.

exports.ghmattibanking:fine(src, 30000, 'LSPD', 'Traffic Ticket', function (res)
    print("Fine successful: " .. res)
end)

edit: res is the outstanding money that could not be paid, e.g. if the user has no accounts and only cash.

1 Like

Update to 1.1.2

  • Made it work for Linux
  • Feature Transaction table is now browsable (see preview)
  • Fixed: You could edit any account you had access to, whether you where the owner or not. Only owners can edit now.
  • Fixed: When the access to an account was removed, the account would not be removed from the accessible accounts.
  • maxNumberOfAccounts is also now a config option client-side. The server-side option is actually enforced. The client-side one only disable the button.
  • Fixed the usage of GetEntityCoords, which had no real effect anyways, but I still fixed it.
  • Fixed not using the locale for displaying the openmenu string.
  • Removed some unused variables.

Preview

edit: Updating the wiki so it contains the new bindings plus some better examples.

Hi,

ive added the script , and all my banks are gone only 1 i can find and if i go inside i cant do anything.?

help

You did not use the sign in. Please read the instructions to use the api-bindings.

@zr0iq

Do you have a video of can you help , i dont understand how to uuse the Sign in.

Call it whenever someone spawns into the server or their character ( if you have characters). See the example in the original post or the wiki.

Add all information user, password, etc, and not working in my VRPEX, please help me.

Blockquote
Error loading script server.js in resource agenciabancos: TypeError: Cannot read property ‘mysqlUser’ of null
stack:
TypeError: Cannot read property ‘mysqlUser’ of null
at Object.exports.BIG5_CHINESE_CI (server.js:8:75719)
at webpack_require (server.js:1:245)
at Object.exports.EE_CANTCREATEFILE (server.js:8:136336)
at webpack_require (server.js:1:245)
at Object.exports.EE_CANTCREATEFILE (server.js:8:133125)
at webpack_require (server.js:1:245)
at server.js:1:1610
at server.js:1:1658
Failed to load script server.js.


Does anyone know how to solve it?

Install MySQL or MariaDB with these version numbers (or higher)