📄Config preview

Config = {}

-- @type boolean
-- @description If true the script will print debug messages in the console.
Config.DebugMode = false

-- @type string
-- @description Which framework are you using? Only edit if auto detection doesn't work. "auto", "oldESX", "ESX", "QBCore" or "custom"
Config.Framework = "auto"

-- @type string
-- @description You only need to edit this, if you are using oldESX framework and your esx:getSharedObject trigger is different than the default one.
Config.ESXTrigger = "esx:getSharedObject"

-- @type string
-- @description The language of the script. You can find or add translations in this file.
Config.Language = "EN"

-- @type boolean
-- @description If true the script will check for updates when the resource starts.
Config.VersionCheck = true

-- @type string
-- @description The interaction type the script will use. Can be "3d" for 3D text, "ox_target" for ox_target or "qb-target" for qb-target.
Config.Target = "3d"

-- @type string
-- @description Default key for interacting with the treasure chest. Only needed if Config.Target is set to "3d"
Config.InteractKey = "E"

-- @type string
-- @description The location of your inventory images.
Config.InventoryImagesLocation = "nui://qb-inventory/html/images/" -- For ox_inventory use: "nui://ox_inventory/web/images/"

Config.NotificationTypes = {
	success = "success",
	error = "error",
	info = "info"
}

function notify(type, msg)
	-- exports['okokNotify']:Alert("Treasurechest", msg, 5000, type) --okok notify (PAID resource)
	-- TriggerEvent("mosh_UI:Open", type, msg, "right", true) --Mosh UI / Notify (PAID resource)
	-- exports['mythic_notify']:DoHudText(type, msg) --Mythic Notify (Free resource)
	-- exports["skeexsNotify"]:TriggerNotification({ ['type'] = type, ['message'] = msg , Treasure}) --skeexsNotify (Free resource)
	-- TriggerEvent('QBCore:Notify', msg, type) --Default QBCore notifcation (Free resource)
	-- TriggerEvent('esx:showNotification', msg) --Default ESX notification (Free resource)
	SetNotificationTextEntry("STRING")
	AddTextComponentString(msg)
	DrawNotification(false, true)
end

