Coins System

To use the vip functionality you need to make sure you set it up correctly

Installation

ESX

1

Go to file es_extended/config.lua.

2

Find Config.Accounts or any other name that contains bank, money and black_money account setup

3

Add the coins account like in the following example

Config.Accounts             = {
	bank = {
		label = TranslateCap('account_bank'),
		round = true
	},
	black_money = {
		label = TranslateCap('account_black_money'),
		round = true
	},
	money = {
		label = TranslateCap('account_money'),
		round = true
	},
	coins = {
		label = "VIP Coins",
		round = true
	}
}

On the label you can write whatever you want, and if you know how to do it you can use TranslateCap and add the coins reference on you locale file of the translations

QB Core

1

Go to file qb-core/config.lua.

2

Find QBConfig.Money.MoneyTypes and QBConfig.Money.DontAllowMinus

3

Add the coins account just like in the example

QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0 , coins = 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','coins' } -- Money that is not allowed goin

Commands

To give the player coins, you can just use the commands (in-game or console of server)

Its the same commands of spawning account money in Fivem

ESX - Commands

Example:
giveaccountmoney id coins amount

or

Example:
setaccountmoney id coins amount

QB Core - Commands

Example:
setmoney id coins amount

or

Example:
givemoney id coins amount

Last updated

Was this helpful?