MoneyAPI 1.0.2

   (9 reviews)

3 Screenshots

About This File

This resource probably won't get future updates, check out Currency API instead.

Easy to use money system for your server. It handles saving&loading and provides you a custom data key to get/set a player's money.


  1. Put the files you downloaded in their respective places
  2. Add require('moneyapi') to client_packages/index.js
  3. Open packages/moneyapi/constants.js and put your MySQL info (maybe edit the settings too while you're at it...)
  4. Congrats, you're all done

Settings (packages/moneyapi/constants.js):

  • startingMoney use this setting to change how much money players start with. Default: 0
  • autoSaveInterval use this setting to change how frequent auto saving happens (in minutes), you can set it to 0 if you want to disable auto saving. Default: 5


You can access a player's money from customMoney property using either .data.customMoney or .getVariable("customMoney")."smoney", (player, _, money) => {
    // set the player's money to the specified amount
    money = parseInt(money);

    if (!isNaN(money)) { = money;
    } else {
        player.outputChatBox("Invalid amount specified.");
});"cmoney", (player, _, amount) => {
    // change the player's money by the specified amount
    amount = parseInt(amount);

    if (!isNaN(amount)) { += amount;
    } else {
        player.outputChatBox("Invalid amount specified.");
});"buyhp", (player) => {
    // refill a player's health for $100
    if ( >= 100) { = 100; -= 100;
        player.outputChatBox("Refilled health for $100.");
    } else {
        player.outputChatBox("You don't have $100.");


  • First of all, thanks to @Donboo for their MySQL example which you can find here.
  • This script won't save while the server is shutting down but will save player money when they disconnect or when autosave happens.
  • This script uses an int(11) field to store a player's money. If you think $2147483647 isn't enough, you might want to change it.
  • For some reason, MoneyAPI HUD elements will be off position in 1914x1080 windowed resolution.
  • This script won't update the money display on the ESC/pause menu. (This note is obsolete if you're using the GameHUD version)

What's New in Version 1.0.2   See changelog


Added a version that uses GTA V's money HUD. Just replace the contents of your client_packages/moneyapi/index.js with the downloaded file. (MoneyAPI

Amount of money you have will also be displayed on the pause menu with this version.




  • Like 5
  • Mask 1

User Feedback

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now