[PAID][ESX] Cardealer | MK-Services

A script by Pain1435

No reviews yet.
[PAID][ESX] Cardealer | MK-Services main image

Full Description

This resource is compatible with ESX v1.1 / ESX 1.2 (v1 Final) / ESX Legacy (v1.3 - v1.5)/ Extendedmode.

You want to improve selling vehicles by jobs on your server? Here you go!

Features

  • Fully configurable player-based cardealer
  • Configurable profit of sold vehicles for society
  • Fully customizable blips & markers
  • Customizable maximum amount of vehicle sale
  • Statistics of sold vehicles
  • Configurable webhook logs
  • Adjustable notification event
  • ESX events and prefix customizable
  • Low performance consumption (0.00ms - 0.05ms)

Showcase: Click me
Buy: Click me (Secured by FiveM Escrow System)

Config Snippets:

MK = MK or {}
MK.Functions = MK.Functions or {}

-- By default 'en' and 'de' are supported.
-- You can modify or add new translations in the translations.lua file
MK.Language = 'en'

MK.ESXSharedObject = 'esx:getSharedObject'

MK.Notify = function(type, message)
  if type == 'success' then
      TriggerEvent('esx:showNotification', message)
  elseif type == 'warning' then
      TriggerEvent('esx:showNotification', message)
  elseif type == 'error' then
      TriggerEvent('esx:showNotification', message)
  elseif type == 'info' then
      TriggerEvent('esx:showNotification', message)
  end
end

MK.CarDealers = {
    ['abbruzzi'] = {
        JobGrade = 0, -- Minimum job grade the user needs to be allowed to sell vehicles
        Percentage = 40, -- How much money will go to the society account of the vehicle price (in percent)
        Blip = {
            Enabled = false,
            Text = 'Autohaus Abbruzzi',
            Coords = { x = -30.19463, y = -1096.573, z = 27.274343, h = 75.715667 },
            Sprite = 523, -- Look up sprites and colors here: https://docs.fivem.net/docs/game-references/blips/
            Color = 40,
            Scale = 1.0
        },
        Vehicles = {}, -- Leave it as it is
        BuySpawn = { x = -49.71444, y = -1110.428, z = 26.258497, h = 160.08055 }, -- Location where a sold vehicle should be spawned
        ShopPosition = { x = -35.24402, y = -1102.244, z = 26.422349, h = 76.258132 }, -- Location where the employee is able to sell a vehicle
        Spots = { -- Define display positions for vehicles
            [1] = {
                Position = { x = -36.70006, y = -1093.213, z = 25.890163, h = 110.40479 },
                CurrentVehicle = '', -- You can set a default displayed vehicle here after restarts, leave blank to disable default display
                InUse = false -- Leave this as it is
            }           
        }
    }
}

MK.VehiclePlate = {
    AmountLetters = 3,
    AmountNumbers = 3,
    UseSpaceBetween = true
}

MK.Colors = {
	{ label = 'Black', value = 'black'},
	{ label = 'White', value = 'white'},
	{ label = 'Grey', value = 'grey'},
	{ label = 'Red', value = 'red'},
	{ label = 'Pink', value = 'pink'},
	{ label = 'Blue', value = 'blue'},
	{ label = 'Yellow', value = 'yellow'},
	{ label = 'Green', value = 'green'},
	{ label = 'Orange', value = 'orange'},
	{ label = 'Brown', value = 'brown'},
	{ label = 'Purple', value = 'purple'},
	{ label = 'Chrome', value = 'chrome'},
	{ label = 'Gold', value = 'gold'}
}

MK.Functions.GetColors = function(color)
    local colors = {}

    if color == 'black' then
        colors = {
            { index = 0, label = 'Black'},
            { index = 1, label = 'Graphite'},
            { index = 2, label = 'Black Metallic'},
            { index = 3, label = 'Cast Steel'},
            { index = 11, label = 'Black Anthracite'},
            { index = 12, label = 'Matte Black'},
            { index = 15, label = 'Dark Night'},
            { index = 16, label = 'Deep Black'},
            { index = 21, label = 'Oil Black'},
            { index = 147, label = 'Carbon'}
        }
    elseif color == 'white' then
        colors = {
            { index = 106, label = 'Vanilla'},
            { index = 107, label = 'Creme'},
            { index = 111, label = 'White'},
            { index = 112, label = 'Polar White'},
            { index = 113, label = 'Beige'},
            { index = 121, label = 'Matte White'},
            { index = 122, label = 'Show White'},
            { index = 131, label = 'Cotton White'},
            { index = 132, label = 'Alabaster'},
            { index = 134, label = 'Pure White'}
        }
    elseif color == 'grey' then
        colors = {
            { index = 4, label = 'Silver'},
            { index = 5, label = 'Metallic Grey'},
            { index = 6, label = 'Laminated Steel'},
            { index = 7, label = 'Dark Grey'},
            { index = 8, label = 'Rocky Grey'},
            { index = 9, label = 'Gray Night'},
            { index = 10, label = 'Aluminium'},
            { index = 13, label = 'Matte Grey'},
            { index = 14, label = 'Light Grey'},
            { index = 17, label = 'Asphalt Grey'},
            { index = 18, label = 'Concrete Grey'},
            { index = 19, label = 'Dark Silver'},
            { index = 20, label = 'Magnesit'},
            { index = 22, label = 'Nickel'},
            { index = 23, label = 'Zinc'},
            { index = 24, label = 'Dolomit'},
            { index = 25, label = 'Blue Silver'},
            { index = 26, label = 'Titanium'},
            { index = 66, label = 'Steel Blue'},
            { index = 93, label = 'Champagne'},
            { index = 144, label = 'Grey Hunter'},
            { index = 156, label = 'Grey'}
        }
    elseif color == 'red' then
        colors = {
            { index = 27, label = 'Red'},
            { index = 28, label = 'Torino Red'},
            { index = 29, label = 'Poppy'},
            { index = 30, label = 'Copper Red'},
            { index = 31, label = 'Cardinal Red'},
            { index = 32, label = 'Brick Red'},
            { index = 33, label = 'Garnet'},
            { index = 34, label = 'Cabernet Red'},
            { index = 35, label = 'Candy Red'},
            { index = 39, label = 'Matte Red'},
            { index = 40, label = 'Dark Red'},
            { index = 43, label = 'Red Pulp'},
            { index = 44, label = 'Brilliant Red'},
            { index = 46, label = 'Pale Red'},
            { index = 143, label = 'Wine Red'},
            { index = 150, label = 'Volcano'}
        }
    elseif color == 'pink' then
        colors = {
            { index = 135, label = 'Electric Pink'},
            { index = 136, label = 'Salmon'},
            { index = 137, label = 'Sugar Plum'}
        }
    elseif color == 'blue' then
        colors = {
            { index = 54, label = 'Topaz'},
            { index = 60, label = 'Light Blue'},
            { index = 61, label = 'Galaxy Blue'},
            { index = 62, label = 'Dark Blue'},
            { index = 63, label = 'Azure'},
            { index = 64, label = 'Navy Blue'},
            { index = 65, label = 'Lapis Blue'},
            { index = 67, label = 'Blue Diamond'},
            { index = 68, label = 'Surfer'},
            { index = 69, label = 'Pastel Blue'},
            { index = 70, label = 'Celeste Blue'},
            { index = 73, label = 'Rallye Blue'},
            { index = 74, label = 'Blue Paradise'},
            { index = 75, label = 'Blue Night'},
            { index = 77, label = 'Cyan Blue'},
            { index = 78, label = 'Cobalt'},
            { index = 79, label = 'Electric Blue'},
            { index = 80, label = 'Horizon Blue'},
            { index = 82, label = 'Blue Metallic'},
            { index = 83, label = 'AquamarinE'},
            { index = 84, label = 'Blue Agathe'},
            { index = 85, label = 'Zirconium'},
            { index = 86, label = 'Spinel'},
            { index = 87, label = 'Tourmanline'},
            { index = 127, label = 'Paradise'},
            { index = 140, label = 'Bubble Gum'},
            { index = 141, label = 'Midnight Blue'},
            { index = 146, label = 'Forbidden Blue'},
            { index = 157, label = 'Glacier Blue'}
        }
    elseif color == 'yellow' then
        colors = {
            { index = 42, label = 'Yellow'},
            { index = 88, label = 'Wheat'},
            { index = 89, label = 'Race Yellow'},
            { index = 91, label = 'Pale Yellow'},
            { index = 126, label = 'Light Yellow'}
        }
    elseif color == 'green' then
        colors = {
            { index = 49, label = 'Metallic Dark Green'},
            { index = 50, label = 'Rally Green'},
            { index = 51, label = 'Pine Green'},
            { index = 52, label = 'Olive Green'},
            { index = 53, label = 'Light Green'},
            { index = 55, label = 'Lime Green'},
            { index = 56, label = 'Forest Green'},
            { index = 57, label = 'Lawn Green'},
            { index = 58, label = 'Imperial Green'},
            { index = 59, label = 'Breen Bottle'},
            { index = 92, label = 'Citrus Green'},
            { index = 125, label = 'Green Anis'},
            { index = 128, label = 'Khaki'},
            { index = 133, label = 'Army Green'},
            { index = 151, label = 'Dark Green'},
            { index = 152, label = 'Hunter Green'},
            { index = 155, label = 'Matte Green'}
        }
    elseif color == 'orange' then
        colors = {
            { index = 36, label = 'Tangerine'},
            { index = 38, label = 'Orange'},
            { index = 41, label = 'Matte Orange'},
            { index = 123, label = 'Light Orange'},
            { index = 124, label = 'Peach'},
            { index = 130, label = 'Pumpkin'},
            { index = 138, label = 'Orange Lambo'}
        }
    elseif color == 'brown' then
        colors = {
            { index = 45, label = 'Copper'},
            { index = 47, label = 'Light Brown'},
            { index = 48, label = 'Dark Brown'},
            { index = 90, label = 'Bronze'},
            { index = 94, label = 'Metallic Brown'},
            { index = 95, label = 'Espresso'},
            { index = 96, label = 'Chocolate'},
            { index = 97, label = 'Terracotta'},
            { index = 98, label = 'Marble'},
            { index = 99, label = 'Sand'},
            { index = 100, label = 'Sepia'},
            { index = 101, label = 'Bison'},
            { index = 102, label = 'Palm'},
            { index = 103, label = 'Caramel'},
            { index = 104, label = 'Rust'},
            { index = 105, label = 'Chestnut'},
            { index = 108, label = 'Brown'},
            { index = 109, label = 'Hazelnut'},
            { index = 110, label = 'Shell'},
            { index = 114, label = 'Mahogany'},
            { index = 115, label = 'Cauldron'},
            { index = 116, label = 'Blond'},
            { index = 129, label = 'Gravel'},
            { index = 153, label = 'Dark Earth'},
            { index = 154, label = 'Desert'}
        }
    elseif color == 'purple' then
        colors = {
            { index = 71, label = 'Indigo'},
            { index = 72, label = 'Deep Purple'},
            { index = 76, label = 'Dark Violet'},
            { index = 81, label = 'Amethyst'},
            { index = 142, label = 'Mystic Violet'},
            { index = 145, label = 'Purple Metallic'},
            { index = 148, label = 'Matte Violet'},
            { index = 149, label = 'Matte Deep Purple'}
        }
    elseif color == 'chrome' then
        colors = {
            { index = 117, label = 'Brushed Chrome'},
            { index = 118, label = 'Black Chrome'},
            { index = 119, label = 'Aluminum'},
            { index = 120, label = 'Chrome'}
        }
    elseif color == 'gold' then
        colors = {
            { index = 37, label = 'Gold'},
            { index = 158, label = 'Pure Gold'},
            { index = 159, label = 'Brushed Gold'},
            { index = 160, label = 'Light Gold'}
        }
    end

    return colors
end

Code is accessible No
Subscription-based No
Lines (approximately) LUA: ~1100 UI: ~300
Support Yes