[RELEASE] BlackMarket Menu

BlackMarket

BlackMarket Menu included an YMAP

Image Preview

Day Preview



Night Preview


Image Preview (MENU + YMAP)

Video preview : here

Requirements


Download

Installation

  1. Download eden_accesories and esx_blackmarket
  2. Put the files in the resources folder of your server
  3. Add in eden_accesories\client\main.lua at the line 401 this : client
  4. Add in eden_accesories\server\main.lua at the line 30 this : server
  5. Add this to your server.cfg :
ensure eden_accesories
ensure esx_blackmarket

Make sure to download eden_accesories and added my few lines so that the menu works 100% with the extended clip :

If you don’t want the extended clip you just have to remove these following lines :

client/client.lua : line 40 to 42
client/client.lua : line 66 to 70
server/server.lua : line 22 to 33
config.lua : line 10

What About

The script takes first the own money you have on you and if you ever run out of own money, it will take the same amount as what you want to buy but with the dirty money you will have on you.
The script is written in French because I am, it’s up to you to translate into your language.
If you only want the YMAP, download it here.
Please, do not re-release, just edit on your side.

Answer to a frequently asked question

How to give weapon with the menu?

You have to duplicate a existing client and server part of an item, and
Replace the

xPlayer.addInventoryItem('flashlight', 1)

By

xPlayer.addWeapon("WEAPON_ID", AMMO)

Exemple :

xPlayer.addWeapon("weapon_knife", 1)

Thanks for reading :heart:
Don’t forget to leave a like and ask your questions or problems in comments !

10 Likes

Can you add things like black market items??

What do you mean? Give me an example

items like “bread” and weapons like “weapon_pistol” ? I use a blackmarket that only lets you add weapons :frowning: looking for one that does both

1 Like

For bread, just duplicate the lines of an already existing item and replace it with everything that corresponds to bread (client and server)

1 Like

How would i add weapons to the shop?

Does this script support specific jobs? For example: mafia

If your job works with ESX, yes suddenly

1 Like

I did not check

1 Like

What do you mean i did not check?

I don’t try to add weapon to the shop

is there a way to do it tho?

Work fine

1 Like

please how i can change it to buy everything with black money? even if they have normal cash on them?

Go into the server.lua and change by :

ESX = nil

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

--/////////// Utiles \\\\\\\\\\\--

RegisterNetEvent('buySilencieux')
AddEventHandler('buySilencieux', function()
    local _source = source
    local xPlayer = ESX.GetPlayerFromId(source)
    local price = Config.Silencieux
    local blackMoney = xPlayer.getAccount('black_money')
    if blackMoney.money >= price then
        xPlayer.removeAccountMoney('black_money', price)
        xPlayer.addInventoryItem('silencieux', 1)
        TriggerClientEvent('esx:showNotification', _source, '~g~Transaction validé !')
    else
        TriggerClientEvent('esx:showNotification', _source, '~r~Transaction annulée, vous n\'avez pas assez d\'argent sur vous !')
    end
end)

RegisterNetEvent('buyChargeur')
AddEventHandler('buyChargeur', function()
    local _source = source
    local xPlayer = ESX.GetPlayerFromId(source)
    local price = Config.Chargeur
    local blackMoney = xPlayer.getAccount('black_money')
    if blackMoney.money >= price then
        xPlayer.removeAccountMoney('black_money', price)
        xPlayer.addInventoryItem('chargeur', 1)
        TriggerClientEvent('esx:showNotification', _source, '~g~Transaction validé !')
    else
        TriggerClientEvent('esx:showNotification', _source, '~r~Transaction annulée, vous n\'avez pas assez d\'argent sur vous !')
    end
end)

RegisterNetEvent('buyGrip')
AddEventHandler('buyGrip', function()
    local _source = source
    local xPlayer = ESX.GetPlayerFromId(source)
    local price = Config.Grip
    local blackMoney = xPlayer.getAccount('black_money')
    if blackMoney.money >= price then
        xPlayer.removeAccountMoney('black_money', price)
        xPlayer.addInventoryItem('grip', 1)
        TriggerClientEvent('esx:showNotification', _source, '~g~Transaction validé !')
    else
        TriggerClientEvent('esx:showNotification', _source, '~r~Transaction annulée, vous n\'avez pas assez d\'argent sur vous !')
    end
end)

--/////////// Gadgets \\\\\\\\\\\--

RegisterNetEvent('buyYusuf')
AddEventHandler('buyYusuf', function()
    local _source = source
    local xPlayer = ESX.GetPlayerFromId(source)
    local price = Config.Yusuf
    local blackMoney = xPlayer.getAccount('black_money')
   if blackMoney.money >= price then
        xPlayer.removeAccountMoney('black_money', price)
        xPlayer.addInventoryItem('yusuf', 1)
        TriggerClientEvent('esx:showNotification', _source, '~g~Transaction validé !')
    else
        TriggerClientEvent('esx:showNotification', _source, '~r~Transaction annulée, vous n\'avez pas assez d\'argent sur vous !')
    end
end)

RegisterNetEvent('buyFlashlight')
AddEventHandler('buyFlashlight', function()
    local _source = source 
    local xPlayer = ESX.GetPlayerFromId(source)
    local price = Config.Flashlight
    local blackMoney = xPlayer.getAccount('black_money')
    if blackMoney.money >= price then
        xPlayer.removeAccountMoney('black_money', price)
        xPlayer.addInventoryItem('flashlight', 1)
        TriggerClientEvent('esx:showNotification', _source, '~g~Transaction validé !')
    else
        TriggerClientEvent('esx:showNotification', _source, '~r~Transaction annulée, vous n\'avez pas assez d\'argent sur vous !')
    end
end)

----------------------------------------------
--|đ——đ—¶đ˜€đ—°đ—Œđ—żđ—± : Cuchi'#0999                    
--|đ—”đ˜‚đ˜đ—”đ—Œđ—ż : đ—–đ˜‚đ—°đ—”đ—¶âœ                   ♄      
--|đ——đ—Œ đ—»đ—Œđ˜ 𝗿đ—Č-𝗿đ—Čđ—čđ—Č𝗼𝘀đ—Č.                       
----------------------------------------------

I don’t try it so if you have any problems, tell me ^^

Have a nice day!

i just removed some lines about money, and leave the black money as it is , is it right?

yes, just copy paste the code I sent you before to replace server.lua

So, it works?

please how i can change it to buy everything with cash money?

the thing is that i want to sell weapons there, not accesories, can i? and how