Configuration

Configuration of mVehicleshop v2 Resource

Framework

Select the framework you are using on your server.

Config.Framework = 'autodetect' -- esx, oldesx, qb, oldqb, autodetect

SQL Database

Select the database system you are using on your server.

Config.SQL = "oxmysql" -- oxmysql, ghmattimysql, mysql-async

Language

Select the language of your server.

Config.Locale = 'en' -- en, fr, pt-br, pt-pt, urdu, hu

Default Profile Picture

You can set the default profile picture for employees profiles. If you put your discord bot token it will automaticly get the discord profile photo of the players.

Config.DefaultImage = './assets/images/example-pp.png'

Currency

Type your currency mark you are using on your server.

Config.Currency = "$"

PDM Fee

Each time players get a vehicle they pay a little amount of PDM Fee. You can adjust the fee amount from here.

Config.PDMFee = 1200

Custom Plate And Fee

When players try buy a custom plate they pay a custom plate fee. You can adjust this fee amount from here.

Config.CustomPlateFee = 6000

If you don't want to use custom plate feature in this resource you can set this value to false.

Config.EnableCustomPlate = true

Automatic Log Delete

Resource has an automatic log clear system after days to prevent high server log load on your server. You can adjust the log deletion after days parameter from here.

Config.DeleteLogDays = 1 -- Set this to 0 if you don't want any logs to be deleted. If you want to use it, specify a number of days and logs more than the number of days you enter will be deleted.

Comissions For Employees

You can adjust the default comission percentage that employees get when they sell a vehicle.

Config.DefaultCommission = 10

Bossmenu As An Item

If you want your players to access to bossmenu with item you can make this parameter as true.

Config.EnableBossMenuItem = true
Config.BossMenuItem = 'vehshoptablet'

Admin Moderation

You can set which admin ranks can be able to access vehicleshop's admin menu from here.

Admins can access to admin menu by typing the console " vehshopadmin " command.

Config.Admins = {
    "admin",
    "superadmin",
    "god",
    "mod",
    "moderator",
}

Order Delivery Time Interval

When an employee orders a vehicle there is an estimated delivery time of the vehicles. This system made for preventing employees to quickly get vehicles from the dockside and refilling their shops stocks. However you can set the " Math.Random " value to 0,0 if you don't want to use this feauture. Or you can make an adjustments.

Config.EstDeliveryTime = function()
    return math.random(1800, 3600) -- set this to math.random(0, 0) if you dont want any wait time when new vehicle is ordered
end

Salary Payment by Time

You can adjust at how often the players gets their salary in the vehicleshop. Please be aware that players salary is deducted from vehicleshop's vaults.

Config.PaySalaryInterval = 30 -- how often to recieve pay checks in minutes

Vehicleshop Ranks

You can adjust the rank properties from here. These ranks are in the vehicleshop's bossmenu.

Config.Ranks = {
    {
        name = 'recruit', 
        label = 'Recruit',
        isBoss = false,
        payment = 500,
    },
    {
        name = 'supervisor', 
        label = 'Supervisor',
        isBoss = false,
        payment = 1000,
    },
    {
        name = 'manager',
        label = 'Manager',
        isBoss = false,
        payment = 1500,
    },
    {
        name = 'boss', 
        label = 'Boss',
        isBoss = true,
        payment = 5000,
    },
}

Interaction Handler

Select the interaction handler system you are using on your server.

Config.InteractionHandler = {
    marker = true,
    drawtext = true,
    qb_textui = {
        enable = false,
    },
    esx_textui = {
        enable = false,
    },      
    okoktextui = {
        enable = false,
        position = "left", -- 'right' / 'left'
        color = "lightblue"        -- 'lightblue' / 'darkblue' / 'lightgreen' / 'darkgreen' / 'lightred' / 'darkred' / 'lightgrey' / 'darkgrey'
    }, 
    codemtextui = {
        enable = false,
        keytext = "E",
        theme = "thema-6"
    },
    ethTextUI = {
        enable = false,
    },
    marker = {
        type = 2,
        size = 0.7,
        r = 255,
        g = 255,
        b = 255,
        a = 255,
    },  
    openKey = 38, 
    bossmenu_text = 'PRESS E TO OPEN BOSSMENU',
    vehicleshop_text = 'PRESS E TO OPEN VEHICLESHOP',
    deliver_text = "PRESS E TO DELIVER"
}

Vehicle Test

You can set a vehicle testing area and vehicle test duration from here.

Config.VehicleTest = {
    coords = vector4(-884.99, -3209.10, 12.92, 56.69),
    time = 30, -- seconds
}

Blip Settings

You can adjust the vehicleshops blips adjustments from here.

Config.Blip = {
    enable = true,
    sprite = 326,
	display = 4,
	scale = 0.8
}

Multiple Vehicle Shops

You can able to put as much as you want vehicleshops to server direclty from config file.

Config.VehicleShops = {
    {
        id = 1,
        name = 'PDM',
        bossmenu = {
            location = vector3(-31.173, -1110.96, 26.415),
        },
        vehicleshop = {
            location = vector3(-34.193, -1103.93, 26.41),
            preview_location = vector4(-42.60, -1098.22, 25.41, 70.8),
            camera_location = vector3(-47.5, -1099.5, 26.3),
            camera_rotate = vector3(0.0, 0.0, -70.0),
            spawnAfterPurchaseLocations = {
                vector4(-44.94, -1116.83, 26.65, 0.0),
                vector4(-47.60, -1116.28, 26.65, 0.0),
                vector4(-50.43, -1116.37, 26.65, 0.0),
                vector4(-53.48, -1116.45, 26.65, 0.0),
                vector4(-56.26, -1116.55, 26.65, 0.0),
                vector4(-59.01, -1116.74, 26.65, 0.0),
                vector4(-61.84, -1116.41, 26.65, 0.0),
            },
        },
        delivery = {
            truckSpawnLocation = vector4(-46.45, -1075.46, 25.75, 68.03),
            truck_model = 'phantom',
            trailerSpawnLocation = vector4(1012.53, -3054.25, 4.8, 85.039),
        },
        defaultStocks = {
            {
                manufacturer = 'Vapid',
                label = 'FMJ',
                model = 'fmj',
                amount = 10,
                image = 'Vapid.png',
                category = 'super',
                price = 100000,
            },
            {
                manufacturer = 'Truffade',
                label = 'NERO',
                model = 'nero',
                amount = 10,
                image = 'Truffade.png',
                category = 'super',
                price = 100000,
            },
            {
                manufacturer = 'Pfister',
                label = 'Comet',
                model = 'comet2',
                amount = 10,
                image = 'Pfister.png',
                category = 'sport',
                price = 100000,
            },
        }
    },
 
}

Vehicle Key System

Select you vehicle key system you are using on your server. If you are using your own vehicle key system you can adjust the export paramters in the code as well.

Config.Vehiclekey          = true
Config.VehicleSystem       = "qb-vehiclekeys" -- cd_garage / qs-vehiclekeys / wasabi-carlock / qb-vehiclekeys
function trim(value)
    return (string.gsub(value, '^%s*(.-)%s*$', '%1'))
end

Config.GiveVehicleKey = function(plate, model, vehicle) -- you can change vehiclekeys export if you use another vehicle key system
    if Config.Vehiclekey then
        plate = trim(plate)
        if Config.VehicleSystem == 'cd_garage' then
            TriggerEvent('cd_garage:AddKeys', plate)
        elseif Config.VehicleSystem == 'qs-vehiclekeys' then
            model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
            exports['qs-vehiclekeys']:GiveKeys(plate, model, true)
        elseif Config.VehicleSystem == 'wasabi-carlock' then
            exports.wasabi_carlock:GiveKey(plate)
        elseif Config.VehicleSystem == 'qb-vehiclekeys' then
            TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
        end
    end
end

Notifications

You can adjust the each notification paramters from here.

Config.Notifications = {
    vehicle_spawned = {
        message = "Vehicle is spawned outside your vehicleshop!",
        type = 'success',
    },
    plate_exists = {
        message = "This plate is already exists!",
        type = 'error',
    },
    return_to_veh = {
        message = "Return to your vehicleshop to complete delivery!",
        type = 'error',
    },
    not_allowed = {
        message = "You are not allowed to do this!",
        type = 'error',
    },
    delivered_vehicle = {
        message = "Vehicle has been sent to your laptop stocks. You can do your actions in the laptop!",
        type = 'success'
    },
    invalid_identifier = {
        message = "Invalid identifier!",
        type = 'error',
    },
    invalid_amount = {
        message = "Invalid amount!",
        type = 'error',
    },
    cant_fire_self = {
        message = "You can't fire yourself!",
        type = 'error',
    },
    you_fired = {
        message = "You've been fired",
        type = 'success',
    },
    select_a_vehicle = {
        message =  "Select a vehicle to sign.",
        type = 'error',
    },
    select_a_vehicle_first = {
        message =  "Select a vehicle first.",
        type = 'error',
    },
    invalid_vehicleshop = {
        message =  "Invalid vehicleshop id",
        type = 'error',
    },
    invalid_player = {
        message =  "Invalid Player id",
        type = 'error',
    },
    paper_signed = {
        message = "Paper signed money added to vault! Commission : "..Config.Currency.."%s",
        type = 'success',
    },
    your_vehicle_ready = {
        message = "Your vehicle order has been signed you can get your vehicle from outside of the vehicleshop!",
        type = 'success',
    },
    not_online = {
        message = "Specified player is not online!",
        type = 'error',
    },
    request_sent = {
        message = "Request successfully sent!",
        type = 'success',
    },
    received_salary = {
        message = "You received "..Config.Currency.."%s salary!",
        type = 'success',
    },
    not_enough_company_money = {
        message = "Your company doesn't have enough money in the vault to make you payment!",
        type = 'error'
    },
    not_enough_money = {
        message = "You don't have enough money",
        type = 'error'
    },
    not_enough_stock = {
        message = "Not enough stock!",
        type = 'error'
    },
    received_salary = {
        message = "You received "..Config.Currency.."%s salary!",
        type = 'success',
    },
    cant_edit_boss = {
        message = "You can't edit boss rank!",
        type = 'error',
    },
    lowest_rank = {
        message = "Player is already at the lowest rank!",
        type = 'error',
    },
    highest_rank = {
        message = "Player is already at the highest rank!",
        type = 'error',
    },
    already_boss = {
        message = "Specified player is already the boss!",
        type = 'error',
    },
    rank_changed = {
        message = "Rank successfully changed!",
        type = 'success',
    },
    invalid_link = {
        message = "Invalid link!",
        type = 'error',
    },
    invalid_category = {
        message = "Invalid category name!",
        type = 'error',
    },
    category_already_exist = {
        message = "This category is already exists!",
        type = 'error',
    },
    category_created = {
        message = "Category is successfully created!",
        type = 'success',
    },
    stock_changed = {
        message = "Stock successfully changed!",
        type = 'success',
    },
    delivery_is_active = {
        message = "Delivery of this vehicle has already started!",
        type = 'error',
    },
    no_space = {
        message = "There is no space in the vehicleshop please get your vehicle from the garage.",
        type = 'error',
    },
    invalid_plate_length = {
        message = "Invalid plate length. (Max : 8)",
        type = 'error',
    },
    invalid_value = {
        message = "Invalid value",
        type = 'error',
    },
    deleted_category = {
        message = "Category deleted",
        type = 'success',
    },
    cant_delete_default_category = {
        message = "You can't delete default category",
        type = 'error',
    },
    ordered_vehicle = {
        message = "Vehicle is ordered! Get your vehicle from Ordered Vehicles category.",
        type = 'success',
    }

}

Last updated