### Server Configuration Example Source: https://docs.rxscripts.xyz/scripts/general/garages/installation This example demonstrates the correct order for ensuring dependencies and the RxGarages script in your server.cfg file. Ensure dependencies like oxmysql, your chosen framework (es_extended, qb-core, or qbx_core), and fmLib are started before RxGarages. ```cfg # 1. Start oxmysql ensure oxmysql # 2. Start your framework ensure es_extended or qb-core or qbx_core # 3. Start fmLib (MUST be below frameworks, inventories & such) ensure fmLib # 4. Finally, start our asset singularly ensure RxGarages # Or, start all of our assets at once ensure [rx] ``` -------------------------------- ### Configure Server Startup Order Source: https://docs.rxscripts.xyz/scripts/general/banking/installation Ensure RxBanking and its dependencies start in the correct order in your server.cfg file. This example shows the recommended sequence for frameworks, databases, libraries, and the RxBanking script itself. ```cfg ensure es_extended or qb-core or qbx_core ensure oxmysql ensure fmLib ensure RxBanking # Or, start all of our assets at once ensure [rx] ``` -------------------------------- ### Get Account Information Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves a specific bank account using its IBAN. ```lua exports['RxBanking']:GetAccount(iban) ``` -------------------------------- ### Get Player Loan Information Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves the current active loan for a given player identifier. ```lua exports['RxBanking']:GetLoan(identifier) ``` -------------------------------- ### Get Money From Bank SQL Source: https://docs.rxscripts.xyz/scripts/general/banking/configurables Retrieves the bank balance for a given identifier from the database. It dynamically selects the correct table and columns based on the 'es_extended' resource state. ```lua function GetMoneyFromBankSQL(identifier) local table = GetResourceState('es_extended') == 'started' and 'users' or 'players' local accountsColumn = GetResourceState('es_extended') == 'started' and 'accounts' or 'money' local identifierColumn = GetResourceState('es_extended') == 'started' and 'identifier' or 'citizenid' return MySQL.query.await( string.format('SELECT JSON_UNQUOTE(JSON_EXTRACT(%s, "$.bank")) AS bank FROM %s WHERE %s = @identifier', accountsColumn, table, identifierColumn), { ['@identifier'] = identifier, } )[1].bank end ``` -------------------------------- ### Get Society Account Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves the account details for a specific society. ```lua exports['RxBanking']:GetSocietyAccount(society) ``` -------------------------------- ### Get Player Personal Account Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves a player's personal bank account, which is synchronized with the HUD and framework balance. ```lua exports['RxBanking']:GetPlayerPersonalAccount(identifier) ``` -------------------------------- ### Get Player Bank Accounts Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves all bank accounts associated with a player, with options to include authorized accounts and filter by type or count. ```lua exports['RxBanking']:GetPlayerBankAccounts(identifier, includeAuthorized, filter) ``` -------------------------------- ### Open Admin Panel (Client) Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Opens the admin panel on the player's client, if it is applicable and configured. This client-side export has no required arguments. ```lua exports['RxGarages']:OpenAdminPanel() ``` -------------------------------- ### Initialize ATM and Bank Target Zones Source: https://docs.rxscripts.xyz/scripts/general/banking/configurables Initializes target zones for ATMs and banks, supporting both OXTarget and QBTarget frameworks. Use this to set up interactive zones for players. ```lua --[[ BY RX Scripts © rxscripts.xyz --]] local function getATMTargetOpts() local opts = {} if OXTarget then opts = { { name = "Open ATM", label = "Open ATM", icon = "fas fa-money-bill", distance = Config.ATMs.openDist, canInteract = function() local ped = PlayerPedId() if not IsPedOnFoot(ped) then return false end return true end, onSelect = function(data) OpenATM() end, }, } elseif QBTarget then opts = { options = { { icon = "fas fa-money-bill", label = "Open ATM", canInteract = function() local ped = PlayerPedId() if not IsPedOnFoot(ped) then return false end return true end, action = function(entity) OpenATM() end }, }, distance = Config.ATMs.openDist, } end return opts end --@param type 'open_bank' function ShowMarker(type, coords) if type == 'open_bank' then DrawMarker(2, coords, 0, 0, 0, 0, 180.0, 0, 0.3, 0.3, 0.3, 128, 2, 49, 100, false, false, 2, true, false, false, false) end end function InitGlobalATMTarget(prop) if OXTarget then OXTarget:addModel(prop, getATMTargetOpts()) elseif QBTarget then QBTarget:AddTargetModel(prop, getATMTargetOpts()) end end local i = 0 function InitBankTargetZone(v3) if OXTarget then OXTarget:addSphereZone({ coords = v3, radius = 0.8, debug = false, drawSprite = true, options = { { icon = "fas fa-money-bill", label = "Open Bank", distance = Config.Banks.openDist, canInteract = function() local ped = PlayerPedId() if not IsPedOnFoot(ped) then return false end return true end, onSelect = function(entity) OpenBank() end } } }) elseif QBTarget then local name = 'open_bank_' .. i i = i + 1 QBTarget:AddCircleZone(name, v3, 1.0, { name = name, debugPoly = false, }, { options = { { icon = "fas fa-money-bill", label = "Open Bank", canInteract = function() local ped = PlayerPedId() if not IsPedOnFoot(ped) then return false end return true end, action = function(entity) OpenBank() end }, }, distance = Config.Banks.openDist }) end end ``` -------------------------------- ### OpenGarage Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Opens a specific garage at the player's current location. This is a client-side export. ```APIDOC ## Client Exports ### OpenGarage #### Description Opens a specific garage at the player's current location. #### Parameters - **garageName** (name, required) - Name identifier of the garage. - **garageType** ('garage'|'impound'|'shared', required) - Type of garage. - **vehicleType** ('car'|'air'|'boat', required) - Type of vehicle. - **coords** (vector3, optional) - Coordinates a taken out car gets spawned at. #### Example ```lua exports['RxGarages']:OpenGarage(garageName, garageType, vehicleType, coords) ``` ``` -------------------------------- ### Ensure RX Script in FiveM Server Source: https://docs.rxscripts.xyz/ This snippet shows how to ensure the RX script is loaded in your FiveM server configuration. It's a common practice for resource management in FiveM. ```cfg ensure [rx] ``` -------------------------------- ### Open Garage (Client) Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Open a specific garage on the client-side. This export requires the garage name, type, vehicle type, and optionally, spawn coordinates for vehicles. ```lua exports['RxGarages']:OpenGarage(garageName, garageType, vehicleType, coords) ``` -------------------------------- ### Configure Banking Resources Source: https://docs.rxscripts.xyz/scripts/general/banking/configurables Define mappings for external resources used by banking scripts. Only modify if script names have changed. ```lua --[[\n ONLY CHANGE THIS PART IF YOU HAVE RENAMED SCRIPTS SUCH AS FRAMEWORK, TARGET, INVENTORY ETC\n RENAME THE SCRIPT NAME TO THE NEW NAME\n--]] --@type table Only change these if you have changed the name of a resource Resources = { FM = { name = 'fmLib', export = 'new' }, OXTarget = { name = 'ox_target', export = 'all' }, QBTarget = { name = 'qb-target', export = 'all' }, } IgnoreScriptFoundLogs = false ShowDebugPrints = true ``` -------------------------------- ### Open Impound Menu (Client) Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Opens the impound menu on the player's client. This is a simple client-side export with no required arguments. ```lua exports['RxGarages']:OpenImpoundMenu() ``` -------------------------------- ### OpenAdminPanel Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Opens the admin panel on the player's client, if applicable. This is a client-side export. ```APIDOC ### OpenAdminPanel #### Description Opens the admin panel on the player's client, if applicable. #### Example ```lua exports['RxGarages']:OpenAdminPanel() ``` ``` -------------------------------- ### Register Server Event: rxgarages:onVehicleParked Source: https://docs.rxscripts.xyz/scripts/general/garages/events Triggered after a vehicle has been parked. Use this to handle parked vehicle data. ```lua RegisterNetEvent('rxgarages:onVehicleParked', function(playerId, plate, garageName, garageType, vehicleType, mods, owner) end) ``` -------------------------------- ### Park Vehicle (Client) Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Park the vehicle the player is currently in to a specified garage using this client-side export. Requires the garage name, type, and vehicle type. ```lua exports['RxGarages']:ParkVehicle(garageName, garageType, vehicleType) ``` -------------------------------- ### Register Account Creation Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onAccountCreated' event. This event is triggered after a new account has been successfully created. ```lua RegisterNetEvent('rxbanking:onAccountCreated', function(account) end) ``` -------------------------------- ### OpenImpoundMenu Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Opens the impound menu on the player's client. This is a client-side export. ```APIDOC ### OpenImpoundMenu #### Description Opens the impound menu on the player's client. #### Example ```lua exports['RxGarages']:OpenImpoundMenu() ``` ``` -------------------------------- ### Register Loan Creation Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onLoanCreated' event. This event is triggered after a new loan has been successfully created. ```lua RegisterNetEvent('rxbanking:onLoanCreated', function(loan) end) ``` -------------------------------- ### Banking System Configuration Source: https://docs.rxscripts.xyz/scripts/general/banking/configurables Defines global settings for the banking system, including locale, money types, and account configurations for checking and saving accounts. ```lua --[[\nBY RX Scripts © rxscripts.xyz\n--]]\n\nConfig = {}\n\nConfig.Locale = 'en'\nConfig.MoneyTypes = { -- Account names from your framework\n money = 'money',\n bank = 'bank',\n}\n\nConfig.Accounts = {\n --[[\n Checking accounts can be deposited into, withdrawn from, and transferred to other accounts\n 1 checking account is created by default for each character, extra ones can be created by the player, if max is not reached\n --]]\n checking = {\n maxAccounts = 2, -- Max checking accounts per character (including the default one, excluding society checking accounts)\n openCost = 100, -- Cost to create a new checking account\n },\n\n --[[\n Saving accounts can be transferred from & to other accounts.\n Saving accounts are not created by default, the player must create them, if max is not reached\n Saving accounts can give interest if enabled\n --]]\n saving = {\n maxAccounts = 2, -- Max saving accounts per character\n openCost = 100, -- Cost to create a new saving account\n interest = {\n enabled = true, -- Enable interest on saving accounts\n rate = 0.005, -- Interest rate (0.5%)\n interval = 1, -- Interval in hours\n }\n },\n}\n\nConfig.Cards = {\n --[[\n Setting item.enabled to true, will make the card an actual item in the inventory\n This item will then be required to be in the inventory to open the ATM for the account this card belongs to\n --]]\n item = {\n enabled = true,\n name = 'rx_card', -- Name of the item in the inventory\n },\n --[[\n Allow that everyone can open anyone's account in an ATM, as long as they have the card in their inventory.\n To enable the robbing feature, you MUST set item.enabled option to true.\n Only checking accounts can be robbed, excluding personal accounts (accounts that are used for the default bank of the player)\n --]]\n robbing = true,\n}\n\nConfig.Loans = {\n enabled = true,\n packages = {\n ["Personal Express Loan"] = {\n amount = 35000, -- Total loan amount\n interest = 4.5, -- Interest rate percentage\n days = 25, -- Duration in days\n description = "Quick access to small funds for personal expenses with minimal paperwork and fast approval." },\n ["Flexible Credit Line"] = {\n amount = 85000,\n interest = 8.75,\n days = 40,\n description = "Versatile financing solution for medium-sized projects with convenient repayment schedule." },\n ["Capital Investment Loan"] = {\n amount = 425000,\n interest = 12.25,\n days = 55,\n description = "Substantial funding for business growth and investment opportunities with competitive days." },\n ["Executive Financing Plan"] = {\n amount = 1250000,\n interest = 16.5,\n days = 75,\n description = "Premium financing package designed for major enterprises and significant capital requirements." }\n }\n}\n\nConfig.Society = {\n enabled = true, -- Enable society accounts\n accounts = {\n ['police'] = {\n requiredGrades = {\n [2] = {\n deposit = true,\n withdraw = false,\n transfer = false,\n },\n [3] = {\n deposit = true,\n withdraw = true,\n transfer = true,\n },\n }\n }\n }\n}\n\nConfig.Banks = {\n blip = {\n enabled = true,\n label = 'Bank',\n sprite = 108,\n color = 3,\n display = 2,\n scale = 0.7,\n shortrange = true,\n },\n markerDist = 5.0,\n openDist = 2.5,\n locations = {\n vector4(149.91, -1040.74, 29.374, 160),\n vector4(-1212.63, -330.78, 37.59, 210),\n vector4(-2962.47, 482.93, 15.5, 270),\n vector4(-113.01, 6470.24, 31.43, 315),\n vector4(314.16, -279.09, 53.97, 160),\n vector4(-350.99, -49.99, 48.84, 160),\n vector4(1175.02, 2706.87, 37.89, 0),\n vector4(246.63, 223.62, 106.0, 160),\n }\n}\n\nConfig.ATMs = {\n openDist = 1.0,\n presetAmounts = { 1000, 5000, 10000, 20000, 50000, 100000 },\n models = {\n 'prop_fleeca_atm',\n 'prop_atm_01',\n 'prop_atm_02',\n 'prop_atm_03' }\n}\n\nConfig.UI = {\n color = {\n primary = { -- Different shades of primary color\n [50] = "#FEDDE9",\n [100] = "#FCBAD3",\n [200] = "#FA76A6",\n [300] = "#F7317A",\n [400] = "#D80955",\n [500] = "#95063B",\n [600] = "#76052E",\n [700] = "#580423",\n [800] = "#3B0217",\n [900] = "#1D010C",\n [950] = "#0F0106" },\n }\n}\n\n--[[\n ``` -------------------------------- ### Register Money Addition Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onMoneyAdded' event. This event is triggered after money has been successfully added to an account. ```lua RegisterNetEvent('rxbanking:onMoneyAdded', function(account, amount, transactionData) end) ``` -------------------------------- ### SQL Functions for Bank Money Management Source: https://docs.rxscripts.xyz/scripts/general/banking/configurables Provides SQL functions to add or remove money from a player's bank account. It dynamically adjusts table and column names based on the 'es_extended' resource state. ```lua --[[ BY RX Scripts © rxscripts.xyz --]] Config.DiscordWebhooks = { moneyAdded = '', moneyRemoved = '', } function RemoveMoneyFromBankSQL(identifier, amount) local table = GetResourceState('es_extended') == 'started' and 'users' or 'players' local accountsColumn = GetResourceState('es_extended') == 'started' and 'accounts' or 'money' local identifierColumn = GetResourceState('es_extended') == 'started' and 'identifier' or 'citizenid' return MySQL.update.await( string.format('UPDATE %s SET %s = JSON_SET(%s, "$.bank", JSON_EXTRACT(%s, "$.bank") - @amount) WHERE %s = @identifier', table, accountsColumn, accountsColumn, accountsColumn, identifierColumn), { ['@amount'] = amount, ['@identifier'] = identifier, } ) end function AddMoneyToBankSQL(identifier, amount) local table = GetResourceState('es_extended') == 'started' and 'users' or 'players' local accountsColumn = GetResourceState('es_extended') == 'started' and 'accounts' or 'money' local identifierColumn = GetResourceState('es_extended') == 'started' and 'identifier' or 'citizenid' return MySQL.update.await( string.format('UPDATE %s SET %s = JSON_SET(%s, "$.bank", JSON_EXTRACT(%s, "$.bank") + @amount) WHERE %s = @identifier', table, accountsColumn, accountsColumn, accountsColumn, identifierColumn), { ['@amount'] = amount, ``` -------------------------------- ### Register Loan Payment Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onLoanPayment' event. This event is triggered when a payment is made towards an existing loan. ```lua RegisterNetEvent('rxbanking:onLoanPayment', function(loan, amount) end) ``` -------------------------------- ### Register Card Creation Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onCardCreated' event. This event is triggered when a new card has been created. ```lua RegisterNetEvent('rxbanking:onCardCreated', function(card) end) ``` -------------------------------- ### Register Server Event: rxgarages:onVehicleImpound Source: https://docs.rxscripts.xyz/scripts/general/garages/events Triggered after a vehicle has been impounded. Use this to manage impounded vehicles. ```lua RegisterNetEvent('rxgarages:onVehicleImpound', function(impoundedByPlayerId, plate, impoundName, reason, tillDate, owner) end) ``` -------------------------------- ### Register Server Event: rxgarages:onVehicleSpawned Source: https://docs.rxscripts.xyz/scripts/general/garages/events Triggered after a vehicle has been spawned. Use this to react to new vehicle spawns. ```lua RegisterNetEvent('rxgarages:onVehicleSpawned', function(playerId, vehicle, vehicleNetId, spawnLocation) end) ``` -------------------------------- ### RxBanking Event Listeners Source: https://docs.rxscripts.xyz/scripts/general/banking/configurables Registers various server-side events to listen for and respond to different banking-related actions such as account creation, money transactions, card operations, and loan management. ```lua RegisterNetEvent('rxbanking:onAccountCreated', function(account) end) ``` ```lua RegisterNetEvent('rxbanking:onMoneyRemoved', function(account, amount, transactionData) end) ``` ```lua RegisterNetEvent('rxbanking:onMoneyAdded', function(account, amount, transactionData) end) ``` ```lua RegisterNetEvent('rxbanking:onInterestAdded', function(account, amount) end) ``` ```lua RegisterNetEvent('rxbanking:onAuthorizationCreated', function(authorization) end) ``` ```lua RegisterNetEvent('rxbanking:onAuthorizationRemoved', function(authorization) end) ``` ```lua RegisterNetEvent('rxbanking:onCardCreated', function(card) end) ``` ```lua RegisterNetEvent('rxbanking:onCardFreezeToggle', function(card, isFrozen) end) ``` ```lua RegisterNetEvent('rxbanking:onNewCardRequested', function(oldCard, newCard) end) ``` ```lua RegisterNetEvent('rxbanking:onLoanCreated', function(loan) end) ``` ```lua RegisterNetEvent('rxbanking:onLoanPayment', function(loan, amount) end) ``` ```lua RegisterNetEvent('rxbanking:onLoanPaidOff', function(loan, amount) end) ``` ```lua RegisterNetEvent('rxbanking:onTransactionCreated', function(transaction) end) ``` -------------------------------- ### GetAccount Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves account information using the provided IBAN. ```APIDOC ## GetAccount ### Description Returns an account. ### Method exports['RxBanking']:GetAccount(iban) ### Parameters #### Path Parameters - **iban** (string) - Required - Iban of the account. ``` -------------------------------- ### Add Money to Account Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Adds money to a specified bank account. Optional parameters include transaction type, reason, and the source IBAN. ```lua exports['RxBanking']:AddAccountMoney(iban, amount, type, reason, fromIban) ``` -------------------------------- ### Register Authorization Creation Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onAuthorizationCreated' event. This event is triggered when a new authorization is successfully created. ```lua RegisterNetEvent('rxbanking:onAuthorizationCreated', function(authorization) end) ``` -------------------------------- ### Register Transaction Creation Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onTransactionCreated' event. This event is triggered after a new transaction has been recorded. ```lua RegisterNetEvent('rxbanking:onTransactionCreated', function(transaction) end) ``` -------------------------------- ### rxbanking:onAccountCreated Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after an account has been created. It provides the account data. ```APIDOC ## rxbanking:onAccountCreated ### Description Triggered after an account has been created. ### Parameters #### Arguments - **account** (Account) - Data of account that has been created. ``` -------------------------------- ### rxbanking:onLoanCreated Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a loan is created. It provides the loan data. ```APIDOC ## rxbanking:onLoanCreated ### Description Triggered after a loan is created. ### Parameters #### Arguments - **loan** (Loan) - Data of the loan that has been created. ``` -------------------------------- ### rxbanking:onMoneyAdded Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after money is added to an account. It provides the account, amount added, and optional transaction data. ```APIDOC ## rxbanking:onMoneyAdded ### Description Triggered after money is added to an account. ### Parameters #### Arguments - **account** (Account) - Data of account where money has been added to. - **amount** (number) - Amount that has been added. - **transactionData** (table) - Optional transaction data. ``` -------------------------------- ### Create Transaction Display Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Creates a visual representation of a transaction. This function does not actually transfer money. ```lua exports['RxBanking']:CreateTransaction(amount, type, fromIban, toIban, reason) ``` -------------------------------- ### Register Interest Addition Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onInterestAdded' event. This event is triggered when saving interest is applied to an account. ```lua RegisterNetEvent('rxbanking:onInterestAdded', function(account, amount) end) ``` -------------------------------- ### rxbanking:onNewCardRequested Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a new card is requested. It provides data for both the old and new cards. ```APIDOC ## rxbanking:onNewCardRequested ### Description Triggered after a new card is requested. ### Parameters #### Arguments - **oldCard** (Card) - Data of the old card that is being replaced. - **newCard** (Card) - Data of the new card that is being created. ``` -------------------------------- ### ParkVehicle Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Parks the vehicle the player is sitting in to a specific garage. This is a client-side export. ```APIDOC ### ParkVehicle #### Description Parks the vehicle the player is sitting in to a specific garage. #### Parameters - **garageName** (name, required) - Name identifier of the garage. - **garageType** ('garage'|'impound'|'shared', required) - Type of garage. - **vehicleType** ('car'|'air'|'boat', required) - Type of vehicle. #### Example ```lua exports['RxGarages']:ParkVehicle(garageName, garageType, vehicleType) ``` ``` -------------------------------- ### rxbanking:onAuthorizationCreated Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after an authorization has been created. It provides the authorization data. ```APIDOC ## rxbanking:onAuthorizationCreated ### Description Triggered after an authorization has been created. ### Parameters #### Arguments - **authorization** (Authorization) - Data of authorization that has been created. ``` -------------------------------- ### GetLoan Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves the current active loan for a given player identifier. ```APIDOC ## GetLoan ### Description Returns the current active loan from a player. ### Method exports['RxBanking']:GetLoan(identifier) ### Parameters #### Path Parameters - **identifier** (string) - Required - Identifier of the player. ``` -------------------------------- ### Move Vehicle to Shared Garage (Server) Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Use this server-side export to move a vehicle to a specified shared garage. Requires the vehicle's license plate and the target garage name. ```lua local success, msg = exports['RxGarages']:MoveVehicleToSharedGarage(plate, garageName) ``` -------------------------------- ### AddAccountMoney Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Adds money to a specified bank account. Allows for optional type, reason, and source IBAN. ```APIDOC ## AddAccountMoney ### Description Adds money to an account. ### Method exports['RxBanking']:AddAccountMoney(iban, amount, type, reason, fromIban) ### Parameters #### Path Parameters - **iban** (string) - Required - Iban of the account. - **amount** (number) - Required - Amount that needs to be added. - **type** ('payment'|'deposit'|'withdraw'|'transfer'|'interest') - Optional - Type of adding money for the transaction. - **reason** (string) - Optional - Optional reason of adding the money for the transaction. - **fromIban** (string) - Optional - Optional iban to show where the money came from for the transaction. ``` -------------------------------- ### Register Card PIN Change Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onCardPinChange' event. This event is triggered when a card's PIN has been successfully changed. ```lua RegisterNetEvent('rxbanking:onCardPinChange', function(card, oldPin, newPin) end) ``` -------------------------------- ### Register New Card Request Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onNewCardRequested' event. This event is triggered when a request for a new card is processed, potentially replacing an old one. ```lua RegisterNetEvent('rxbanking:onNewCardRequested', function(oldCard, newCard) end) ``` -------------------------------- ### rxbanking:onCardCreated Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a card has been created. It provides the card data. ```APIDOC ## rxbanking:onCardCreated ### Description Triggered after a card has been created. ### Parameters #### Arguments - **card** (Card) - Data of card that has been created. ``` -------------------------------- ### Register Money Removal Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onMoneyRemoved' event. This event fires when money is successfully removed from an account. ```lua RegisterNetEvent('rxbanking:onMoneyRemoved', function(account, amount, transactionData) end) ``` -------------------------------- ### Register Loan Paid Off Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onLoanPaidOff' event. This event is triggered when a loan has been fully paid off. ```lua RegisterNetEvent('rxbanking:onLoanPaidOff', function(loan, amount) end) ``` -------------------------------- ### Register Card Freeze Toggle Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onCardFreezeToggle' event. This event is triggered when a card's frozen status is changed (either frozen or unfrozen). ```lua RegisterNetEvent('rxbanking:onCardFreezeToggle', function(card, isFrozen) end) ``` -------------------------------- ### rxbanking:onLoanPayment Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a loan payment is made. It provides the loan data and the amount paid. ```APIDOC ## rxbanking:onLoanPayment ### Description Triggered after a loan payment is made. ### Parameters #### Arguments - **loan** (Loan) - Data of the loan where the payment has been made. - **amount** (Number) - Amount that has been paid towards the loan. ``` -------------------------------- ### Impound Vehicle (Server) Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Impound a vehicle programmatically using this server-side export. You can specify details like the reason, impound duration, retrieval price, and self-retrieval options. ```lua local success, msg = exports['RxGarages']:ImpoundVehicle(playerId, plate, impoundName, reason, tillUnix, price, vehNetId, selfRetrieval) ``` -------------------------------- ### CreateTransaction Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Creates a transaction record for display purposes; does not actually transfer funds. Allows specifying amount, type, source/destination IBANs, and reason. ```APIDOC ## CreateTransaction ### Description Creates a transaction. This is just for display, it does not really transfer money. ### Method exports['RxBanking']:CreateTransaction(amount, type, fromIban, toIban, reason) ### Parameters #### Path Parameters - **amount** (number) - Required - Amount of the transaction. - **type** ('payment'|'deposit'|'withdraw'|'transfer'|'interest') - Required - Type of the transaction. - **fromIban** (string) - Optional - Optional iban where the money is 'removed' (not real) from. - **toIban** (string) - Optional - Optional iban where the money is 'added' (not real) to. - **reason** (string) - Optional - Optional reason for the transaction. ``` -------------------------------- ### rxbanking:onCardPinChange Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a card's PIN is changed. It provides the card data, old PIN, and new PIN. ```APIDOC ## rxbanking:onCardPinChange ### Description Triggered after a card's PIN is changed. ### Parameters #### Arguments - **card** (Card) - Data of the card whose PIN has been changed. - **oldPin** (string) - Old PIN of the card. - **newPin** (string) - New PIN of the card. ``` -------------------------------- ### rxbanking:onCardFreezeToggle Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a card is frozen or unfrozen. It provides the card data and a boolean indicating its frozen status. ```APIDOC ## rxbanking:onCardFreezeToggle ### Description Triggered after a card is frozen or unfrozen. ### Parameters #### Arguments - **card** (Card) - Data of card that has been frozen or unfrozen. - **isFrozen** (boolean) - Indicates whether the card is frozen or not. ``` -------------------------------- ### MoveVehicleToSharedGarage Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Moves a vehicle to a shared garage. This is a server-side export. ```APIDOC ## Server Exports ### MoveVehicleToSharedGarage #### Description Moves a vehicle to a shared garage. #### Parameters - **plate** (string, required) - License plate of the vehicle. - **garageName** (string, required) - Name of the shared garage to move the vehicle to. #### Example ```lua local success, msg = exports['RxGarages']:MoveVehicleToSharedGarage(plate, garageName) ``` ``` -------------------------------- ### Remove Money from Account Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Removes money from a specified bank account. Optional parameters include transaction type, reason, and the destination IBAN. ```lua exexports['RxBanking']:RemoveAccountMoney(iban, amount, type, reason, toIban) ``` -------------------------------- ### rxbanking:onInterestAdded Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after saving interest has been added to an account. It provides the account and the amount of interest added. ```APIDOC ## rxbanking:onInterestAdded ### Description Triggered after saving interest has been added to an account. ### Parameters #### Arguments - **account** (Account) - Data of account where interest has been added to. - **amount** (number) - Amount of interest that has been added. ``` -------------------------------- ### rxgarages:onVehicleParked Source: https://docs.rxscripts.xyz/scripts/general/garages/events Triggered after a vehicle has been parked. This event provides details about the player, the vehicle's license plate, the garage name and type, vehicle type, modifications, and owner. ```APIDOC ## rxgarages:onVehicleParked ### Description Triggered after a vehicle has been parked. ### Parameters #### Arguments - **playerId** (number) - Source of the player that parked the vehicle. - **plate** (string) - License plate of the parked vehicle. - **garageName** (string) - Name of the garage where the vehicle was parked. - **garageType** (string) - Type of the garage where the vehicle was parked. - **vehicleType** (string) - Type of the vehicle that was parked. - **mods** (table) - List of modifications applied to the vehicle. - **owner** (string) - Identifier of the owner of the vehicle. ### Example Usage ```lua RegisterNetEvent('rxgarages:onVehicleParked', function(playerId, plate, garageName, garageType, vehicleType, mods, owner) -- Event handler logic here end) ``` ``` -------------------------------- ### AddSocietyMoney Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Adds money to a society account. Allows for optional type, reason, and source IBAN. ```APIDOC ## AddSocietyMoney ### Description Adds money to a society account. ### Method exports['RxBanking']:AddSocietyMoney(society, amount, type, reason, fromIban) ### Parameters #### Path Parameters - **society** (string) - Required - Name of the society. - **amount** (number) - Required - Amount that needs to be added. - **type** ('payment'|'deposit'|'withdraw'|'transfer'|'interest') - Optional - Optional type of adding money for the transaction. - **reason** (string) - Optional - Optional reason of adding the money for the transaction. - **fromIban** (string) - Optional - Optional iban to show where the money came from for the transaction. ``` -------------------------------- ### Add Money to Society Account Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Adds money to a society's account. Optional parameters include transaction type, reason, and the source IBAN. ```lua exports['RxBanking']:AddSocietyMoney(society, amount, type, reason, fromIban) ``` -------------------------------- ### rxbanking:onTransactionCreated Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a transaction is created. It provides the transaction data. ```APIDOC ## rxbanking:onTransactionCreated ### Description Triggered after a transaction is created. ### Parameters #### Arguments - **transaction** (Transaction) - Data of the transaction that has been created. ``` -------------------------------- ### rxgarages:onVehicleImpound Source: https://docs.rxscripts.xyz/scripts/general/garages/events Triggered after a vehicle has been impounded. This event includes information about the player who impounded the vehicle, the vehicle's license plate, the impound name, the reason for impoundment, the expiration date, and the owner. ```APIDOC ## rxgarages:onVehicleImpound ### Description Triggered after a vehicle has been impounded. ### Parameters #### Arguments - **impoundedByPlayerId** (number) - Source of the player that impounded the vehicle. - **plate** (string) - License plate of the impounded vehicle. - **impoundName** (string) - Name of the impound where the vehicle was sent. - **reason** (string) - Reason for impounding the vehicle. - **tillDate** (string) - Date string when the impound expires, or nil for indefinite. - **owner** (string) - Identifier of the owner of the vehicle. ### Example Usage ```lua RegisterNetEvent('rxgarages:onVehicleImpound', function(impoundedByPlayerId, plate, impoundName, reason, tillDate, owner) -- Event handler logic here end) ``` ``` -------------------------------- ### GetPlayerBankAccounts Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves all bank accounts associated with a player, with options to include authorized accounts and filter results. ```APIDOC ## GetPlayerBankAccounts ### Description Returns all bank accounts of a player ### Method exports['RxBanking']:GetPlayerBankAccounts(identifier, includeAuthorized, filter) ### Parameters #### Path Parameters - **identifier** (string) - Required - Identifier of the player. - **includeAuthorized** (boolean) - Optional - Should also return accounts where player is authorized to? - **filter** (FilterOptions) - Optional - Optional filter to specify which accounts should be returned. See **FilterOptions** below. #### Type Definitions ##### FilterOptions - **type** ('checking'|'saving') - Account type to filter by. - **count** (boolean) - If true, returns only the count of accounts instead of full account data. ``` -------------------------------- ### rxgarages:onVehicleSpawned Source: https://docs.rxscripts.xyz/scripts/general/garages/events Triggered after a vehicle has been spawned. This event provides information about the player, the spawned vehicle, its network ID, and its spawn location. ```APIDOC ## rxgarages:onVehicleSpawned ### Description Triggered after a vehicle has been spawned. ### Parameters #### Arguments - **playerId** (number) - Source of the player that took out the vehicle. - **vehicle** (number) - Data of vehicle that has been spawned. - **vehicleNetId** (number) - Network ID of spawned vehicle. - **spawnLocation** (vector3) - Coordinates of where the vehicle has been spawned. ### Example Usage ```lua RegisterNetEvent('rxgarages:onVehicleSpawned', function(playerId, vehicle, vehicleNetId, spawnLocation) -- Event handler logic here end) ``` ``` -------------------------------- ### Register Authorization Removal Event Source: https://docs.rxscripts.xyz/scripts/general/banking/events Register a listener for the 'rxbanking:onAuthorizationRemoved' event. This event is triggered after an authorization has been removed. ```lua RegisterNetEvent('rxbanking:onAuthorizationRemoved', function(authorization) end) ``` -------------------------------- ### GetSocietyAccount Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves the account details for a given society. ```APIDOC ## GetSocietyAccount ### Description Returns the account of a society. ### Method exports['RxBanking']:GetSocietyAccount(society) ### Parameters #### Path Parameters - **society** (string) - Required - Name of the society. ``` -------------------------------- ### GetPlayerPersonalAccount Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Retrieves a player's personal bank account, which is synchronized with the HUD and framework balance. ```APIDOC ## GetPlayerPersonalAccount ### Description Returns the personal account of a player. This account is synced with the HUD and framework bank balance. ### Method exports['RxBanking']:GetPlayerPersonalAccount(identifier) ### Parameters #### Path Parameters - **identifier** (string) - Required - Identifier of the player. ``` -------------------------------- ### ImpoundVehicle Source: https://docs.rxscripts.xyz/scripts/general/garages/exports Impounds a vehicle programmatically. This is a server-side export. ```APIDOC ### ImpoundVehicle #### Description Impounds a vehicle programmatically. #### Parameters - **playerId** (number, required) - Server ID of the player impounding the vehicle. - **plate** (string, required) - License plate of the vehicle to impound. - **impoundName** (string, optional) - Name of the impound garage. If not provided, uses the first available impound. - **reason** (string, optional) - Reason for impounding the vehicle. - **tillUnix** (number, optional) - Unix timestamp when impound expires. Leave nil for indefinite. - **price** (number, optional) - Price to retrieve the vehicle from impound. - **vehNetId** (number, optional) - Network ID of the vehicle entity to delete. - **selfRetrieval** (boolean, optional) - Whether the owner can retrieve the vehicle themselves. Defaults to false. #### Example ```lua local success, msg = exports['RxGarages']:ImpoundVehicle(playerId, plate, impoundName, reason, tillUnix, price, vehNetId, selfRetrieval) ``` ``` -------------------------------- ### rxbanking:onAuthorizationRemoved Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after an authorization has been removed. It provides the authorization data. ```APIDOC ## rxbanking:onAuthorizationRemoved ### Description Triggered after an authorization has been removed. ### Parameters #### Arguments - **authorization** (Authorization) - Data of authorization that has been removed. ``` -------------------------------- ### rxbanking:onLoanPaidOff Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after a loan is paid off. It provides the loan data and the amount that paid off the loan. ```APIDOC ## rxbanking:onLoanPaidOff ### Description Triggered after a loan is paid off. ### Parameters #### Arguments - **loan** (Loan) - Data of the loan that has been paid off. - **amount** (number) - Amount that paid off the loan. ``` -------------------------------- ### rxbanking:onMoneyRemoved Source: https://docs.rxscripts.xyz/scripts/general/banking/events Triggered after money is removed from an account. It provides the account, amount removed, and optional transaction data. ```APIDOC ## rxbanking:onMoneyRemoved ### Description Triggered after money is removed from an account. ### Parameters #### Arguments - **account** (Account) - Data of account where money has been removed from. - **amount** (number) - Amount that has been removed. - **transactionData** (table) - Optional transaction data. ``` -------------------------------- ### RemoveAccountMoney Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Removes money from a specified bank account. Allows for optional type, reason, and destination IBAN. ```APIDOC ## RemoveAccountMoney ### Description Removes money from an account. ### Method exports['RxBanking']:RemoveAccountMoney(iban, amount, type, reason, toIban) ### Parameters #### Path Parameters - **iban** (string) - Required - Iban of the account. - **amount** (number) - Required - Amount that needs to be added. - **type** ('payment'|'deposit'|'withdraw'|'transfer'|'interest') - Optional - Optional type of removing money for the transaction. - **reason** (string) - Optional - Optional reason of removing the money for the transaction. - **toIban** (string) - Optional - Optional iban to show where the money went, for the transaction. ``` -------------------------------- ### Remove Money from Society Account Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Removes money from a society's account. Optional parameters include transaction type, reason, and the destination IBAN. ```lua exports['RxBanking']:RemoveSocietyMoney(society, amount, type, reason, toIban) ``` -------------------------------- ### RemoveSocietyMoney Source: https://docs.rxscripts.xyz/scripts/general/banking/exports Removes money from a society account. Allows for optional type, reason, and destination IBAN. ```APIDOC ## RemoveSocietyMoney ### Description Removes money from a society account. ### Method exports['RxBanking']:RemoveSocietyMoney(society, amount, type, reason, toIban) ### Parameters #### Path Parameters - **society** (string) - Required - Name of the society. - **amount** (number) - Required - Amount that needs to be added. - **type** ('payment'|'deposit'|'withdraw'|'transfer'|'interest') - Optional - Optional type of removing money for the transaction. - **reason** (string) - Optional - Optional reason of removing the money for the transaction. - **toIban** (string) - Optional - Optional iban to show where the money went, for the transaction. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.