Ghmattibanking 1.1.2

dev
mysql
standalone
bank

#54

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.


#55

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


#56

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.


#57

Very nice release! Good job :smiley:


#58

EDIT

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


#59

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

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


#60

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.


#61

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.


#62

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.


#63

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


#64

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.

#65

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.


#66

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.


#67

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


#68

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


#69

@zr0iq

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


#70

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.