config.lua

--[[
    - this script needs tgiann-core script to work, you can download the script from your keymaster account
      Start tgiann-core script after es_extented/qb-core script and before tgiann-* scripts
      Adjust the tgiann-core config file according to the framework you are using

    Docs: https://tgiann.gitbook.io/tgiann/scripts/tgiann-inventory
	Other Language Files: https://discord.com/channels/813192868906532905/1307000341547454595 (Discord > Translations Thread)
]]

tgiCoreExports = exports["tgiann-core"]
config = tgiCoreExports:getConfig()
config.lang = "en"

config.moneyAsItem = false                   -- https://docs.tgiann.com/scripts/tgiann-inventory/how-do-money-as-item
config.blockWeaponWheel = true               -- If you don't have a script that blocks weaponwheel make it true, if you do have a script than false
config.preventHandWeaponChangingSlots = true -- prevents the player from changing the slot of the weapon they are using

config.openOwner = {
	trunk = {
		active = false, -- When set to true, only the vehicle owner can open the trunk.
		openNpc = true, -- When the setting is active, the trunk can be used if the vehicle doesn't belong to anyone.
	},
	glovebox = {
		active = false, -- When set to true, only the vehicle owner can open the glovebox.
		openNpc = true, -- When the setting is active, the glovebox can be used if the vehicle doesn't belong to anyone.
	}
}

-- Set this setting to false if you are not using tgiann-clothing or do not want clothes to be items
-- if you are using tgiann-clothing, make this and the config.clothingAsItem setting in clothing the same
-- false version; https://youtu.be/o7ZofZZ00fo
config.clothingAsItem = true

-- false -  "serverid" -  "citizenid"
-- citizenid: QB: citizenid, ESX: identifier
config.contextGiveItemId = "serverid"

-- turn on/off the label of items in the main inventory
config.showItemLabelOnMainInventory = false

config.shopMoneyType = "cash"

-- if you leave only one color the player will not change the color of the ui
config.defaultColors = {
	{ label = "Green",              background = "#36FF9F", color = "#252525" },
	{ label = "Lime Green",         background = "#32CD32", color = "#252525" },
	{ label = "Sea Green",          background = "#2E8B57", color = "#fff" },
	{ label = "Bright Blue",        background = "#00BFFF", color = "#252525" },
	{ label = "Electric Blue",      background = "#7DF9FF", color = "#252525" },
	{ label = "Neon Red",           background = "#FF073A", color = "#fff" },
	{ label = "Electric Red",       background = "#FF3333", color = "#fff" },
	{ label = "Neon Orange",        background = "#FF4500", color = "#fff" },
	{ label = "Bright Orange",      background = "#FFA500", color = "#252525" },
	{ label = "Fluorescent Yellow", background = "#CCFF00", color = "#252525" },
	{ label = "Hot Pink",           background = "#FF69B4", color = "#fff" },
	{ label = "Deep Pink",          background = "#FF1493", color = "#fff" },
	{ label = "Fuchsia",            background = "#FF00FF", color = "#fff" },
	{ label = "Violet",             background = "#8A2BE2", color = "#fff" },
	{ label = "Plum",               background = "#DDA0DD", color = "#252525" },
	{ label = "Lavender",           background = "#E6E6FA", color = "#252525" },
	{ label = "Light Green",        background = "#90EE90", color = "#252525" },
	{ label = "Light Blue",         background = "#ADD8E6", color = "#252525" },
	{ label = "Golden",             background = "#FFD700", color = "#252525" },
	{ label = "Cobalt Blue",        background = "#0047AB", color = "#fff" },
	{ label = "Rose Red",           background = "#FFC0CB", color = "#252525" },
	{ label = "Peach",              background = "#FFDAB9", color = "#252525" },
	{ label = "Copper",             background = "#B87333", color = "#252525" },
	{ label = "Cream",              background = "#FFFDD0", color = "#252525" },
}

