Config File

1

shared/config.lua

Config = {}

Config.Peds = {
    Ped = "mp_m_shopkeep_01",
    PedCoords = vector4(-31.0427, -1097.3915, 26.2744, 71.2939),
    Blip = {
        Name = "Sklep samochodowy",
        Scale = 0.8,
        Sprite = 52,
        Colour = 69,
    }
}

Config.Vehicle = {
    CameraPosition = vector4(-44.7063, -1097.8643, 28.6336, 49.5247),
    CameraRot = vector3(-15.0, 0.0, 73.0231),
    CreateVehiclePositionInVehicleShop = vector4(-47.3633, -1092.2872, 27.3023, 215.0002),
    CreateVehicleCoords = vector4(-23.4756, -1093.9153, 27.3052, 339.7768),
    TestDriveCoords = vector4(-14.7149, -1092.3748, 27.0631, 161.3782),
    TeleportPlayerAfterTestDrive = vector4(-32.9041, -1096.9708, 27.2744, 253.6917),
    TestDrivePlateName = "TEST CAR"
}

Config.Categories = {
    ["Sedan"] = {
        label = "Sedan"
    },
    ["Suv"] = {
        label = "Suv"
    },
    ["Offroad"] = {
        label = "Offroad"
    },
    ["Super"] = {
        label = "Super"
    },
    ["Muscle"] = {
        label = "Muscle"
    },
    ["Classic"] = {
        label = "Classic"
    }
}

Config.VehicleList = {
    ['sultan'] = {
        label = "Sultan",
        price = 4100,
        img = "/html/img/sultan.png",
        category = "Sedan",
        speed = 50,
        braking = 10,
        accleration = 90,
    },
    ['adder'] = {
        label = "Adder",
        price = 9100,
        img = "/html/img/adder.png",
        category = "Super",
        speed = 70,
        braking = 60,
        accleration = 85,
    },
    ['buffalo'] = {
        label = "Buffalo",
        price = 5000,
        img = "/html/img/buffalo.png",
        category = "Muscle",
        speed = 55,
        braking = 40,
        accleration = 75,
    },
    ['elegy'] = {
        label = "Elegy",
        price = 6000,
        img = "/html/img/elegy.png",
        category = "Super",
        speed = 65,
        braking = 50,
        accleration = 80,
    },
    ['zentorno'] = {
        label = "Zentorno",
        price = 7500,
        img = "/html/img/zentorno.png",
        category = "Super",
        speed = 80,
        braking = 70,
        accleration = 95,
    },
    ['t20'] = {
        label = "T20",
        price = 8200,
        img = "/html/img/t20.png",
        category = "Super",
        speed = 85,
        braking = 75,
        accleration = 98,
    },
    ['dominator'] = {
        label = "Dominator",
        price = 4300,
        img = "/html/img/dominator.png",
        category = "Muscle",
        speed = 60,
        braking = 45,
        accleration = 70,
    },
    ['gauntlet'] = {
        label = "Gauntlet",
        price = 4500,
        img = "/html/img/gauntlet.png",
        category = "Muscle",
        speed = 58,
        braking = 42,
        accleration = 72,
    },
    ['banshee'] = {
        label = "Banshee",
        price = 7000,
        img = "/html/img/banshee.png",
        category = "Super",
        speed = 78,
        braking = 65,
        accleration = 90,
    },
    ['comet2'] = {
        label = "Comet",
        price = 7800,
        img = "/html/img/comet2.png",
        category = "Super",
        speed = 77,
        braking = 63,
        accleration = 92,
    },
    ['chino'] = {
        label = "Chino",
        price = 3900,
        img = "/html/img/chino.png",
        category = "Classic",
        speed = 40,
        braking = 30,
        accleration = 50,
    },
    ['mesa'] = {
        label = "Mesa",
        price = 2500,
        img = "/html/img/mesa.png",
        category = "Offroad",
        speed = 45,
        braking = 35,
        accleration = 55,
    },
    ['sandking'] = {
        label = "Sandking",
        price = 5800,
        img = "/html/img/sandking.png",
        category = "Offroad",
        speed = 50,
        braking = 40,
        accleration = 60,
    },
    ['kamacho'] = {
        label = "Kamacho",
        price = 6000,
        img = "/html/img/kamacho.png",
        category = "Offroad",
        speed = 55,
        braking = 42,
        accleration = 65,
    },
}

Config.TestDrive = {
    Time = 15000,
    Label = "Testujesz pojazd",
    Position = "bottom" -- https://overextended.dev/ox_lib/Modules/Interface/Client/progress
}

Config.Notify = {
    DontHaveMoney = {
        title = "Nie masz wystarczajΔ…co pieniΔ™dzy",
        description = "Nie masz wystarczajΔ…cej iloΕ›ci gotΓ³wki",
        type = "error",
        duration = 5000
    },
    SuccessBuy = {
        title = "Zakupiono pojazd",
        description = "PomyΕ›lnie zakupiono pojazd",
        type = "success",
        duration = 5000
    },
    TestingCar = {
        title = "Testujesz pojazd",
        description = "Testujesz pojazd, po zakoΕ„czeniu testu pojazd zostanie usuniΔ™ty",
        type = "success",
        duration = 15000
    }
}

Config.Target = {
    icon = "fa fa-car",
    label = "OtwΓ³rz katalog",
    distance = 2.5
}
2

server/functions.lua

local webhook = "your webhook"

function sendWebhook(playerName, vehicleName, priceVehicle, plate, type, source, text, img)
    local xPlayer = ESX.GetPlayerFromId(source)

    local payload = {
        embeds = {
            {
                title = "πŸ“’ " .. text,
                description = "**πŸ‘€ Gracz:** `" .. playerName .. "`\n" ..
                    "**πŸš— Pojazd:** `" .. vehicleName .. "`\n" ..
                    "**πŸ’° Cena:** `$" .. priceVehicle .. "`\n" ..
                    "**πŸ“‹ Tablica rejestracyjna:** `" .. plate .. "`\n" ..
                    "**⏰ Data:** `" .. os.date("%Y-%m-%d %H:%M:%S") .. "`\n" ..
                    "**πŸ†” Identyfikator:** `" .. (xPlayer.identifier or "Brak ID") .. "`",
                color = 16711680,
                footer = {
                    text = text,
                    icon_url = img
                },
                thumbnail = {
                    url = img
                }
            }
        }
    }

    PerformHttpRequest(
        webhook,
        function(err, text, headers)
        end, "POST", json.encode(payload), { ["Content-Type"] = "application/json" })
end

function addCarKeys(source, plate)
    -- Put your export/server-event here
end

Last updated