[RELEASE] BlackMarket Menu

I will send you the server.lua in 2min

Replace server\server.lua 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
    if xPlayer.getMoney() >= price then
        xPlayer.removeMoney(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
    if xPlayer.getMoney() >= price then
        xPlayer.removeMoney(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
    if xPlayer.getMoney() >= price then
        xPlayer.removeMoney(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
    if xPlayer.getMoney() >= price then
        xPlayer.removeMoney(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
    if xPlayer.getMoney() >= price then
        xPlayer.removeMoney(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’m gonna check for that later and I will send you the how-to :wink:

So, I’m here ^^
You have to copy-paste a function etc…
And replace the

xPlayer.addInventoryItem('flashlight', 1)

by

xPlayer.addWeapon("WEAPON_ID", AMMO)

Exemple :

xPlayer.addWeapon("weapon_knife", 1)

Is Eden accessories addon To esx accessories or should I delete it

Juste need Eden accessoires so you can delete esx_accessories

How can I add items in here? I want to add drill

Just take example of an already existing item and duplicate him, then replace by your item

Is there any way we can change the spot for this?

Yes, sure, go in client/client.lua and modify the coordinate


at line 161

How can I add weapons? I mean I tried but when I want to buy an weapon nothing happends

It means you juste forget something, send me the error