-- Only works when clothingAsItem is false or Custom Script Clothe is active(https://docs.tgiann.com/scripts/tgiann-clothing/events-exports#custom-script-clothe)
config.naked = {
	male = {
		c_torso = {
			{ componentId = 8,  prop = 15, texture = 0 }, --tshirt
			{ componentId = 11, prop = 15, texture = 0 }, -- torso
			{ componentId = 3,  prop = 15, texture = 0 } -- arms
		},
		c_pants = {
			{ componentId = 4, prop = 61, texture = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } }
		},
		c_shoes = { { componentId = 6, prop = 34, texture = 0 } },
		c_decal = { { componentId = 10, prop = 0, texture = 0 } },
		c_bag = { { componentId = 5, prop = 0, texture = 0 } },
		c_ear = { { componentId = 2, prop = -1, texture = -1 } },
		c_necklace = { { componentId = 7, prop = 0, texture = 0 } },
		c_bproof = { { componentId = 9, prop = 0, texture = 0 } },
		c_bracelet = { { componentId = 7, prop = -1, texture = -1 } },
		c_watch = { { componentId = 6, prop = -1, texture = -1 } },
		c_glasses = { { componentId = 1, prop = -1, texture = -1 } },
		c_helmet = { { componentId = 0, prop = -1, texture = -1 } },
		c_mask = { { componentId = 1, prop = 0, texture = 0 } },
	},
	female = {
		c_torso = {
			{ componentId = 8,  prop = 15, texture = 0 }, --tshirt
			{ componentId = 11, prop = 15, texture = 0 }, -- torso
			{ componentId = 3,  prop = 15, texture = 0 } -- arms
		},
		c_pants = {
			{ componentId = 4, prop = 62, texture = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } }
		},
		c_shoes = { { componentId = 6, prop = 35, texture = 0 } },
		c_decal = { { componentId = 10, prop = 0, texture = 0 } },
		c_bag = { { componentId = 5, prop = 0, texture = 0 } },
		c_ear = { { componentId = 2, prop = -1, texture = -1 } },
		c_necklace = { { componentId = 7, prop = 0, texture = 0 } },
		c_bproof = { { componentId = 9, prop = 0, texture = 0 } },
		c_bracelet = { { componentId = 7, prop = -1, texture = -1 } },
		c_watch = { { componentId = 6, prop = -1, texture = -1 } },
		c_glasses = { { componentId = 1, prop = -1, texture = -1 } },
		c_helmet = { { componentId = 0, prop = -1, texture = -1 } },
		c_mask = { { componentId = 1, prop = 0, texture = 0 } },
	}
}

config.keys = {
	inventoryClose = { "Escape", "F2" }, --JS event code, https://www.toptal.com/developers/keycode
	inventory = "F2",
	glovebox = "G",
	trunk = "G",
	hotbar = "TAB"
}

config.throwableWeapons = {
	weapon_grenade = true,
	weapon_bzgas = true,
	weapon_molotov = true,
	weapon_stickybomb = true,
	weapon_proxmine = true,
	weapon_snowball = true,
	weapon_pipebomb = true,
	weapon_ball = true,
	weapon_smokegrenade = true,
	weapon_acidpackage = true
}

config.reloadProgressbarBar = {
	time = 2000,
	disables = {
		disableMovement = false,
		disableCarMovement = false,
		disableMouse = false,
		disableCombat = true,
	}
}

config.playerDefaultMaxWeight = 100000 -- Player inventory weight
config.playerDefaultSlots = 55         -- Player inventory slots

config.backpack = {                    -- backpack command settings
	{
		weight = config.playerDefaultMaxWeight,
		slots = config.playerDefaultSlots,
	},
	{
		weight = config.playerDefaultMaxWeight + 50000,
		slots = config.playerDefaultSlots + 30,
	},
	{
		weight = config.playerDefaultMaxWeight + 100000,
		slots = config.playerDefaultSlots + 55,
	}
}

config.clotheBackpack = {
	active = true,                      --if you have a backpack in a suit, the weight limit and the number of slots of your inventory increases.
	-- I don't recommend increasing the number of slots. if the player removes the backpack, the slots will be deleted and the player's belongings will remain in invisible slots
	[`mp_m_freemode_01`] = {            -- Male Ped
		[40] = { weight = 50000, slots = 0 }, -- increases the player's default weight limit by 50000
		[41] = { weight = 60000, slots = 0 },
		[44] = { weight = 50000, slots = 0 },
		[45] = { weight = 30000, slots = 0 },
		[81] = { weight = 60000, slots = 0 },
		[82] = { weight = 80000, slots = 0 },
		[85] = { weight = 150000, slots = 0 },
		[86] = { weight = 100000, slots = 0 },
	},
	[`mp_f_freemode_01`] = {            -- Female ped
		[40] = { weight = 50000, slots = 0 }, -- increases the player's default weight limit by 50000
		[41] = { weight = 60000, slots = 0 },
		[44] = { weight = 50000, slots = 0 },
		[45] = { weight = 30000, slots = 0 },
		[81] = { weight = 60000, slots = 0 },
		[82] = { weight = 80000, slots = 0 },
		[85] = { weight = 150000, slots = 0 },
		[86] = { weight = 100000, slots = 0 },
	}
}

config.openTrunkDistance = {
	default = 1.5, -- Default open distance
	models = {  -- if the vehicle is too big and you have difficulty opening the trunk, you can increase the distance by adding models here
		[`tug`] = 5.0
	}
}

config.antiSwimingItems = { -- Added items are deleted when you enter the water and their broken state is added to the inventory
	["phone"] = "broken_phone",
	["phone2"] = "broken_phone",
}

config.disableWeaponAnimation = false

-- Required for police weapons. If the police weapon is added in your items.lua, the assigned jobs can use this weapon.
-- Normal weapon: weapon_pistol
-- Police weapon: weapon_police_pistol
config.weaponPoliceJobs = { "police" }
config.disableWeaponWhip = true -- disabling weapon whipping (if you use qb you can make it false)
config.weaponAnimation = {
	police = {                  -- Job name
		add = {                 -- Animation of grabbing the weapon in hand and duration (in ms)
			animDictionary = "rcmjosh4",
			animationName = "josh_leadout_cop2",
			time = 300
		},
		remove = { -- Animation of putting the weapon back from hand and duration (in ms)
			animDictionary = "reaction@intimidation@cop@unarmed",
			animationName = "intro",
			time = 250
		},
	},
	otherJobs = { -- OTHER JOBS than the ones above ^
		add = { --  Animation of grabbing the weapon in hand and duration (in ms)
			animDictionary = "reaction@intimidation@1h",
			animationName = "intro",
			time = 1200
		},
		remove = { -- Animation of putting the weapon back from hand and duration (in ms)
			animDictionary = "reaction@intimidation@1h",
			animationName = "outro",
			time = 1200
		},
	}
}

-- rareName="weaponPlus",
config.rare = {
	weaponPlus = {
		color = { r = 255, g = 235, b = 59 },
		label = "Plus Weapon"
	},
	weaponPolice = {
		color = { r = 40, g = 217, b = 241 },
		label = "Police Weapon"
	},
	weaponPoliceAmmo = {
		color = { r = 40, g = 217, b = 241 },
		label = "Police Ammo"
	}
}

config.topHeaderIcons = {
	{
		icon = "main",               -- u can edit and add new icons from ui/icon folder
		click = "headerClickMainFunction", -- u can edit this function from topHeader.lua
		style = {                    -- css style
			fill = "#ffffff7f"       -- icon color
		}
	},
	{
		icon = "craft",               -- u can edit and add new icons from ui/icon folder
		click = "headerClickCraftFunction", -- u can edit this function from topHeader.lua
		style = {                     -- css style
			width = "2.3vh",
			height = "2.3vh",
			fill = "var(--green)" -- icon color
		}
	},
	{
		icon = "shop",                 -- u can edit and add new icons from ui/icon folder
		webpage = "https://tgiann.tebex.io", -- u can edit this function from topHeader.lua
		style = {                      -- css style
			fill = "#fce93dd9"         -- icon color
		}
	},
	--[[
	{ -- for tgiann-coinshop https://tgiann.tebex.io/package/6001460
		icon = "shop", -- u can edit and add new icons from ui/icon folder
		click = "headerClickShopFunction", -- u can edit this function from topHeader.lua
		style = { -- css style
			fill = "#ffffff7f" -- icon color
		}
	},
	]]
}

config.dropWhenDie = {
	weapons = true,    -- when you die, the gun in your hand falls to the ground
	money = true,      -- when you die, your money falls to the ground

	dropMinMoney = 100, -- if the player's money is above this value, it drop to the ground
	dropMaxMoney = 25000, -- if the player's money is above this value, the max drops by this value

	distance = {
		propRender = 50,
		drawTextDist = 8,
		pressDist = 1.5
	},
}

-- Drop slots and weight
config.dropSlots = 40
config.dropMaxWeight = 1000000

-- These values will be active if maxweight and slots data is not sent in the stash event
config.defaultSlots = 100
config.defaultMaxWeight = 100000 -- Max weight a player can carry (default 100kg, written in grams)

-- These values will be active if maxweight and slots data is not sent in the glovebox event
config.gloveboxSlots = 5
config.gloveboxMaxWeight = 1000

-- These values will be active if maxweight and slots data is not sent in the trunk event
config.trunkSlots = 25
config.trunkMaxWeight = 100000

