Skip to main content

💵 Money Clip

A simple script to convert cash into physical money clips for RedM (VORP Core).

✨ Features

  • Convert Cash to Item - Convert your cash into a physical money clip
  • Dynamic Label - The money clip displays the contained amount
  • Easy Usage - Double-click to redeem the money clip
  • Money Transfer - Perfect for trading, gifts, or discreet money transport

📥 Installation

Prerequisites

  • VORP Core
  • vorp_inventory
  • oxmysql

Database Setup (Items)

INSERT INTO `items` (`item`, `label`, `limit`, `can_remove`, `type`, `usable`) VALUES
('money_clip', 'Money Clip', 10, 1, 'item_standard', 1);
Images

Ensure you have an image for the money_clip item in your inventory resource.

VORP Inventory Integration (Right-Click Menu)

To create a money clip directly by right-clicking the money icon in the inventory, the following three files in vorp_inventory need to be edited:

1. html/js/invScript.js

Search the file for the inventorySetup function and locate the //AddMoney section (around var data = [];). Add the following code into the data.push array for the money item:

data.push({
text: "Money Clip",
action: function () {
$.post(`https://${GetParentResourceName()}/UseMoney`, JSON.stringify({}));
},
});

2. client/services/NUIService.lua

Insert the following function at the very bottom of the file (or with the rest of the NUI Callbacks):

function NUIService.NUIUseMoney(_)
-- Close the inventory to allow inputs
NUIService.NUIFocusOff()
-- Trigger the event in the Money Clip script
TriggerEvent("mulderdev_money_clip:PromptCreateClip")
end

3. client/controllers/NUIController.lua

Register the new NUI Callback with the other RegisterNUICallback entries (usually collected at the top of the file):

RegisterNUICallback('UseMoney', NUIService.NUIUseMoney)

🎮 Usage

Creating a Money Clip

  1. Use the command /moneyclip [Amount]
  2. Example: /moneyclip 500 creates a money clip with $500
  3. The cash will be deducted from your character
  4. You will receive a money clip in your inventory

Redeeming a Money Clip

  1. Open your inventory
  2. Double-click on the money clip
  3. The contained amount will be added to your cash
  4. The money clip will be removed from your inventory

⚙️ Configuration

Config = {}

-- Minimum amount for a money clip
Config.MinAmount = 1

-- Maximum amount for a money clip
Config.MaxAmount = 100000

-- Notifications
Config.Notifications = {
created = "You created a money clip with $%s.",
redeemed = "You received $%s from the money clip.",
notEnough = "You do not have enough cash.",
invalidAmount = "Invalid amount.",
}

📋 Commands

CommandDescriptionExample
/moneyclip [Amount]Creates a money clip with the specified amount/moneyclip 500

🆕 Changelog

V1.0 - Initial Release

  • Money clip system
  • Dynamic item label with amount
  • Command to create
  • Item use to redeem