Creating a Cardealer
Config.lua
KOJA.Zones = {
{
name = "Luxury", -- Name of the vehicles list
title = 'Car Dealer', -- Title visible in the ui
desc = 'Example description', -- Description visible in the ui
permissions = {
enable = false, -- Whether permissions are enabled for this zone
groups = {} -- List of groups that have access (if permissions are enabled)
},
blip = {
name = 'Car Dealer', -- Name displayed on the blip info text
coords = vec3(-56.6436, -1098.7725, 26.4223), -- Coordinates of the blip on the map
sprite = 147, -- Blip icon sprite ID
colour = 26, -- Color ID of the blip
scale = 0.8, -- Scale of the blip
visible = true, -- Whether the blip is visible on the map
},
ped = {
pedName = "Mark", -- Name of the ped (displayed above head)
pedHash = 0x2930C1AB, -- Hash of the ped model
pedCoord = vector3(-56.6436, -1098.7725, 26.4223 - 0.99), -- Coordinates where the ped will spawn
pedHeading = 19.5501, -- Heading of the ped
drawText = "[E] - Open Car Dealer", -- Text displayed when near the ped
drawDistance = 20, -- Distance within which the text is visible
drawTextTarget = 'Open Car Dealer' -- Action text in the target menu when looked at. (Only if KOJA.Target is enable)
},
vehicleSpawn = {
coords = vector3(-44.8656, -1097.4705, 26.4223 - 0.99), -- Coordinates where test vehicle will spawn
heading = 100.0, -- Heading of the spawned vehicle
},
vehicleBuySpawn = {
coords = vec3(-13.1227, -1099.2169, 26.6721), -- Coordinates where purchased vehicle will spawn
heading = 160.0 -- Heading of the purchased vehicle
}
},
}
Create a vehicles list and link it to the name section of the zone
KOJA.CarDealer = {
["Luxury"] = {
Categories = {
["Sports"] = {
Cars = {
{name = "Sultan", brand = 'Obey', model = "sultan", price = 250000, rating = 900},
{name = "Sultan RS", brand = 'Obey', model = "sultanrs", price = 250000, rating = 900},
{name = "Elegy RH8", brand = 'Annis', model = "elegy", price = 200000, rating = 850},
{name = "9F Cabrio", brand = 'รbermacht', model = "ninef", price = 500000, rating = 900},
{name = "Omagio", brand = 'Declasse', model = "omnis", price = 500000, rating = 910},
{name = "Adder", brand = 'Truffade', model = "adder", price = 1500000, rating = 920},
}
},
["Muscle"] = {
Cars = {
{name = "Dominator", brand = 'Vapid', model = "dominator", price = 320000, rating = 850},
{name = "Slamvan", brand = 'Chevrolet', model = "slamvan", price = 450000, rating = 800},
{name = "Ruiner", brand = 'Imponte', model = "ruiner", price = 300000, rating = 870},
{name = "Yosemite", brand = 'Declasse', model = "yosemite", price = 400000, rating = 840},
{name = "Phoenix", brand = 'Imponte', model = "phoenix", price = 370000, rating = 860},
}
},
}
},
}
Last updated