config.BackEngineVehicles = {
	[`ninef`] = 4,
	[`adder`] = 4,
	[`vagner`] = 5,
	[`t20`] = 5,
	[`infernus`] = 4,
	[`zentorno`] = 4,
	[`reaper`] = 4,
	[`comet2`] = 4,
	[`comet3`] = 5,
	[`jester`] = 4,
	[`jester2`] = 4,
	[`cheetah`] = 5,
	[`cheetah2`] = 5,
	[`prototipo`] = 5,
	[`turismor`] = 5,
	[`pfister811`] = 5,
	[`ardent`] = 5,
	[`nero`] = 4,
	[`nero2`] = 4,
	[`tempesta`] = 5,
	[`vacca`] = 4,
	[`bullet`] = 4,
	[`osiris`] = 5,
	[`entityxf`] = 4,
	[`turismo2`] = 5,
	[`fmj`] = 4,
	[`re7b`] = 4,
	[`tyrus`] = 5,
	[`italigtb`] = 4,
	[`penetrator`] = 4,
	[`monroe`] = 4,
	[`ninef2`] = 4,
	[`stingergt`] = 5,
	[`gp1`] = 5,
	[`autarch`] = 5,
	[`tyrant`] = 4
}

-- Weapon Durabilty values
local weaponList = {
	-- Handguns
	weapon_stungun               = 100,
	weapon_pistol                = 500,
	weapon_pistol_mk2            = 500,
	weapon_combatpistol          = 500,
	weapon_appistol              = 500,
	weapon_pistol50              = 500,
	weapon_snspistol             = 500,
	weapon_heavypistol           = 500,
	weapon_vintagepistol         = 500,
	weapon_flaregun              = 500,
	weapon_marksmanpistol        = 500,
	weapon_revolver              = 500,
	weapon_revolver_mk2          = 500,
	weapon_doubleaction          = 500,
	weapon_snspistol_mk2         = 500,
	weapon_raypistol             = 500,
	weapon_ceramicpistol         = 500,
	weapon_navyrevolver          = 500,
	weapon_gadgetpistol          = 500,
	weapon_pistolxm3             = 500,
	-- Submachine Guns
	weapon_microsmg              = 1000,
	weapon_smg                   = 1000,
	weapon_smg_mk2               = 1000,
	weapon_assaultsmg            = 1000,
	weapon_combatpdw             = 1000,
	weapon_machinepistol         = 1000,
	weapon_minismg               = 1000,
	weapon_raycarbine            = 1000,
	-- Shotguns
	weapon_pumpshotgun           = 150,
	weapon_sawnoffshotgun        = 150,
	weapon_assaultshotgun        = 150,
	weapon_bullpupshotgun        = 150,
	weapon_musket                = 150,
	weapon_heavyshotgun          = 150,
	weapon_dbshotgun             = 150,
	weapon_autoshotgun           = 150,
	weapon_pumpshotgun_mk2       = 150,
	weapon_combatshotgun         = 150,
	-- Assault Rifles
	weapon_assaultrifle          = 2000,
	weapon_assaultrifle_mk2      = 2000,
	weapon_carbinerifle          = 2000,
	weapon_carbinerifle_mk2      = 2000,
	weapon_advancedrifle         = 2000,
	weapon_specialcarbine        = 2000,
	weapon_bullpuprifle          = 2000,
	weapon_compactrifle          = 2000,
	weapon_specialcarbine_mk2    = 2000,
	weapon_bullpuprifle_mk2      = 2000,
	weapon_militaryrifle         = 2000,
	-- Light Machine Guns
	weapon_mg                    = 3000,
	weapon_combatmg              = 3000,
	weapon_gusenberg             = 3000,
	weapon_combatmg_mk2          = 3000,
	-- Sniper Rifles
	weapon_sniperrifle           = 50,
	weapon_heavysniper           = 50,
	weapon_marksmanrifle         = 50,
	weapon_remotesniper          = 50,
	weapon_heavysniper_mk2       = 50,
	weapon_marksmanrifle_mk2     = 50,
	-- Heavy Weapons
	weapon_rpg                   = 10,
	weapon_grenadelauncher       = 10,
	weapon_grenadelauncher_smoke = 10,
	weapon_minigun               = 10,
	weapon_firework              = 10,
	weapon_railgun               = 10,
	weapon_railgunxm3            = 10,
	weapon_hominglauncher        = 10,
	weapon_compactlauncher       = 10,
	weapon_rayminigun            = 10,
}

config.weaponBreakAmount = {}

for weapon, int in pairs(weaponList) do
	config.weaponBreakAmount[weapon] = int
	config.weaponBreakAmount[weapon:gsub("weapon_", "weapon_police_")] = int
end

config.langs = {}             -- don't change
config.strengthDivision = 200 -- for my server :(

Last updated