rF_ATM is a FiveM resource that brings the original GTA V ATM to FiveM servers.
As this resource is not linked to a framework, you may have to alter the database values on the server file to match your framework.
- mysql-async
To use this on your server it is likely that you will have to adjust the config, or for alternate database structures, adjust the server file itself.
The server file should be self explanatory as the events are explained below. It is also possible to delete my server file and simply handle these events in your own framework.
ATM Locations need not be defined by the server owner because the script will recognize ATMs from object hashes that I have provided. ATM hashes may be added or deleted in the client file.
This resource will attempt to access a database table containing an identifying element for users (like a steamid or discordid) and then access their bank and cash values. If these values are not stored in the same row in a table, you will have to edit the SQL queries. Additionally, this resource needs a table that can hold transaction data. I have provided an .sql file in this resource to help define both tables necessary, however the provided user table will not work unless connected to your server's framework.
At this time, there is no translation support other than going through the client file and changing text.
Sent each time a player makes a client side transaction on an ATM.
- Verifies that the transaction is possible given the player's current bank and cash values.
- Updates database table to reflect new bank and cash values for the player.
- Creates a database entry for the transaction.
- Sends the player's client an event (
rF_ATM:TransactionSuccess
) to signal that the transaction was successful and to update the player's ATM values (bank, cash, transaction).
Sent when the client script initializes.
- Fetches bank, cash and transaction values from the database.
- Sends the player's client two events (
rF_ATM:SetMoney
,rF_ATM:SetMoney
) to initialize the client's ATM values (bank, cash, transaction).
rF_ATM:TransactionSuccess - Server to Client - Params(rF_BankAmount, rF_CashAmount, rF_TransactionJSON)
Sent when the server verifies a transaction.
- Sets
rF_PlayerBank
andrF_PlayerCash
to reflect the values from the server. - Adds the given transaction to the transactions table,
rF_Transactions
.