Skip to content

Conversation

@Zykem
Copy link
Contributor

@Zykem Zykem commented Sep 7, 2025

Description

Adds a new method getAccountMoney to the xPlayer object to retrieve the current money amount of a specified account. This simplifies fetching account balances directly from the player object.


Motivation

Currently, retrieving the money of a player’s account requires calling getAccount and then accessing the money field. Adding getAccountMoney provides a more straightforward, readable, and convenient way to get account balances, improving code clarity.


Implementation Details

  • Added a new function xPlayer.getAccountMoney(accountName) that returns the money value of the specified account.
  • The method returns nil if the account does not exist.
  • This method internally calls the existing getAccount method and safely accesses the money field.

Usage Example

local money = xPlayer.getAccountMoney("bank")
if money then
    print(("Player has %d in bank account"):format(money))
else
    print("Account not found")
end

PR Checklist

  • [x ] My commit messages and PR title follow the Conventional Commits standard.
  • [x ] My changes have been tested locally and function as expected.
  • [x ] My PR does not introduce any breaking changes.
  • [x ] I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.

Kenshiin13 and others added 29 commits August 24, 2025 17:20
Apparently, passing leading nil values via an export breaks it entirely.
…ment-isValid-on-register-command

add a new argument on the register command feature
feat(esx_menu_default) Redesign of the menu.
fix(esx_menu_default): remove debug print
@N0tNvll N0tNvll requested a review from FBFezz October 11, 2025 01:50
@CLAassistant
Copy link

CLAassistant commented Nov 16, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 4 committers have signed the CLA.

✅ Kenshiin13
❌ Kr3mu
❌ Zykem
❌ github-actions[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants