Get money function

function getAccountMoney(account, player)
    -- Here's your implementation of your account money system
    if Config.Framework == 'esx' then
        local xPlayer = ESX.GetPlayerFromId(player)
        return xPlayer.getAccount(account).money
    else
        -- Here's your implementation of your account money system
    end
end

This function in server/framework.lua, retrieves the player's account money. By default, it uses ESX as the framework. If you're using a different framework, just implement the method to get the player's money in the else block.

Don't forget to change your framework in the shared/config.lua file

Last updated