This resource is a simple approach to dealerships in FiveM.
Over 500 vehicles have been put into respect JSON files meaning no SQL is needed at all. Additionally, this resource is highly configurable from Dealer locations, blips, blacklisted vehicles/categories, and more!
Here’s a preview if you want to see.
Config Preview
Config = {
["StatCharacter"] = ">", --[[ This is the character used for making the stat bars found when viewing the vehicle handling, top speed, etc. ]]
["InsideDistance"] = 3.0, --[[ This is the distance in meters that you need to be within to access each dealership menu. ]]
["Controls"] = {
["MenuRight"] = {
["ID"] = 307, --[[ Control ID, all control IDs can be found here: https://docs.fivem.net/docs/game-references/controls/]]
["Label"] = "INPUT_REPLAY_ADVANCE" --[[ Control label, all control labels can be found here: https://docs.fivem.net/docs/game-references/controls/ prefixed with a INPUT_ ]]
},
["MenuLeft"] = {
["ID"] = 308,
["Label"] = "INPUT_REPLAY_BACK"
},
["MenuUp"] = {
["ID"] = 191,
["Label"] = "INPUT_FRONTEND_RDOWN"
},
["MenuDown"] = {
["ID"] = 194,
["Label"] = "INPUT_FRONTEND_RRIGHT"
},
["Delete"] = {
["ID"] = 178,
["Label"] = "INPUT_CELLPHONE_OPTION"
}
},
["Dealers"] = {
{
["Name"] = "Simeon\'s Dealership", --[[ Dealership name, this appears on both the blip name and the first page of the dealer menu. ]]
["Coords"] = vector3(-29.491, -1103.992, 25.422), --[[ Dealership coordinates, this is the place you need to stand to access the dealership menu. This is also used to place the dealership blip. ]]
["Preview"] = {
["Coords"] = vector4(-11.673, -1084.026, 25.676, 0.0), --[[ These are the coordinates for the position of the preview vehicle. ]]
["CamCoords"] = vector3(-16.365, -1087.973, 28.752), --[[ These are the coordinates for the position of the preview camera. ]]
["Rotate"] = true --[[ If true the preview vehicle will rotate while being viewed. ]]
},
["ForSale"] = json.decode(LoadResourceFile(GetCurrentResourceName(), "Data/Vehicles.json")), --[[ This loads the file containing all the vehicles for this dealer as found in the Data folder. ]]
["Blip"] = {
["Sprite"] = 225, --[[ This is the sprite of the blip that marks this dealership, all blip sprites and their according ID can be found here: https://docs.fivem.net/docs/game-references/blips/ ]]
["Scale"] = 1.0, --[[ Blip scare decides the scale of the blip, a larger value means the blip will appear larger on the map. ]]
["Color"] = 0 --[[ Blip colour, all colours can be found here: https://docs.fivem.net/docs/game-references/blips/ at the bottom of the page. ]]
},
["AddSizeOffset"] = false, --[[ If true vehicles will be moved back relative to their spawn position if they are large enough. ]]
["BlacklistedCategories"] = { --[[ Array of blacklisted categories. ]]
-- "Sedans"
},
["BlacklistedVehicles"] = { --[[ Array of blacklisted vehicles. ]]
-- "Zentorno"
}
},
{
["Name"] = "L.S.I.A. Aircraft Shop",
["Coords"] = vector3(-928.156, -2995.046, 18.845),
["Preview"] = {
["Coords"] = vector4(-953.14, -2990.46, 12.96, 239.48),
["CamCoords"] = vector3(-923.605, -3007.041, 21.954),
["Rotate"] = true
},
["ForSale"] = json.decode(LoadResourceFile(GetCurrentResourceName(), "Data/Aircraft.json")),
["Blip"] = {
["Sprite"] = 307,
["Scale"] = 1.0,
["Color"] = 0
},
["AddSizeOffset"] = true,
["BlacklistedCategories"] = {},
["BlacklistedVehicles"] = {}
},
{
["Name"] = "Boat Shop",
["Coords"] = vector3(-743.65, -1505.37, 5.00),
["Preview"] = {
["Coords"] = vector4(-794.88, -1500.94, 0.0, 290.01),
["CamCoords"] = vector3(-775.88, -1495.26, 6.02),
["Rotate"] = true
},
["ForSale"] = json.decode(LoadResourceFile(GetCurrentResourceName(), "Data/Boats.json")),
["Blip"] = {
["Sprite"] = 410,
["Scale"] = 1.0,
["Color"] = 0
},
["AddSizeOffset"] = false,
["BlacklistedCategories"] = {},
["BlacklistedVehicles"] = {}
},
{
["Name"] = "Helicopter Shop",
["Coords"] = vector3(-702.81, -1393.39, 8.56),
["Preview"] = {
["Coords"] = vector4(-724.80, -1444.25, 4.0, 319.89),
["CamCoords"] = vector3(-713.01, -1430.19, 9.00),
["Rotate"] = true
},
["ForSale"] = json.decode(LoadResourceFile(GetCurrentResourceName(), "Data/Helicopters.json")),
["Blip"] = {
["Sprite"] = 43,
["Scale"] = 1.0,
["Color"] = 0
},
["AddSizeOffset"] = false,
["BlacklistedCategories"] = {},
["BlacklistedVehicles"] = {}
}
}
}
More details/features can be found on the Tebex product page (£4.99).
You may also be interested in some of my other released here: