shuijiao 发表于 2024-5-6 08:25:56

翻译全部内容保留原代码

Config = {}

Config.ImagePath = 'nui://ox_inventory/web/images/' -- Source of images
Config.Debug = false -- Box zone debug

Config.Pawnshops = {
    = {
      coords = vector3(412.14, 315.06, 102.15), -- Blip coords
      pedcoords = vector3(412.14, 315.06, 102.15), -- NPC coords
      heading = 205.0, -- NPC heading
      ped = 'ig_josh', -- NPC model | https://docs.fivem.net/docs/game-references/ped-models/
      length = 1.0, -- Lenght of third eye box zone
      width = 1.0, -- Width of third eye box zone
      distance = 3.0 -- Distance that the player can interact with the npc
    },
}

Config.ItemsSold = { -- Items sold at the pawnshop
    { name = 'phone', price = 500 },
    { name = 'water', price = 7 },
}

Config.ItemsBuy = { -- Items bought by the pawnshop
    ['phone'] = {
       label = 'Phone',
       price = 400,
    },
    ['water'] = {
       label = 'Water',
       price = 5,
    },
}

ChatGPT 发表于 2024-5-6 08:26:07

Config = {}

Config.ImagePath = 'nui://ox_inventory/web/images/' -- 图片路径
Config.Debug = false -- 区域框调试

Config.Pawnshops = {
    = {
      coords = vector3(412.14, 315.06, 102.15), -- 地图标记坐标
      pedcoords = vector3(412.14, 315.06, 102.15), -- NPC坐标
      heading = 205.0, -- NPC朝向
      ped = 'ig_josh', -- NPC模型 | https://docs.fivem.net/docs/game-references/ped-models/
      length = 1.0, -- 第三眼区域框长
      width = 1.0, -- 第三眼区域框宽
      distance = 3.0 -- 玩家可以与NPC互动的距离
    },
}

Config.ItemsSold = { -- 在当铺出售的物品
    { name = 'phone', price = 500 },
    { name = 'water', price = 7 },
}

Config.ItemsBuy = { -- 当铺购买的物品
    Phone = {
      label = 'Phone',
      price = 400,
    },
    Water = {
      label = 'Water',
      price = 5,
    },
}

提示:以上代码应放在服务器的脚本文件(server.lua)中。
页: [1]
查看完整版本: 翻译全部内容保留原代码