Configuration
Translationsβ
Copy the config from langde.txt into your lang.json for a german translation.
You can rewrite all strings as you like in config/lang.json.
Some of them use a variable:
"showWin"
%v%
: player
%v2%
: win
"spendForFreeCase"
%v%
: number of coins
"youBought" > "title"
%v%
: product that was purchased
Configurationβ
You can customize the script in the config.json.
"tebexSecretKey"
Here you have to specify your tebex secret key so that the script can query the purchases of your customers via the tebex api. How to find the key https://docs.tebex.io/store/faq#how-can-i-find-my-secret-key
"tebexPlus"
Only enable if you have tebex plus, required for displaying claimable payments. Else Users have to claim with payment id.
"discordLogs" > "redeem"
Discord webhook to log the redeemed purchases.
"discordLogs" > "purchases"
Discord webhook to log the purchases in the script.
"discordLogs" > "goodCaseWins"
Discord webhook to log the good wins, when a win is "good" can be defined in "cases" > "showWinsFromStage"
.
"keyMapping"
Here you can specify the key with which the menu should be opened.
"currencyIcons"
Set here the characters that will be displayed behind the prices, you can also use whole words.
"main"
Choose here which functions you want to use in the script.
"cases" > "payWith"
Choose here which payment methods you want to use for cases and which should be displayed as categories.
"cases" > "showWinsToEveryone"
Choose here if you want to show good wins to all players on the server.
"cases" > "showWinsFromStage"
Specify the rarity level from which the wins should be shown.
"cases" > "spinEffectOnCaseOpening"
Specify here if you want to have an animation when opening the cases or if the win should be shown immediately.
"cases" > "enableSoundOnCaseSpin"
Specify here if you want a sound effect to be played when the case is opened.
"cases" > "enableSoundOnWin"
Specify here if a sound effect should be played when the win is displayed.
"cases" > possibilities
Here you can change the probabilities, all should add up to 1 => 0.01 = 1%.
"shop" > "categorys"
Here you can set your shop categories.
"adminPermissionGroups"
Specify the groups that should have access to /givecoins /removecoins and /gencode.
"codeGenLength"
Here you can set the length of the codes that will be generated.
Tebex productsβ
Under packages.json you have to specify your tebex products and how many coins the player should get. It is important that the name is specified correctly.
Ingame productsβ
You can set the products you want to have in the store in the respective files (cases.json, store.json, packs.json).
Square brackets are arrays [] means you can put as many things in there as you want, you can copy objects and paste them under a comma and rewrite them.
The configs are modular means you can use the following structure everywhere:
Vehicles:
{
"type": "vehicle", // the type, in this case "vehicle".
"garage": "car", // type of garage the vehicle should be in, you can use it in garage.lua
"model": "t20" // spawn name of the vehicle
}
Weapons:
Make sure that the weapon and its components are set correctly in es_extended/config.weapons.lua.
{
"type": "weapon", // the type, in this case "weapon".
"weapon": "WEAPON_SPECIALCARBINE_MK2", // spawn name of the weapon
"ammo": 200, // ammo to be given with the weapon
"tint": 14, // the color of the weapon (ESX 1.2 and higher)
"components": [
// components that the weapon has
"flashlight"
]
}
Items:
{
"type": "item", // the type, in this case "item".
"name": "bulletproof", // name of the item as it is in the database
"amount": 1 // amount to be given
}
Money:
{
"type": "money", // the type, in this case "money".
"amount": "100000" // amount to be given
}
Coins:
{
"type": "coins", // the type, in this case "coins".
"amount": "5" // amount to be given
}
Custom:
You can code your own custom items in config/custom and add them to the configs with the following structure.
{
"type": "custom" // the type, in this case "custom".
// after the type you can create your own structure which you can use in the code
}
For Packs you have to add a label to each item, under which it should be displayed.
"label": "Progen T20",
Casesβ
"progressCase"
Here you can define the content of the bonus case.
"progressCase" > "coinsToSpend"
How much the player has to spend in coins to open the bonus case.
"coinCases" & "cashCases"
Here you can insert cases for the respective payment method, the structure is the same everywhere.
Shop & Packsβ
"pay"
Specify the payment method here, choose between "coins" and "money".
garage.luaβ
In this file you can adapt the code to your garage system if necessary. The parameter "garage" can be used if there are several garage types, e.g. for boats and airplanes.