Config.Translations = {
	["EN"] = {
		text3D = "Treasure Chest [E]",
        targetText = "Open Treasure Chest",
		gotNotify = "Congratulations! You found a treasure chest and you got %s x%d",
		gotLog = "%s opened a chest and found %s x%d",
	},
	["HU"] = {
		text3D = "Kincsesláda [E]",
		targetText = "Kincsesláda kinyitása",
		gotNotify = "Gratulálunk! Találtál egy kincsesládát, és %d %s-t találtál.",
		gotLog = "%s kinyitott egy kincsesládát, és %d %s-t talált.",
	},
	["DE"] = {
		text3D = "Schatztruhe [E]",
		targetText = "Schatztruhe öffnen",
		gotNotify = "Herzlichen Glückwünsch! Du hast eine Schatztruhe gefunden und du hast %d %s bekommen",
		gotLog = "%s hat eine Schatztruhe geöffnet und %d %s gefunden",
	},
	["FR"] = {
		text3D = "Coffre au trésor [E]",
		targetText = "Ouvrir le coffre au trésor",
		gotNotify = "Félicitations! Vous avez trouvé un coffre au trésor et vous avez obtenu %d %s",
		gotLog = "%s a ouvert un coffre et a trouvé %d %s",
	},
	["ES"] = {
		text3D = "Cofre del tesoro [E]",
		targetText = "Abrir cofre del tesoro",
		gotNotify = "¡Felicidades! Has encontrado un cofre del tesoro y has conseguido %d %s",
		gotLog = "%s abrió un cofre y encontró %d %s",
	},
	["CZ"] = {
		text3D = "Truhla s pokladem [E]",
		targetText = "Otevřít truhlu s pokladem",
		gotNotify = "Gratulujeme! Našel jsi truhlu s pokladem a získal jsi %d %s",
		gotLog = "%s otevřel truhlu a našel %d %s",
	},
	["PL"] = {
		text3D = "Skrzynia skarbów [E]",
		targetText = "Otwórz skrzynię skarbów",
		gotNotify = "Gratulacje! Znalazłeś skrzynię skarbów i otrzymałeś %d %s",
		gotLog = "%s otworzył skrzynię i znalazł %d %s",
	},
	["RO"] = {
		text3D = "Cufăr cu comori [E]",
		targetText = "Deschide cufărul cu comori",
		gotNotify = "Felicitări! Ai găsit un cufăr cu comori și ai primit %d %s",
		gotLog = "%s a deschis un cufăr și a găsit %d %s",
	},
	["IT"] = {
		text3D = "Scrigno del tesoro [E]",
		targetText = "Apri lo scrigno del tesoro",
		gotNotify = "Congratulazioni! Hai trovato uno scrigno del tesoro e hai ottenuto %d %s",
		gotLog = "%s ha aperto uno scrigno e ha trovato %d %s",
	},
	["PT"] = {
		text3D = "Baú do tesouro [E]",
		targetText = "Abrir baú do tesouro",
		gotNotify = "Parabéns! Você encontrou um baú do tesouro e ganhou %d %s",
		gotLog = "%s abriu um baú e encontrou %d %s",
	},
	["TR"] = {
		text3D = "Hazine Sandığı [E]",
		targetText = "Hazine Sandığını Aç",
		gotNotify = "Tebrikler! Bir hazine sandığı buldun ve %d %s kazandın",
		gotLog = "%s bir sandık açtı ve %d %s buldu",
	},
	["GR"] = {
		text3D = "Κουτί Θησαυρού [E]",
		targetText = "Άνοιγμα Κουτιού Θησαυρού",
		gotNotify = "Συγχαρητήρια! Βρήκατε ένα κουτί θησαυρού και κερδίσατε %d %s",
		gotLog = "%s άνοιξε ένα κουτί και βρήκε %d %s",
	},
	["RU"] = {
		text3D = "Сундук с сокровищами [E]",
		targetText = "Открыть сундук с сокровищами",
		gotNotify = "Поздравляем! Вы нашли сундук с сокровищами и получили %d %s",
		gotLog = "%s открыл сундук и нашел %d %s",
	},
	["UA"] = {
		text3D = "Скарбниця [E]",
		targetText = "Відкрити скарбницю",
		gotNotify = "Вітаємо! Ви знайшли скарбницю і отримали %d %s",
		gotLog = "%s відкрив скарбницю і знайшов %d %s",
	},
	["CN"] = {
		text3D = "宝箱 [E]",
		targetText = "打开宝箱",
		gotNotify = "恭喜!你找到一个宝箱,你获得了 %d %s",
		gotLog = "%s 打开了一个宝箱,找到了 %d %s",
	},
	["JP"] = {
		text3D = "宝箱 [E]",
		targetText = "宝箱を開ける",
		gotNotify = "おめでとうございます!宝箱を見つけました。%d %s を手に入れました。",
		gotLog = "%s が宝箱を開けて %d %s を見つけました。",
	},
	["KR"] = {
		text3D = "보물 상자 [E]",
		targetText = "보물 상자 열기",
		gotNotify = "축하합니다! 보물 상자를 찾았고 %d %s 를 얻었습니다.",
		gotLog = "%s 가 상자를 열고 %d %s 를 찾았습니다.",
	},
	["TH"] = {
		text3D = "หีบสมบัติ [E]",
		targetText = "เปิดหีบสมบัติ",
		gotNotify = "ขอแสดงความยินดี! คุณพบหีบสมบัติและได้รับ %d %s",
		gotLog = "%s เปิดหีบและพบ %d %s",
	},
	["VI"] = {
		text3D = "Rương kho báu [E]",
		targetText = "Mở rương kho báu",
		gotNotify = "Chúc mừng! Bạn đã tìm thấy một rương kho báu và nhận được %d %s",
		gotLog = "%s đã mở một rương và tìm thấy %d %s",
	},
	["ID"] = {
		text3D = "Petik Harta Karun [E]",
		targetText = "Buka Peti Harta Karun",
		gotNotify = "Selamat! Kamu menemukan peti harta karun dan mendapatkan %d %s",
		gotLog = "%s membuka peti dan menemukan %d %s",
	},
	["FA"] = {
		text3D = "صندوق گنج [E]",
		targetText = "باز کردن صندوق گنج",
		gotNotify = "تبریک! شما یک صندوق گنج پیدا کردید و %d %s دریافت کردید",
		gotLog = "%s یک صندوق را باز کرد و %d %s پیدا کرد",
	},
	["AR"] = {
		text3D = "صندوق الكنز [E]",
		targetText = "افتح صندوق الكنز",
		gotNotify = "تهانينا! لقد وجدت صندوق كنز وحصلت على %d %s",
		gotLog = "%s فتح صندوقًا ووجد %d %s",
	},
	["HI"] = {
		text3D = "खजाने का संदूक [E]",
		targetText = "खजाने का संदूक खोलें",
		gotNotify = "बधाई हो! आपको एक खजाने का संदूक मिला है और आपको %d %s मिला है",
		gotLog = "%s ने एक संदूक खोला और %d %s पाया",
	},
	["MS"] = {
		text3D = "Petak Harta Karun [E]",
		targetText = "Buka Peti Harta Karun",
		gotNotify = "Tahniah! Anda telah menemui peti harta karun dan anda mendapat %d %s",
		gotLog = "%s membuka peti dan menemui %d %s",
	},
	["NL"] = {
		text3D = "Schatkist [E]",
		targetText = "Open Schatkist",
		gotNotify = "Gefeliciteerd! Je hebt een schatkist gevonden en je hebt %d %s gekregen",
		gotLog = "%s heeft een kist geopend en %d %s gevonden",
	},
	["SV"] = {
		text3D = "Skattkista [E]",
		targetText = "Öppna Skattkista",
		gotNotify = "Grattis! Du hittade en skattkista och du fick %d %s",
		gotLog = "%s öppnade en kista och hittade %d %s",
	}
}

Last updated