Documentation
  • Weed Script
    • Installation
      • RedEM-RP
      • RSG
      • QR CORE
      • QBR CORE
      • VORP
      • SQL
    • Accessible code
  • Report System
    • Installation
    • Accessible code
  • SafeZone Creator
    • Installation
    • SQL File
    • Accessible code
  • Promo Codes Creator
    • Installation
    • Accessible code
  • Player Manager
    • Installation
    • Accessible code
Powered by GitBook
On this page
  1. Promo Codes Creator

Accessible code

Config = {
    locales = 'en',
    versionChecking = true, 
    OxInventory = false,
    QSInventory = false,
    
    moneyTypes = {
        [0] = 'Cash',
        [1] = 'Gold',
    },

    logs = {
        enable = false,
        botName = 'ENPWR TEAM',
        webhook = '',
        colors = {
            ['info'] = 1209030,
            ['success'] = 5024796,
            ['error'] = 12980754,
        }
    },

    fullTune = {
        modEngine = 3,
        modBrakes = 2,
        modTransmission = 2,
        modSuspension = 3,
        modArmor = true,
        windowTint = 1
    },

    commands = {
        {
            name = 'promocodes',
            permission = 'group.admin',
            help = 'Promo codes menu (create code, codes list, delete code)'
        },
        {
            name = 'redeemcode',
            permission = 'group.user',
            help = 'Redeem Promocode'
        },
    },

    InsertHorseToDataBase = function(identifier, charIdentifier, name) -- this function is not the same for every framework
        MySQL.insert('INSERT INTO stables (`identifier`, `charidentifier`, `name`, `type`, `modelname`) VALUES (?, ?, ?, ?, ?)', {
            identifier,
            charIdentifier,
            'Promocodes Reward', -- you can change this
            "horse",
            name
        })
    end
}
Utils = {}

Utils.Notification = function(title, description, type, duration)
    lib.notify({
        title = title,
        description = description,
        type = type,
        duration = duration or 5000
    })
end
Utils = {}

Utils.Notification = function(src, title, description, type, duration)
    TriggerClientEvent('ox_lib:notify', src, {
        title = title,
        description = description,
        type = type,
        duration = duration
    })
end
Translate['en'] = {
    ['menu.promocode_label'] = 'Promocode Menu',
    ['menu.create_promocode'] = 'Create Promocode',
    ['menu.code_list'] = 'Promocode List',
    ['menu.delete_code'] = 'Delete Promocode',

    ['context.no_found'] = 'No promocode found',
    ['context.promocode_list'] = 'Promocodes List',
    ['context.promocode_list_label'] = '%s [ #%s ]',
    ['context.promocode_list_desc'] = 'Select to change promocode settings',
    ['context.edit_promocode_label'] = 'Edit Promocode',
    ['context.promocode_info_label'] = 'Promocode Info',
    ['context.promocode_info_desc'] = 'See information about the promo code.',
    ['context.promocode_label_label'] = 'Change Promocode Label',
    ['context.promocode_label_desc'] = 'Change the label of the promocode.',
    ['context.promocode_name_label'] = 'Change Promocode Name',
    ['context.promocode_name_desc'] = 'Change the name of the promocode.',
    ['context.promocode_expiredate_label'] = 'Change Expire Date',
    ['context.promocode_expiredate_desc'] = 'Change promocode expiration date.',
    ['context.promocode_changeitems_label'] = 'Change Items List',
    ['context.promocode_changeitems_desc'] = 'Change the list of reward items.',
    ['context.promocode_changehorse_label'] = 'Change Horses List',
    ['context.promocode_changehorse_desc'] = 'Change the list of reward horses.',
    ['context.promocode_changemoney_label'] = 'Change Money List',
    ['context.promocode_changemoney_desc'] = 'Change the list of reward money.',
    ['context.promocode_delete_label'] = 'Delete Promocode',
    ['context.promocode_delete_desc'] = 'Delete the promocode from the server.',

    ['format_item'] = '%s x%s',
    ['format_money'] = '%s $%s',

    ['dialog.promocode_info_header'] = '**Promocode Info [ #%s ]**',
    ['dialog.promocode_info_text'] = {
        ('**Promocode Label:** %s  \n'),
        ('**Promocode Name:** %s  \n'),
        ('**Promocode Used:** %s time(s)  \n'),
        ('**Promocode Expire:** %s  \n\n'),
        ('**Items List:**   \n%s  \n\n'),
        ('**Horses List:**   \n%s  \n\n'),
        ('**Money List:**   \n%s'),
    },
    ['dialog.promocode_delete_header'] = '**Confirm Delete**',
    ['dialog.promocode_delete_text'] = 'Are you sure you want to delete the promo code?',

    ['input.create_promocode'] = 'Create Promocode',
    ['input.promocode_label_title'] = 'Promocode Label',
    ['input.promocode_label_desc'] = 'The name of the promocode that will be displayed on the menu',
    ['input.promocode_name_title'] = 'Promocode Name',
    ['input.promocode_name_desc'] = 'The name that will be used to redeem the code',
    ['input.select_reward_option_title'] = 'Select Reward Options',
    ['input.select_reward_option_desc'] = 'Choose the reward options that players will receive if they use the code',
    ['input.one_player_can_use'] = 'One Player Can Use',
    ['input.change_label'] = 'Change Label',
    ['input.enter_new_label_title'] = 'Enter New Label',
    ['input.enter_new_label_desc'] = 'Enter the new label you want to use',
    ['input.change_name'] = 'Change Name',
    ['input.enter_new_name_title'] = 'Enter New Name',
    ['input.enter_new_name_desc'] = 'Enter the new name you want to use',
    ['input.change_expire_date'] = 'Change Expire Date',
    ['input.expiry_date_label'] = 'Expiry Date',
    ['input.expiry_date_desc'] = 'The date for which the promo code will expire',
    ['input.expiry_time_label'] = 'Expiry Time',
    ['input.expiry_time_desc'] = 'The time for which the promo code will expire',
    ['input.item_reward'] = 'Item Reward',
    ['input.select_items_label'] = 'Select Items For Reward',
    ['input.select_items_desc'] = 'The items you choose will be added to the item drop list',
    ['input.selected_item'] = 'Item %s',
    ['input.enter_item_count_label'] = 'Enter Item Count',
    ['input.enter_item_count_desc'] = 'Enter the amount the player will get from the item',
    ['input.add_new_horse'] = 'Add New Horse',
    ['input.edit_hor_list'] = 'Edit Current Horse List',
    ['input.hor_reward'] = 'Horse Reward',
    ['input.select_action'] = 'Select Action',
    ['input.amount_of_hor_label'] = 'Amount Of Horses',
    ['input.amount_of_hor_desc'] = 'Enter the amount of horses that players will receive when using the code',
    ['input.selected_horse'] = 'Horse #%s',
    ['input.horse_label_title'] = 'Horse Label',
    ['input.horse_label_desc'] = 'The name of the horse that will be displayed when using the code',
    ['input.horse_spawn_name_title'] = 'Horse Spawn Name',
    ['input.horse_spawn_name_desc'] = 'The horse model you want players to get',
    ['input.money_reward'] = 'Money Reward',
    ['input.select_money_type_label'] = 'Select Money Type',
    ['input.select_money_type_desc'] = 'Select the type of money you want the players to receive',
    ['input.money_type'] = 'Money Type %s',
    ['input.enter_amount_label'] = 'Enter Amount',
    ['input.enter_amount_desc'] = "Enter the amount that the player will get in the '%s'",
    ['input.delete_promocode'] = "Delete Promocode",
    ['input.select_promocode_label'] = "Select Promocode",
    ['input.select_promocode_desc'] = "Select the promo code you want to delete",
    ['input.item_option'] = "Item",
    ['input.horse_option'] = "Horse",
    ['input.money_option'] = "Money",
    ['input.redeem_promocode'] = "Redeem Promocode",
    ['input.enter_promocode_label'] = "Enter Promocode",
    ['input.enter_promocode_desc'] = "Enter a valid promo code to activate it",

    ['notify.need_to_enter_code'] = 'You must enter a code to activate it',
    ['notify.code_already_exist'] = "Code '%s' already exist!",
    ['notify.code_doesnt_exist'] = "Code '%s' does not exist!",
    ['notify.promocode_success_generated'] = "Promocode has been successfully generated",
    ['notify.you_already_used'] = "You have already used the code '%s'",
    ['notify.promocode_already_used'] = "Code '%s' has already been used",
    ['notify.code_expired'] = "Code '%s' has expired!",
    ['notify.you_got_item'] = "You got %s x%s!",
    ['notify.you_got_hor'] = 'You got %s in your stable',
    ['notify.you_got_money'] = 'You got $%s on %s',
    ['notify.success_deleted_promocode'] = 'You have successfully deleted the promocode %s ID %s',
    ['notify.successfully_label_changed'] = 'You have successfully changed the label of the promocode from %s to %s',
    ['notify.successfully_name_changed'] = 'You have successfully changed the name of the promocode from %s to %s',
    ['notify.successfully_expiredate_changed'] = 'You have successfully changed the promocode expiration time from %s to %s',
    ['notify.successfully_changed_items_list'] = 'You have successfully changed the promocode items list',
    ['notify.successfully_changed_horses_list'] = 'You have successfully changed the promocode horses list',
    ['notify.successfully_changed_money_list'] = 'You have successfully changed the promocode money list',

    ['notify.error_label'] = 'Error',
    ['notify.success_label'] = 'Succcess',

    ['logs.promocode_created_title'] = 'PROMOCODE CREATED',
    ['logs.promocode_created_message'] = {
        ('Promocode Label: `%s`  \n'),
        ('Promocode Name: `%s`  \n'),
        ('Admin Name: `%s`  \n'),
        ('Promocode Expire: `%s`  \n\n'),
        ('Items List:   \n`%s`  \n\n'),
        ('Horses List:   \n`%s`  \n\n'),
        ('Money List:   \n`%s`'),
    },
    ['logs.promocode_redeemed_title'] = 'PROMOCODE REDEEMED',
    ['logs.promocode_redeemed_message'] = {
        ('Promocode Name: `%s`  \n'),
        ('Player Used: `%s`  \n\n'),
        ('Items List:   \n`%s`  \n\n'),
        ('Horses List:   \n`%s`  \n\n'),
        ('Money List:   \n`%s`'),
    },
    ['logs.promocode_deleted_title'] = 'PROMOCODE DELETED',
    ['logs.promocode_deleted_message'] = {
        ('Promocode Label: `%s`  \n'),
        ('Promocode Name: `%s`  \n'),
        ('Promocode ID: `%s`  \n'),
        ('Admin Name: `%s`  \n'),
    },
    ['logs.promocode_changedlabel_title'] = 'PROMOCODE LABEL CHANGED',
    ['logs.promocode_changedlabel_message'] = {
        ('New Label: `%s`  \n'),
        ('Old Label: `%s`  \n'),
        ('Promocode ID: `%s`  \n'),
        ('Admin Name: `%s`  \n'),
    },
    ['logs.promocode_changedname_title'] = 'PROMOCODE NAME CHANGED',
    ['logs.promocode_changedname_message'] = {
        ('New Name: `%s`  \n'),
        ('Old Name: `%s`  \n'),
        ('Promocode ID: `%s`  \n'),
        ('Admin Name: `%s`  \n'),
    },
    ['logs.promocode_changedtime_title'] = 'PROMOCODE TIME CHANGED',
    ['logs.promocode_changedtime_message'] = {
        ('New Time: `%s`  \n'),
        ('Old Time: `%s`  \n'),
        ('Promocode ID: `%s`  \n'),
        ('Admin Name: `%s`  \n'),
    },
    ['logs.promocode_changedrewards_title'] = 'PROMOCODE REWARDS CHANGED',
    ['logs.promocode_changedrewards_message'] = {
        ('Promocode ID: `%s`  \n'),
        ('Admin Name: `%s`  \n'),
    },
}
PreviousInstallationNextPlayer Manager

Last updated 1 year ago