Documentation
  • 📄TeamsGG Documentation
    • Common Errors
  • Paid Scripts
    • 📱Phone
      • 🧠Installation
      • 🦄Unique phones
      • 💿Configure
      • ⏭️Exports
        • Client side
        • Server side
      • 🪛Commands
      • 🍎Custom apps
    • ☎️Boomer Phone
      • 🧠Installation
      • 🦄Unique phones
      • ⏯️Exports
        • Client side
    • 🏠Properties
      • 🧠Installation
      • 💿Configure
      • 🐚Add More Shells
      • ⏭️Exports
        • Client side
          • GetCurrentPropertyId
          • GetCurrentProperty
          • IsPointInsideProperty
          • OpenPropertyMenu
          • AddKey
          • RemoveKey
          • SetWaypointToProperty
          • GetAllProperties
          • GetKeyHolders
          • PoliceRaidDoor
        • Server side
          • GetAllProperties
          • AddKey
          • RemoveKey
          • ToggleDoorlock
          • GetPlayersInProperty
          • GetKeyHolders
          • DeleteProperty
          • AddStarterApartment
      • 👜State bags
    • 🏦Banking
      • 🧠Installation
      • ⏯️Exports
        • Client side
        • Server side
    • 💸Billing
      • 🧠Installation
      • ⏭️Exports
        • Client side
        • Server side
    • 📊Hud
      • 🧠Installation
      • ⏭️Exports
        • Client side
    • 📦Storage Units
      • 🧠Installation
Powered by GitBook
On this page
  • 🎯 Types
  • IAccount
  • 🆔 Accounts
  • GetSocietyAccount
  • GetAccountByIban
  • GetPersonalAccountByPlayerId
  • GetPersonalAccountByPlayerIdentifier
  • CreateBusinessAccount
  • 💵 Money
  • GetAccountMoneyByIban
  • GetSocietyAccountMoney
  • AddSocietyMoney
  • RemoveSocietyMoney
  • 🪵 Misc
  • AddTransaction
  • IsAccountFrozen
  • IsAccountTerminated
  • FreezeAccount
  • UnfreezeAccount
  • TerminateAccount
  • IsCardFrozen
  • IsCardTerminated
  • FreezeCard
  • UnfreezeCard
  1. Paid Scripts
  2. Banking
  3. Exports

Server side

🎯 Types

IAccount

---@class IAccount
---@field id string
---@field balance number
---@field createdAt number
---@field iban number
---@field name string
---@field ownerId string
---@field type string
---@field color string
---@field ownedAccount boolean
---@field frozen boolean
---@field closed boolean
---@field settings IAccountSettings
---@field permissions IAccountMemberPermissions

🆔 Accounts

GetSocietyAccount

---@param society string - Society id(police, mechanic...)
---@return IAccount | nil
exports['tgg-banking']:GetSocietyAccount(society)

GetAccountByIban

---@param iban number - The IBAN of the account
---@return IAccount | nil
exports['tgg-banking']:GetAccountByIban(iban)

GetPersonalAccountByPlayerId

---@param playerId number - The session id(source) of the player(0, 25, 150...)
---@return IAccount | nil
exports['tgg-banking']:GetPersonalAccountByPlayerId(playerId)

GetPersonalAccountByPlayerIdentifier

---@param identifier string - The identifier of the player(citizenid, identifier)
---@return IAccount | nil
exports['tgg-banking']:GetPersonalAccountByPlayerIdentifier(identifier)

CreateBusinessAccount

--- Creates a new society account. If the account already exists, it will be returned. 
---@param society string
---@param startBalance number?
---@param displayName string?
---@param color string?
---@return { success: boolean, message?: string, error?: string, account?: IAccountView }
exports['tgg-banking']:CreateBusinessAccount(society, startBalance, displayName, color)

💵 Money

GetAccountMoneyByIban

---@param iban number - The IBAN of the account
---@returns number | nil - Account money or nil if the account is not found.
exports['tgg-banking']:GetAccountMoneyByIban(iban)

GetSocietyAccountMoney

---@param society string - Society id(police, mechanic...)
---@returns number | nil - Account money or nil if the account is not found.
exports['tgg-banking']:GetSocietyAccountMoney(society)

AddSocietyMoney

---@param society string - Society id(police, mechanic...)
---@param amount number - The amount you want to add to the account
---@return boolean - Whether the money was added successfully
exports['tgg-banking']:AddSocietyMoney(society, amount)

RemoveSocietyMoney

---@param society string - Society id(police, mechanic...)
---@param amount number - The amount you want to add to the account
---@return boolean - Whether the money was removed successfully
exports['tgg-banking']:RemoveSocietyMoney(society, amount)

Feel free to request an export to suit your needs.

🪵 Misc

AddTransaction

---@param toIban number | nil - The iban of the account or society name
---@param fromIban number | nil - The iban of the account or society name
---@param transactionType string(deposit, withdraw) - The type of the transaction
---@param amount number - The amount of the transaction
---@param description string | nil - The description of the transaction
---@param playerId string | nil - The id of the player if the transaction is from a player, nil otherwise
---@param cardId number | nil - The id of the card if the transaction is from a card, nil otherwise
---@return string | nil - The id of the transaction if successful, nil otherwise
exports['tgg-banking']:AddTransaction(toIban, fromIban, transactionType, amount, description?, playerId?, cardId?)
Example: Withdraw transaction
  • When adding a withdrawal transaction, the first parameter(toIban) is not required and must be skipped.

exports['tgg-banking']:AddTransaction(nil, 221043, 'withdraw', 2024, 'Your Reason Here')
Example: Deposit transaction
  • When adding a deposit transaction, the second parameter(fromIban) is unnecessary and must be skipped.

exports['tgg-banking']:AddTransaction(221043, nil, 'deposit', 2024, 'Your Reason Here')

IsAccountFrozen

---@param iban number
---@return boolean
exports['tgg-banking']:IsAccountFrozen(iban)

IsAccountTerminated

---@param iban number
---@return boolean
exports['tgg-banking']:IsAccountTerminated(iban)

FreezeAccount

---@param iban number
---@return boolean - Whether the account was frozen successfully
exports['tgg-banking']:FreezeAccount(iban)

UnfreezeAccount

---@param iban number
---@return boolean - Whether the account was unfrozensuccessfully
exports['tgg-banking']:UnfreezeAccount(iban)

TerminateAccount

---@param iban number
---@return boolean - Whether the account was terminated successfully
exports['tgg-banking']:TerminateAccount(iban)

IsCardFrozen

---@param cardId number
---@return boolean
exports['tgg-banking']:IsCardFrozen(cardId)

IsCardTerminated

---@param cardId number
---@return boolean
exports['tgg-banking']:IsCardTerminated(cardId)

FreezeCard

---@param cardId number
---@return boolean - Whether the card was frozen successfully
exports['tgg-banking']:FreezeCard(cardId)

UnfreezeCard

---@param cardId number
---@return boolean - Whether the card was unfrozen successfully
exports['tgg-banking']:UnfreezeCard(cardId)
PreviousClient sideNextBilling

Last updated 1 month ago

🏦
⏯️