杰瑞米瓦德 发表于 2024-9-24 02:52:24

翻译 保留源代码


local esxHas = GetResourceState('es_extended') == 'started'
local qbHas = GetResourceState('qb-core') == 'started'

Config.Framework = esxHas and 'esx' or qbHas and 'qb' or 'esx'

--[[
    Target systems pre-configured by default:
      'qb-target'
      'ox_target'

      'none' It means that it is deactivated


Config.UseTarget = 'none'                -- Choose between 'qb-target', 'ox_target' or 'none' disabled!

Config.BlockedSwap = false               -- If set to true, you will not be able to swap between items
Config.BlockedSlot = false               -- This is the sixth slot, the one that does not allow them to steal from that space
Config.GiveItemHideName = true          -- If you enable this, then the player will not be able to see names in giveitem, only id
Config.OpeingProgressBar = false         -- Please set this set to true to avoid dupes

Config.Handsup = true                  -- Enable or disable Handsup and Robbery button
Config.StealDeadPlayer = true            -- Steal from dead players?
Config.StealWithoutWeapons = false       -- Possibility to draw only if the target player raises his arms (without weapons)
Config.DropItemWhenInventoryFull = false -- Drop the item when the inventory is fully

Config.InventoryWeight = {               -- Configuration of maximum weight and maximum slots of the player
    ['weight'] = 120000,
    --- CAUTION: If you change this value after the anyone has items. It will cause dupe problems. So don't forget to wipe all the inventories.
    ['slots'] = 41, -- If you want to remove the 6 slot, use 40 here!
}

Config.DropWeight = { -- Configuration of maximum weight and maximum slots of the player
    ['weight'] = 20000000,
    ['slots'] = 130,-- If you want to remove the 6 slot, use 40 here! (Max 100)
}

Config.LabelChange = true       -- Enable or disable this function here
Config.LabelChangePrice = false -- Set prince or false
Config.BlockedLabelChangeItems = {
    ['money'] = true,
    ['phone'] = true,
}

Config.UsableItemsFromHotbar = true -- Can the items be used with the hotbar? (1, 2, 3, 4, 5)
Config.BlockedItemsHotbar = {       -- Items that you can not use from hotbar, only from the inventory
    'lockpick',
    -- Add more elements here if necessary
}

--[[
    Hello, you do, the one who uses qs-backpack. You have
    all the backpacks in server/custom/misc/UniqueItem.lua,
    there is a list of backpacks, all the ones you see there
    will count as a single item called 'backpack', so if you
    have a backpack2, it will count as a backpack, that is say,
    a single backpack per player. If you need to edit something
    you already know where the corresponding function is!


Config.OnePerItem = { -- Items that cannot be sent to your inventory (item = max amount)
    ['backpack'] = 1,
    -- Add more elements here if necessary
}

Config.notStolenItems = {
    ['id_card'] = true,
    ['water_bottle'] = true,
    ['tosti'] = true
}

Config.notStoredItems = {
    ['backpack'] = true,
}

-- If you enable this in true check the docs
-- ESX: https://docs.quasar-store.com/ Inventory > Functions > Clothing
-- QB: https://docs.quasar-store.com/
Config.Clothing = true                         -- Disable clothing system, this will disable the button too
Config.TakePreviousClothes = true            -- Set whether you want previous clothes to go to your inventory or be removed

Config.ItemDropObject = `prop_paper_bag_small` -- or false
Config.DropRefreshTime = 15 * 60
Config.MaxDropViewDistance = 9.5

Config.Genders = { -- You can ignore this
    ['m'] = 'Male',
    ['f'] = 'Female',
    [1] = 'Male',
    [2] = 'Female'
}

--[[
    Visual configuration of the resource!
    Here you can configure the animation to open the inventory,
    the logo or even the icons within the item information.

    InventoryOptions are the boxes that you see on the sides of the
    inventory, enable or disable them as you want.

    Regarding the genres of Default config, it is for clothes,
    configure it as you wish, if you have custom clothes, you should
    touch that configuration a lot.


Config.OpenInventoryAnim = true   -- Enable or disable ped animation
Config.OpenInventoryScene = false -- Inventory animation enabled or disabled
Config.Logo = false               -- You can use directory, like './icons/logo.png' or 'https://i.ibb.co/CJfj6KV/Mini-copia.png' (if not, use false)
Config.IdleCamera = true          -- Disable or enable idle camera!

Config.InventoryOptions = {
    -- Generic menu
    ['clothes'] = Config.Clothing, -- Enable or disable in Config.Clothing.
    ['configuration'] = true,
    -- Left menu
    ['health'] = true,
    ['armor'] = true,
    ['hunger'] = true,
    ['thirst'] = true,
    -- Right menu
    ['id'] = true,
    ['money'] = true,
    ['bank'] = true,
    ['blackmoney'] = true,
}

-- https://fontawesome.com/
-- In this section we can give custom icons to the info of the items
Config.getItemicons = {
    ['tosti'] = {
      icon = 'fa-solid fa-utensils',
    },
    ['water_bottle'] = {
      icon = 'fa-solid fa-utensils',
    },
}

-- In case of using custom clothing, modify here
Config.Defaults = {
    ['female'] = {
      torso = 15,
      jeans = 14,
      shoes = 45,
      arms = 15,
      helmet = -1,
      glasses = -1,
      mask = 0,
      tshirt = -1,
      ears = -1,
      bag = 0,
    },
    ['male'] = {
      torso = 15,
      jeans = 14,
      shoes = 45,
      arms = 15,
      helmet = -1,
      glasses = -1,
      mask = 0,
      tshirt = 15,
      ears = -1,
      bag = 0,
    }
}

Config.KeyBinds = { -- They are keymaps, check the docs to know how they work!
    ['inventory'] = 'TAB',
    ['hotbar'] = 'Z',
    ['reload'] = 'R',
    ['handsup'] = 'X',
}

--[[
    Debug mode, you can see all kinds of prints/logs using debug,
    but it's only for development.


Config.Debug = false               -- Do not touch here if you are not a developer
Config.ZoneDebug = false             -- Do not touch here if you are not a developer
Config.InventoryPrefix = 'inventory' -- Do not touch here if you are not a developer (if you use this you need to modify many more things)



ChatGPT 发表于 2024-9-24 02:52:50

local esxHas = GetResourceState('es_extended') == 'started' -- 检查 es_extended 资源是否已启动
local qbHas = GetResourceState('qb-core') == 'started' -- 检查 qb-core 资源是否已启动

Config.Framework = esxHas and 'esx' or qbHas and 'qb' or 'esx' -- 设置框架为 esx 或 qb

--[[
    默认预配置的目标系统:
      'qb-target'
      'ox_target'

      'none' 表示已停用
]]

Config.UseTarget = 'none'                -- 选择 'qb-target'、'ox_target' 或 'none' 禁用!

Config.BlockedSwap = false               -- 如果设置为 true,将无法在物品之间交换
Config.BlockedSlot = false               -- 这是第六个槽,不允许从该空间偷窃
Config.GiveItemHideName = true          -- 如果启用,玩家将无法在给物品时看到名称,只能看到 ID
Config.OpeingProgressBar = false         -- 请将此设置为 true 以避免重复物品

Config.Handsup = true                  -- 启用或禁用举手和抢劫按钮
Config.StealDeadPlayer = true            -- 是否可以从死去的玩家身上偷东西?
Config.StealWithoutWeapons = false       -- 只有当目标玩家举起手臂(没有武器)时才能进行偷窃
Config.DropItemWhenInventoryFull = false -- 当库存满时丢弃物品

Config.InventoryWeight = {               -- 玩家最大重量和最大槽位的配置
    ['weight'] = 120000,
    --- 注意:如果在任何人拥有物品后更改此值,将会导致重复问题。因此,请不要忘记清空所有库存。
    ['slots'] = 41, -- 如果要移除第六个槽,请在这里使用 40!
}

Config.DropWeight = { -- 玩家最大重量和最大槽位的配置
    ['weight'] = 20000000,
    ['slots'] = 130,-- 如果要移除第六个槽,请在这里使用 40!(最大 100)
}

Config.LabelChange = true       -- 启用或禁用此功能
Config.LabelChangePrice = false -- 设置价格或 false
Config.BlockedLabelChangeItems = {
    ['money'] = true,
    ['phone'] = true,
}

Config.UsableItemsFromHotbar = true -- 可以使用热键栏中的物品吗?(1, 2, 3, 4, 5)
Config.BlockedItemsHotbar = {       -- 不能从热键栏使用的物品,只能从库存中使用
    'lockpick',
    -- 如有必要,请在此添加更多元素
}

--[[
    你好,你使用 qs-backpack 的人。你有
    所有背包在 server/custom/misc/UniqueItem.lua 中,
    那里有一个背包列表,所有你看到的背包
    将被视为一个名为 'backpack' 的单一物品,因此如果你
    有 backpack2,它将被视为一个背包,也就是说,
    每个玩家只能有一个背包。如果你需要编辑某些内容
    你已经知道相应的功能在哪里!
]]

Config.OnePerItem = { -- 不能发送到库存的物品(物品 = 最大数量)
    ['backpack'] = 1,
    -- 如有必要,请在此添加更多元素
}

Config.notStolenItems = {
    ['id_card'] = true,
    ['water_bottle'] = true,
    ['tosti'] = true
}

Config.notStoredItems = {
    ['backpack'] = true,
}

-- 如果将此设置为 true,请查看文档
-- ESX: https://docs.quasar-store.com/ Inventory > Functions > Clothing
-- QB: https://docs.quasar-store.com/
Config.Clothing = true                         -- 禁用服装系统,这将禁用按钮
Config.TakePreviousClothes = true            -- 设置是否希望将之前的衣物放入库存或移除

Config.ItemDropObject = `prop_paper_bag_small` -- 或 false
Config.DropRefreshTime = 15 * 60
Config.MaxDropViewDistance = 9.5

Config.Genders = { -- 你可以忽略这个
    ['m'] = '男性',
    ['f'] = '女性',
    = '男性',
    = '女性'
}

--[[
    资源的视觉配置!
    在这里你可以配置打开库存的动画,
    logo 或甚至物品信息中的图标。

    InventoryOptions 是你在库存两侧看到的框,
    根据需要启用或禁用它们。

    关于默认配置的性别,这是针对服装的,
    根据你的需要进行配置,如果你有自定义服装,
    你应该多多调整该配置。
]]

Config.OpenInventoryAnim = true   -- 启用或禁用角色动画
Config.OpenInventoryScene = false -- 库存动画启用或禁用
Config.Logo = false               -- 你可以使用目录,例如 './icons/logo.png' 或 'https://i.ibb.co/CJfj6KV/Mini-copia.png'(如果没有,请使用 false)
Config.IdleCamera = true          -- 启用或禁用闲置摄像机!

Config.InventoryOptions = {
    -- 通用菜单
    ['clothes'] = Config.Clothing, -- 在 Config.Clothing 中启用或禁用。
    ['configuration'] = true,
    -- 左侧菜单
    ['health'] = true,
    ['armor'] = true,
    ['hunger'] = true,
    ['thirst'] = true,
    -- 右侧菜单
    ['id'] = true,
    ['money'] = true,
    ['bank'] = true,
    ['blackmoney'] = true,
}

-- https://fontawesome.com/
-- 在此部分我们可以为物品信息提供自定义图标
Config.getItemicons = {
    ['tosti'] = {
      icon = 'fa-solid fa-utensils',
    },
    ['water_bottle'] = {
      icon = 'fa-solid fa-utensils',
    },
}

-- 如果使用自定义服装,请在此修改
Config.Defaults = {
    ['female'] = {
      torso = 15,
      jeans = 14,
      shoes = 45,
      arms = 15,
      helmet = -1,
      glasses = -1,
      mask = 0,
      tshirt = -1,
      ears = -1,
      bag = 0,
    },
    ['male'] = {
      torso = 15,
      jeans = 14,
      shoes = 45,
      arms = 15,
      helmet = -1,
      glasses = -1,
      mask = 0,
      tshirt = 15,
      ears = -1,
      bag = 0,
    }
}

Config.KeyBinds = { -- 这些是键位映射,请查看文档以了解它们的工作原理!
    ['inventory'] = 'TAB',
    ['hotbar'] = 'Z',
    ['reload'] = 'R',
    ['handsup'] = 'X',
}

--[[
    调试模式,你可以使用调试查看各种打印/日志,
    但这仅用于开发。

Config.Debug = false               -- 如果你不是开发者,请不要触碰这里
Config.ZoneDebug = false             -- 如果你不是开发者,请不要触碰这里
Config.InventoryPrefix = 'inventory' -- 如果你使用此项,你需要修改更多内容,请不要触碰这里
页: [1]
查看完整版本: 翻译 保留源代码