📎💰Currency System

💰 Currency System: Server-Side Actions

infCore provides four core actions for interacting with a user's currency:

1️⃣ Get user currency

This will return -1 if the player is offline

local infCore = exports.infCore

RegisterCommand("getMoney", function()
    local source = source
    local user_id = infCore:getUserId(source) -- Get the User ID
    
    -- Retrieve currency balances
    local wallet = infCore:getUserMoney(user_id)
    local bank = infCore:getUserBank(user_id)
    local infCoins = infCore:getUserInfCoins(user_id)
end)

🛠️ Set Currency

  • setUserMoney(userId, amount) – Set the wallet balance

  • setUserBank(userId, amount) – Set the bank balance

  • setUserInfCoins(userId, amount) – Set the infCoins balance

➕ Add Currency

  • addUserMoney(userId, amount) – Adds to the wallet

  • addUserBank(userId, amount) – Adds to the bank

  • addUserInfCoins(userId, amount) – Adds to the infCoins

➖ Remove Currency

  • removeUserMoney(userId, amount) – Removes from wallet

  • removeUserBank(userId, amount) – Removes from bank

  • removeUserInfCoins(userId, amount) – Removes from infCoins

Last updated