Skip to content

The best cash/blackmoney/crypto item script for your qbcore server created by MaDHouSe79.

License

Notifications You must be signed in to change notification settings

MaDHouSe79/mh-cashasitem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hi 👋, I'm MaDHouSe

A passionate allround developer

My Youtube Channel and Discord

mh-cashasitem

  • Before you start, BACKUP your resources folder cause when something is wrong you have a backup.
  • This is the best cash/blackmoney/crypto item script for your qbcore server.
  • The cash, black_money, crypto is not dependent on the item amount, but the item amount is dependent on the currency amount.

NOTE you need coding experience.

  • This is not just a plug and play script, you need some coding experience to install this script.
  • Don't ask questions that are already in the readme files, you already have an answer...
  • If YOU want to use it then YOU have to install it, don't ask my to do it for you.

Dependencies

Optional

Install

  • Add in your server.cfg ensure mh-cashasitem, make sure this is above ensure [qb]
  • Make sure you read the readme files for install, and only when you are done you can restart the server.

Server.cfg example

ensure qb-core
ensure mh-cashasitem -- add here
ensure [qb]
ensure [standalone]
ensure [voice]
ensure [defaultmaps]
ensure [mh]

Command

  • /cash to see the amount
  • /bank to see the amount
  • /blackmoney to see the amount
  • /crypto to see the amount

Video

Youtube

Images

alttext alttext alttext

Note for using blackmoney

  • first you need to edit the qb-core/config.lua to this below add black_money to this tables
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0, black_money = 0 } -- type = startamount - Add or remove money types for your server (for ex. blackmoney = 0), remember once added it will not be removed from the database!
QBConfig.Money.DontAllowMinus = { 'cash', 'crypto', 'black_money' } -- Money that is not allowed going in minus

Exports you can use for your own inventory.

  • use this server side only when you add or delete an item from and to a inventory.
  • Also use this for item movment in the inventory.
  • First you need to add or remove an item in your inventory before you can use the exports.
-- Add Item Example
Player.Functions.AddItem(ItemData.name, amount, toSlot, ItemData.info)
exports['mh-cashasitem']:UpdateCash(source, ItemData, amount, "add")

-- Remove Item Example
Player.Functions.RemoveItem(ItemData.name, amount, toSlot)
exports['mh-cashasitem']:UpdateCash(source, ItemData, amount, "remove")

How to change marketbills to black_money

  • The black_money uses the item amount as a number,

  • and the marketbills uses the item amount as a table.

  • so you need to edit that part of the code.

  • from this

local worth = {value=10} -- table
Player.Functions.AddItem('marketbills', worth) -- to add marketbills
Player.Functions.RemoveItem('marketbills', worth)-- to remove marketbills
  • to this
local amount = 10 -- number
Player.Functions.AddMoney('black_money', amount) -- to add blackmoney
Player.Functions.RemoveMoney('black_money', amount)  -- to remove blackmoney

INSTALL FOR QB INVENTORY AND QB-HUD

LICENSE

GPL LICENSE
© MaDHouSe79

About

The best cash/blackmoney/crypto item script for your qbcore server created by MaDHouSe79.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages