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

RENT A CAR

  1. Shop Locations and Blips Define the locations for your car shop, including coordinates, NPC details, and spawn positions for purchased cars.

Config.Locations = {
    { 
        coords = vector3(235.081314, -817.780212, 29.223389),
        hash = "a_m_o_soucent_01",
        heading = 340.157471,
        marker = "Rent",
        BuyCarSpawnPositions = {
            [1] = vector4(206.2538, -801.118, 31.001, 249.448822),
            [2] = vector4(207.1145, -798.583, 30.987, 249.448822),
            [3] = vector4(208.1531, -796.111, 30.965, 249.448822),
            [4] = vector4(208.9542, -793.656, 30.947, 249.448822),
            [5] = vector4(209.9097, -791.195, 30.925, 249.448822)
        },
    },
}

2. Vehicle Fuel Level

A function to get the fuel level of a vehicle.

Config.GetVehFuel = function(Veh)
    return GetVehicleFuelLevel(Veh)-- exports["LegacyFuel"]:GetFuel(Veh)
end

3. Framework Integration

A function to integrate the script with different frameworks like ESX, NewESX, and QBCore.

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

4. Blip Creation

A function to create blips on the map for each car shop location.

EYES = {}
EYES.Functions = {
    CreateBlips = function()
        for k,v in pairs(Config.Locations) do 
            local blip = AddBlipForCoord(v.coords)
            SetBlipSprite(blip, 380)
            SetBlipScale(blip, 0.5)
            SetBlipAsShortRange(blip, true)
            SetBlipColour(blip, 2)
            BeginTextCommandSetBlipName("STRING")
            AddTextComponentString("Rent")
            EndTextCommandSetBlipName(blip)
        end
    end
}

5. Vehicle Key Management

A function to manage vehicle keys.

Config.Carkeys = function(Plate)
    TriggerEvent('vehiclekeys:client:SetOwner', Plate)
end

6. Vehicle Options

List of vehicles available for purchase, including their label, description, price, model, and size.

Config.Vehicles = {
    {
        label = 'Zentorno',
        description = 'High-Performance Supercar',
        price = 1,
        model = 'zentorno',
        size = '100',
    },
    {
        label = 'Sandking XL',
        description = 'Off-Road Pickup Truck',
        price = 80100,
        model = 'sandking',
        size = '100',
    },
    {
        label = 'Sultan',
        description = 'Sports Sedan',
        price = 65100,
        model = 'sultan',
        size = '115',
    },
    {
        label = 'Blista',
        description = 'Sport',
        price = 35100,
        model = 'blista',
        size = '100',
    },
    {
        label = 'Ponche S',
        description = 'Luxury Sport',
        price = 100100,
        model = 'porsche',
        size = '105',
    },
    {
        label = 'T20 S',
        description = 'Sport T',
        price = 50100,
        model = 't20',
        size = '100',
    },
    {
        label = 'Sport Car',
        description = 'High-Performance Supercar',
        price = 350100,
        model = 'zentorno',
        size = '100',
    },
    {
        label = 'Test XL',
        description = 'Off-Road Pickup Truck',
        price = 80100,
        model = 'sandking',
        size = '100',
    },
    {
        label = 'Amazing Sport',
        description = 'Sports Sedan',
        price = 65100,
        model = 'sultan',
        size = '115',
    },
    {
        label = 'S Car',
        description = 'Sport',
        price = 35100,
        model = 'blista',
        size = '100',
    },
    {
        label = 'B Car',
        description = 'Luxury Sport',
        price = 100100,
        model = 'porsche',
        size = '105',
    },
    {
        label = 'C Car',
        description = 'Sport T',
        price = 50100,
        model = 't20',
        size = '100',
    },
}

Summary

This guide helps you configure car shops in your FiveM server by providing detailed examples for general configuration, shop locations, vehicle options, and other customization settings. Customize each section to fit your server's needs and integrate these configurations into your GitBook documentation for clear and comprehensive instructions for your users.

PreviousGUNSHOPNextCRAFTING

Last updated 11 months ago