Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Config = {}
- --------------------------
- -- Utility
- --------------------------
- Config.Utility = {
- Framework = "QBCore", -- QBCore or ESX
- CoreName = "qb-core", -- Core Name or Trigger ESX: esx:getSharedObject
- ItemBox = "inventory:client:ItemBox", -- If you are usign ESX don't touch this
- EnableBurn = true, -- Enable burn player?
- ChanceBurn = 10, -- Chance to burn player
- EnableCustomSounds = true,
- TriggerSound = "InteractSound_SV:PlayOnSource", -- Trigger of custom sound
- Volume = 0.2, -- Volume of custom sound
- Cooldown = true, -- Cooldown?
- CooldownTime = 60000, -- 1 Minute
- Rewards = { -- Only works item's
- Small_MysteryBox = {
- Amount = 1, -- Amount of item
- Chance = 10, -- 10% Chance to get rare ITEM
- Normal_Items = {
- [1] = "phone",
- [2] = "iron",
- [3] = "water_bottle",
- [4] = "lockpick",
- [5] = "electronickit",
- },
- Rare_Items = {
- [1] = "phone",
- [2] = "iron",
- [3] = "water_bottle",
- [4] = "lockpick",
- [5] = "electronickit",
- }
- },
- Medium_MysteryBox = {
- Amount = 2, -- Amount of item
- Chance = 10, -- 10% Chance to get rare ITEM
- Normal_Items = {
- [1] = "phone",
- [2] = "iron",
- [3] = "water_bottle",
- [4] = "lockpick",
- [5] = "electronickit",
- },
- Rare_Items = {
- [1] = "phone",
- [2] = "iron",
- [3] = "water_bottle",
- [4] = "lockpick",
- [5] = "electronickit",
- }
- },
- Large_MysteryBox = {
- Amount = 3, -- Amount of item
- Chance = 10, -- 10% Chance to get rare ITEM
- Normal_Items = {
- [1] = "phone",
- [2] = "iron",
- [3] = "water_bottle",
- [4] = "lockpick",
- [5] = "electronickit",
- },
- Rare_Items = {
- [1] = "phone",
- [2] = "iron",
- [3] = "water_bottle",
- [4] = "lockpick",
- [5] = "electronickit",
- }
- },
- }
- }
- Language = {
- NoJob = "You don't have the necessary work.",
- NoGang = "You don't have the necessary gang.",
- OpenMystery = "Opening the mystery box...",
- Dead = "You cannot access the mystery box while dead.",
- Water = "You cannot access the mystery box in the water.",
- Wait = "You need to wait to open another mystery box.",
- }
- function Notify(msg)
- if Config.Utility.Framework == "QBCore" then
- QBCore.Functions.Notify(msg)
- elseif Config.Utility.Framework == "ESX" then
- exports['mythic_notify']:SendAlert('error', msg, 5000)
- end
- end
- function progressBar()
- if Config.Utility.Framework == "QBCore" then
- QBCore.Functions.Progressbar("AbrirMysteryBox", Language.OpenMystery, 2500, false, true, {disableMovement = true,disableCarMovement = true,disableMouse = false,
- disableCombat = true}, {animDict = "mp_arresting",anim = "a_uncuff",flags = 49}, {}, {}, function() end)
- elseif Config.Utility.Framework == "ESX" then
- TriggerEvent("mythic_progbar:client:progress", {
- name = "AbrirMysteryBox",
- duration = 2500,
- label = Language.OpenMystery,
- useWhileDead = false,
- canCancel = true,
- controlDisables = {
- disableMovement = true,
- disableCarMovement = true,
- disableMouse = false,
- disableCombat = true,
- },
- animation = {
- animDict = "mp_arresting",
- anim = "a_uncuff",
- },
- }, function(status)
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement