☰ All guides
6-donatorshop
Vehicle shop for donators: categories for in-game money and for keys that you hand out through Tebex, with test drives and Discord logs.
Resource folder
six_importshop
01Requirements
- ESX (1.1, 1.2 or Legacy). QB-Core is not supported.
oxmysql- The tables
usersandowned_vehiclesof ESX.
Good to know
The resource folder is called six_importshop, not six_donatorshop.
02Installation
- 01Sign in to the Cfx Portal with the account you bought with and download the script under Granted Assets.
- 02Unzip the download and move the folder
six_importshopinto theresourcesfolder of your server. Keep the folder name and upload every file, including the hidden.fxap. - 03Open
config/config.luaand enter your vehicles and positions. Openconfig/webhooks.luaand enter your Discord webhook. - 04Add
ensure six_importshopto yourserver.cfg, belowes_extendedandoxmysql. - 05Restart the server (or run
refreshand thenensurewith the folder name in the server console).
On start the script adds the column Import_Keys to your users table by itself. If the server console shows an SQL error about Import_Keys instead (older versions of the script on MySQL 8), run this once by hand:
ALTER TABLE users ADD COLUMN Import_Keys VARCHAR(255) DEFAULT '{}';
03Commands
Command
- /addKey [playerId] [key] [amount]
- Gives keys to an online player.
keyis a name fromConfig.Shop.Keys, for exampleKey1. For the groups inCommands.addKey.groupsand for the server console. - /removeKey [playerId] [key] [amount]
- Takes keys away.
- /keys
- Shows a player their own keys.
04Selling keys through Tebex
- 01Create a package in Tebex for each key stage.
- 02Add a game server command to the package:
addKey {id} Key1 1.{id}is the player's server ID. - 03Set the command to run only when the player is online. The script can only credit keys to players who are on the server.
Set onlyConsole = true for addKey and removeKey if no admin should be able to hand out keys in-game.
05Configuration
Option
- General.newESX
truefor ESX Legacy (1.2 and newer),falsefor old ESX 1.1.- General.shopCoords
- Where the shop NPC stands.
- General.buyCoords
- Where a bought vehicle spawns.
- General.testCoords
- Where test drives start. A test drive lasts two minutes and ends early when the player leaves the vehicle.
- General.ped / General.blip
- NPC model and map blip.
- Config.bulletin
use = truesends notifications through the resource named inresourceName. Set it tofalseif you don't run that resource.- Config.Commands
- Names, permission groups and
onlyConsolefor the commands. - Shop.Keys
- The key types:
nameis the internal name used in commands,labelis what players see. - Shop.Vehicles.ingame_money
- Categories paid with in-game money. Every vehicle has
model,label,price,img(picture link) andtype. - Shop.Vehicles.keys
- Categories paid with keys.
keynames the key type a vehicle of this category costs.websiteis the link to your store for this category.
Careful
Every category needs its own id. Two categories with the same id overwrite each other.
›config/config.luaComplete file · 109 lines
Config = {}
Config.General = {
newESX = true, -- true if you use the new ESX version
shopCoords = vector4(268.71987915039, -1155.3666992188, 28.290948867798, 93.042747497559),
buyCoords = vector4(250.12022399902, -1157.2799072266, 29.18236541748, 91.88256072998),
testCoords = vector4(1353.0825195312, 628.15649414062, 80.510597229004, 309.92245483398),
ped = "s_m_m_highsec_01",
blip = {
label = "Händler | VIP-Shop",
sprite = 823,
scale = 0.8,
colour = 5,
},
}
Config.bulletin = {
use = true, -- True if you use bulletin Notifications
resourceName = "modern_notify"
}
-- For Tebex you can use the addKey command to add keys to players
Config.Commands = {
addKey = {
command = "addKey", -- Command to add keys
onlyConsole = false, -- Only console can use this command
groups = {"admin"}, -- Groups that can add keys
},
removeKey = {
command = "removeKey",
onlyConsole = false,
groups = {"admin"},
},
keys = {
command = "keys",
},
}
function Notify(text, type, source)
if type == "client" then
ESX.ShowNotification(text)
elseif type == "server" then
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.showNotification(text)
end
end
Config.Shop = {
Keys = {
{ name = "Key1", label = "Stage 1"},
{ name = "Key2", label = "Stage 2"},
{ name = "Key3", label = "Stage 3"},
},
Vehicles = {
ingame_money = { -- Categorys with ingame money currency
{
catName = "VIP - Vehicles", -- Category name
id = 1, -- Category ID (unique!!!)
website = "https://six-6-services.tebex.io",
cars = {
{ model = "t20", label = "Rolls-Royce Spectre", price = 2000000, img = "https://img.gta5-mods.com/q85-w800/images/2024-rolls-royce-spectre-add-on-fivem/c30645-FiveM_b3095_GTAProcess_2024-06-04_18-47-46.jpg", type = "car"},
{ model = "t20", label = "Trabant 601", price = 5000000, img = "https://img.gta5-mods.com/q85-w800/images/trabant-601-universal-add-on-tuning-template-sound-lods/33911a-prew001.png", type = "car"},
-- ...
}
},
},
keys = { -- Categorys with (Tebex) Keys currency
{
id = 3, -- Category ID (unique!!!)
catName = "Stage 1 - Vehicles", -- Category name
key = "Key1",
website = "https://six-6-services.tebex.io",
cars = {
{ model = "minijcwgp20", label = "Mini - Chooper GP", img = "https://img.gta5-mods.com/q85-w800/images/mini-john-cooper-works-gp-2020/334362-1.jpg", type = "car"},
{ model = "minijcwgp20", label = "McLaren 720S", img = "https://img.gta5-mods.com/q85-w800/images/mclaren-720s-liberty-walk-add-on/a31df0-3.png", type = "car"},
-- ...
}
},
{
id = 4,
catName = "Stage 2 - Vehicles",
key = "Key2",
website = "https://six-6-services.tebex.io",
cars = {
{ model = "police", label = "2019 Range Rover Velar",img = "https://img.gta5-mods.com/q75-w500-h333-cfill/images/2018-range-rover-velar/8c0bb7-QQ%E5%9B%BE%E7%89%8720190609113942.jpg", type = "car"},
{ model = "police", label = "Land Rover Range Rover Startech",img = "https://img.gta5-mods.com/q75-w500-h333-cfill/images/land-rover-range-rover-startech/38d093-1.jpg", type = "car"},
-- ...
}
},
{
id = 5,
catName = "Stage 3 - Vehicles",
key = "Key3",
website = "https://six-6-services.tebex.io",
cars = {
{ model = "t20", label = "Mini - Chooper GP", img = "https://img.gta5-mods.com/q85-w800/images/mini-john-cooper-works-gp-2020/334362-1.jpg", type = "car"},
{ model = "t20", label = "Rolls-Royce Spectre", img = "https://img.gta5-mods.com/q85-w800/images/2024-rolls-royce-spectre-add-on-fivem/c30645-FiveM_b3095_GTAProcess_2024-06-04_18-47-46.jpg", type = "car"},
-- ...
}
},
},
}
}
›config/webhooks.luaComplete file · 19 lines
Config_SV = {}
Config_SV.Webhook = {
Link = "https://discord.com/api/webhooks/...", -- Your webhook link
serverName = "6-services",
serverLogo = "https://message.style/cdn/images/c884d8c6c55bf7118ba4380ed450c5eb0729995c8d5cec16539068244c624853.png",
Colors = {
blue = 255,
red = 16711680,
green = 65280,
white = 16777215,
black = 0,
orange = 16744192,
yellow = 16776960,
pink = 16761035,
lightgreen = 65309
}
}
Language and all texts are in config/locals.lua (Config.Language, Config.Locales).
06Still stuck?
Open a ticket on our Discord. Send the script name, your framework and version, and the full error from the server console (F8 for client errors). That saves a round of questions.
