Samurai Scripts
Discord Server
  • 👋Welcome
  • Paid Scripts
    • 💊SM-drugdelivery
      • 📜Installation
      • 📔Configurables
      • 🗂️Events/exports
    • 💻SMR-tebexwrapper
      • 📜Installation
      • 📜Tebex store setup
      • 📔Configurables
      • 🗂️Events/exports
    • 🔫SMR-weaponexam
      • 📜Installation
      • 📔Configurables
      • 🗂️Events/exports
  • Tebex url
  • Discord Server
  • Free Scripts
Powered by GitBook
On this page
  • Config
  • Opensource
  1. Paid Scripts
  2. SMR-tebexwrapper

Configurables

Config

```lua
Config = {}


Config.locales = { -- Locales, u can put ur own text in here
    ['cheater_kick'] = 'Cheater tried to give himself coins!',
    ['missing_json_data'] = 'Invalid command usage. JSON data missing.',
    ['json_parse_failure'] = 'Failed to parse JSON data.',
    ['missing_transaction_id_or_package'] = 'Missing transaction ID or package name in the JSON data.',
    ['transaction_check_start'] = 'Transaction check started for player:',
    ['coins_received'] = 'You received {coins} coins!',
    ['account_creation_failed'] = 'Failed to create new account. Please try again.',
    ['invalid_package'] = 'Invalid package. Please contact support.',
    ['transaction_not_found'] = 'Transaction not found. Please check your transaction ID.',
    ['server_error_invalid_player'] = 'Server error: Invalid player data',
    ['gift_card_check_start'] = 'Starting gift card check for code: {code}, player: {player}',
    ['gift_card_redeemed'] = 'Gift card redeemed! You received {coins} coins!',
    ['balance_update_failed'] = 'Failed to update balance. Please try again.',
    ['gift_card_redeem_failed'] = 'Failed to redeem gift card. Please try again.',
    ['invalid_or_expired_gift_card'] = 'Invalid or expired gift card. Please check your code.',
    ['package_received'] = 'You received {package}!',
    ['too_many_attempts'] = '[SMR] Tokenizer Bye bye cheater!',
}

Config.commandname = 'shop' -- the comand name for the shop.

Config.discordwebhookurl = '' -- The discordwebhookurl replace it with urs!

Config.PackageRewards = { -- the package rewards, replace these with ur tebex package name so example if u have ur package called "coins" then put coins in here! and the player will recive the number u put in there.
    ['example'] = 100, 
}
```

Opensource

```lua
Config.categories = { --  the categories u will see in the ui. 
    ["cars"] = {
        name = "Food Bundles", -- the main category name
        label = "Hungry? We got u covered", -- the label 
        icon = "fa-hamburger", -- the fontawesome icon name. 
        items = {
            ['example'] = true, -- the item names of the products.lua these will show in this cattegory
        },
    },
}
```

```lua -- The reward types u can make ur own logic in here to make ur own custom rewards
Config.RewardTypes = {
    ['item'] = function(player, itemName, quantity)
        local source = source
        local p = FM.player.get(source)
        if p then
            p.addItem(itemName, quantity)
        else
            print("Failed to find player for item reward")
        end
    end,

    ['weapon'] = function(player, weaponName, _)
        local source = source
        local p = FM.player.get(source)
        if p then
            p.addItem(weaponName, 1)
        else
            print("Failed to find player for weapon reward")
        end
    end,

    ['vehicle'] = function(player, vehicleModel)
        local source = source
        local p = FM.player.get(source)
        if p then
            MySQL.Async.insert(
                'INSERT INTO owned_vehicles (owner, plate, vehicle, type, stored) VALUES (?, ?, ?, ?, ?)',
                {p.getIdentifier(), 'SHOP' .. math.random(10000, 99999), vehicleModel, 'car', 1})
        else
            print("Failed to find player for vehicle reward")
        end
    end,

    ['money'] = function(player, _, amount)
        local source = source
        local p = FM.player.get(source)
        if p then
            p.addMoney(amount, "money")
        else
            print("Failed to find player for money reward")
        end
    end,

    ['blackmoney'] = function(player, _, amount)
        local source = source
        local p = FM.player.get(source)
        if p then
            p.addMoney(amount, "black_money")
        else
            print("Failed to find player for black money reward")
        end
    end
}

```

```lua -- Products.lua
Config.products = { -- These are the products that will show in the UI
    ['6531036'] = { -- example ITEM id, these u defined in the Config.Items
        title = 'Food Package',  -- example title
        description = 'Food package with this package you will get some water and bread!', -- example description
        image = '', -- Image URL
        price = 1000,
    },

```
PreviousTebex store setupNextEvents/exports

Last updated 5 months ago

💻
📔