documentation
  • GENERAL INFORMATION
    • 🔷Tebex Integration
    • 👾Code Creator
    • 🔌REACT
  • PACKAGES
    • RADIO
    • NPC DIALOG
    • CARPLAY
    • SCOREBOARD
    • CARSHOP
    • GARAGE
    • GUNSHOP
    • RENT A CAR
    • CRAFTING
    • DRIVING SCHOOL
    • CUSTOMS
    • CASE
    • DAİLYREWARD
    • BLACKMARKET
    • REPORT
    • CLOTHESHOP
    • REGİSTER
    • CREATOR
    • VIPSYSTEM
    • NOTIFICATION
    • FİSHİNG
    • DİVİNG
    • PROGRESS & NOTIFY
    • NEW YEAR
Powered by GitBook
On this page
  1. PACKAGES

BLACKMARKET

FiveM Black Market Script Configuration Guide

Configuration

The configuration file allows you to set up various aspects of the Black Market, such as the dealer's details, framework, items available for purchase, languages, and blip settings.

Config File

Config = {}

Config.Dealer = {
    marker = "[E] Black Shop",
    vehicle = "slamvan2",
    npc = 0xF0EC56E2,
    DrivingStyle = 262144, -- http://gtaforums.com/topic/822314-guide-driving-styles/  
    UseItem = false, -- or item name
    Police = 0, -- Number of active police
}

Framework Setup

This section sets the framework your server is using (QBCore, ESX, OLDQBCore, or NewESX) and fetches the shared object for that framework.

Config.Framework = "QBCore" -- QBCore or ESX or OLDQBCore or NewESX

function GetFramework()
    local Get = nil
    if Config.Framework == "ESX" then
        while Get == nil do
            TriggerEvent('esx:getSharedObject', function(Set) Get = Set end)
            Citizen.Wait(0)
        end
    end
    if Config.Framework == "NewESX" then
        Get = exports['es_extended']:getSharedObject()
    end
    if Config.Framework == "QBCore" then
        Get = exports["qb-core"]:GetCoreObject()
    end
    if Config.Framework == "OldQBCore" then
        while Get == nil do
            TriggerEvent('QBCore:GetObject', function(Set) Get = Set end)
            Citizen.Wait(200)
        end
    end
    return Get
end

Black Market Items

This section defines the items available for purchase in the Black Market. You can customize the title, name, price, and image for each item.

Config.Item = {
    {title="Glock 22", name="weapon_pistol", price="1", image="./assets/i-img/glock22.png"},
    {title="Pistol Mk II", name="weapon_pistol_mk2", price="85000", image="./assets/i-img/weapon_pistol_mk2.png"},
    {title="Glock 19", name="weapon_combatpistol", price="95000", image="./assets/i-img/weapon_combatpistol.png"},
    {title="Baby Glock 30", name="weapon_snspistol", price="75000", image="./assets/i-img/weapon_snspistol.png"}, 
    {title="SNS Pistol Mk II", name="weapon_snspistol_mk2", price="55000", image="./assets/i-img/weapon_snspistol_mk2.png"}, 
    {title="FNX .45", name="weapon_heavypistol", price="250000", image="./assets/i-img/weapon_heavypistol.png"}, 
    {title="Ceramic Pistol", name="weapon_ceramicpistol", price="25000", image="./assets/i-img/weapon_combatpistol.png"}, 
    {title="Perico Pistol", name="weapon_gadgetpistol", price="50000", image="./assets/i-img/weapon_gadgetpistol.png"},
    {title="Glock 22", name="weapon_marksmanpistol", price="100000", image="./assets/i-img/weapon_marksmanpistol.png"},
    {title="Vintage Pistol", name="weapon_vintagepistol", price="85000", image="./assets/i-img/weapon_vintagepistol.png"},
    {title="Tec-9", name="weapon_machinepistol", price="500000", image="./assets/i-img/weapon_machinepistol.png"},
    {title="Micro SMG", name="weapon_microsmg", price="600000", image="./assets/i-img/weapon_microsmg.png"}, 
    {title="SMG Mk II", name="weapon_smg_mk2", price="650000", image="./assets/i-img/weapon_smg_mk2.png"}, 
    {title="SMG", name="weapon_smg", price="600000", image="./assets/i-img/weapon_smg.png"},
    {title="Mini SMG", name="weapon_minismg", price="600000", image="./assets/i-img/weapon_minismg.png"}, 
    {title="Ceramic Pistol", name="weapon_molotov", price="750000", image="./assets/i-img/weapon_molotov.png"}, 
    {title="Pistol EXT Clip", name="pistol_extendedclip", price="500", image="./assets/i-img/pistol_extendedclip.png"},
    {title="Pistol Flashlight", name="pistol_flashlight", price="500", image="./assets/i-img/pistol_flashlight.png"}, 
}

Language Settings

This section allows you to customize the text displayed in the Black Market interface.

Config.Languages = {
    header = "BLACK MARKET", 
    purchase = "PURCHASE", 
    description = "The strongest and most accurate Weapons of Los Santos", 
    capacity = "CAPACITY", 
    damage = "DAMAGE", 
    rate = "RATE"
}

Blip Settings

This section defines the settings for the blip that will appear on the map, indicating the location of the Black Market dealer.

Config.Blip = {
    Label = "Dealer",
    Sprite = 56,
    Display = 4,
    Scale = 0.5,
    Color = 4,
}

Black Market Trigger Event

Use the following event to start the Black Market interaction.

-- BLACK MARKET START TRIGGER EVENT
-- TriggerClientEvent('blackmarket:start') or TriggerEvent(...)

Summary

This guide provides the essential configurations and functions needed to set up your FiveM Black Market script. Customize each section to fit your server's requirements and integrate these configurations into your server scripts for a fully functional Black Market system.

PreviousDAİLYREWARDNextREPORT

Last updated 11 months ago