猪猪侠 发表于 2024-5-16 08:16:08

翻译


name = "Always Shop",
      hasOwner = false, -- when this is false you don't need all the config elements but dont forget to add on Config.ShowVehicle and Config.TransitionCamerasOffset
      coords = {x = -74.93, y = -1116.35, z = 25.43},
      radius = 1,
      blip = {blipId = 225, blipColor = 3, blipScale = 0.9, blipText = "Vehicleshop"},
      marker = {id = 20, color = {r = 94, g = 255, b = 155}, size = {x = 0.5, y = 0.5, z = 0.5}},
      type = "vehicles",
      id = "alwaysshop1",
    },
    {
      name = "Air Shop",
      hasOwner = true,
      coords = {x = -949.5, y = -2946.55, z = 13.95},
      ownerCoords = {x = -941.51, y = -2955.03, z = 13.95},
      spawnFlatbedPos = {x = -947.62, y = -2976.86, z = 13.95, h = 270.0},
      missionsVehicleSpawn = {
            {x = -1835.77, y = 2979.52, z = 32.81, h = 100.0},
      },
      radius = 1,
      price = 12000,
      blip = {blipId = 64, blipColor = 3, blipScale = 0.9, blipText = "Air shop"},
      ownerBlip = {blipId = 64, blipColor = 2, blipScale = 0.9, blipText = "Air shop Panel"},
      buyBlip = {blipId = 64, blipColor = 1, blipScale = 0.9, blipText = "Air shop to buy"},
      marker = {id = 20, color = {r = 94, g = 255, b = 155}, size = {x = 0.5, y = 0.5, z = 0.5}},
      ownerMarker = {id = 21, color = {r = 94, g = 255, b = 155}, size = {x = 0.5, y = 0.5, z = 0.5}},
      towHeight = 1.3,
      bigVehicles = true,
      type = "air",
      id = "air1",
    },
    {
      name = "Water Shop",
      hasOwner = true,
      coords = {x = -720.77, y = -1324.92, z = 1.6},
      ownerCoords = {x = -712.16, y = -1298.88, z = 5.1},
      spawnFlatbedPos = {x = -719.77, y = -1286.15, z = 5.0, h = 120.0},
      missionsVehicleSpawn = {
            {x = -758.15, y = -1488.26, z = 5.0, h = 280.0},
      },
      radius = 1,
      price = 14000,
      blip = {blipId = 427, blipColor = 3, blipScale = 0.9, blipText = "Water shop"},
      ownerBlip = {blipId = 427, blipColor = 2, blipScale = 0.9, blipText = "Water shop Panel"},
      buyBlip = {blipId = 427, blipColor = 1, blipScale = 0.9, blipText = "Water shop to buy"},
      marker = {id = 20, color = {r = 94, g = 255, b = 155}, size = {x = 0.5, y = 0.5, z = 0.5}},
      ownerMarker = {id = 21, color = {r = 94, g = 255, b = 155}, size = {x = 0.5, y = 0.5, z = 0.5}},
      towHeight = 0.9,
      bigVehicles = true,
      type = "water",
      id = "water1",
    },
}

Config.ShowVehicle = { -- Display vehicle
    ["vehicles1"] = { -- ID of the vehicle shop
      position = {x = -44.21, y = -1097.06, z = 26.42, h = 160.0}, -- Where to spawn the display vehicles
      noVehicleCam = {x = -44.21-1.49, y = -1097.06-7.65, z = 26.42+1.15}, -- Camera position when there is no vehicle to be displayed
      testDrive = {x = -1733.25, y = -2901.43, z = 13.94, h = 330.0}, -- Where to start the test drive
      vehicleSpawn = {x = -27.65, y = -1082.03, z = 26.64, h = 70.0}, -- Where the vehicle spawns when bought
    },
    ["alwaysshop1"] = { -- ID of the vehicle shop
      position = {x = -44.21, y = -1097.06, z = 26.42, h = 160.0}, -- Where to spawn the display vehicles
      noVehicleCam = {x = -44.21-1.49, y = -1097.06-7.65, z = 26.42+1.15}, -- Camera position when there is no vehicle to be displayed
      testDrive = {x = -1733.25, y = -2901.43, z = 13.94, h = 330.0}, -- Where to start the test drive
      vehicleSpawn = {x = -27.65, y = -1082.03, z = 26.64, h = 70.0}, -- Where the vehicle spawns when bought
    },
    ["air1"] = {
      position = {x = -1652.0, y = -3142.69, z = 13.99, h = 70.0},
      noVehicleCam = {x = -1652.0-12.49, y = -3142.69-0.65, z = 13.99+2.15},
      testDrive = {x = -1733.25, y = -2901.43, z = 13.94, h = 330.0},
      vehicleSpawn = {x = -1023.91, y = -3060.6, z = 13.94, h = 70.0},
    },
    ["water1"] = {
      position = {x = -828.54, y = -1448.08, z = -0.5, h = 70.0},
      noVehicleCam = {x = -828.54-12.49, y = -1448.08-0.65, z = -0.5+3.15},
      testDrive = {x = -878.02, y = -1360.32, z = 2.0, h = 330.0},
      vehicleSpawn = {x = -706.78, y = -1333.57, z = 2.0, h = 70.0},
    },
}

Config.TransitionCamerasOffset = { -- Cameras positions, you can add as many as you wish
    ["vehicles1"] = { -- ID of the vehicle shop
      {x = 1.49, y = 7.65, z = 1.15},
      {x = 14.0, y = 5.0, z = 0.6},
      {x = 7.0, y = -5.0, z = 1.5},
      {x = -15.0, y = -3.0, z = 1.6},
    },
    ["alwaysshop1"] = { -- ID of the vehicle shop
      {x = 1.49, y = 7.65, z = 1.15},
      {x = 14.0, y = 5.0, z = 0.6},
      {x = 7.0, y = -5.0, z = 1.5},
      {x = -15.0, y = -3.0, z = 1.6},
    },
    ["air1"] = {
      {x = 12.49, y = 0.65, z = 2.15},
      {x = 9.0, y = 20.0, z = 1.6},
      {x = -13.5, y = 8.0, z = 2.5},
      {x = -4.0, y = -13.0, z = 2.6},
    },
    ["water1"] = {
      {x = 12.49, y = 0.65, z = 3.15},
      {x = 9.0, y = 20.0, z = 2.6},
      {x = -13.5, y = 8.0, z = 3.5},
      {x = -4.0, y = -13.0, z = 3.6},
    },
}

Config.VehicleshopsCategories = { -- Categories shown on the vehicle shops, this is used to set the vehicles category
    ["vehicles"] = { -- TYPE of the vehicle shop
      {display = "COMMERCIALS", id = "tesla"},
      {display = "SUPERCARS", id = "gta"},
      {display = "COMPACTS", id = "nothing"},
      {display = "COUPES", id = "bmw"},
      {display = "MOTORCYCLES", id = "gta"},
      {display = "MUSCLE", id = "nissan"},
      {display = "OFF-ROAD", id = "super"},
      {display = "SEDANS", id = "gta"},
      {display = "SPORTS", id = "nissan"},
      {display = "SUVS", id = "super"},
      {display = "VANS", id = "bmw"},
    },
    ["air"] = {
      {display = "BIG", id = "big"},
      {display = "MEDIUM", id = "medium"},
      {display = "SMALL", id = "small"},
    },
    ["water"] = {
      {display = "BOATS", id = "boats"},
      {display = "SUBMARINE", id = "submarine"},
    },

}

Config.colors = { -- The vehicle colors, this will update the UI as well (it needs to be 10 colors, do NOT remove, add or change the color names)
    color1 = {255, 255, 255},
    color2 = {0, 0, 0},
    color3 = {150, 150, 150},
    color4 = {255, 0, 0},
    color5 = {255, 150, 0},
    color6 = {255, 230, 0},
    color7 = {0, 255, 0},
    color8 = {0, 0, 255},
    color9 = {76, 0, 255},
    color10 = {255, 0, 255},
}

Config.TextUI = { -- Text UI texts
    ['open_shop'] = {         text = ' To open ${shop_name}',                                    color = 'darkblue', side = 'right'},
    ['buy_business'] = {      text = ' to buy ${name} for ${price}€',                              color = 'darkblue', side = 'right'},
    ['access_business'] = {   text = ' to access ${name}',                                       color = 'darkblue', side = 'right'},
    ['tow'] = {               text = ' To tow',                                                    color = 'darkblue', side = 'right'},
}

Config.HelpNotification = { -- Used when Config.UseTextUI = false
    ['open_shop'] = {         text = ' To open ${shop_name}',                                    type = 'success', time = 5000},
    ['buy_business'] = {      text = ' to buy ${name} for ${price}€',                              type = 'success', time = 5000},
    ['access_business'] = {   text = ' to access ${name}',                                       type = 'success', time = 5000},
    ['tow'] = {               text = ' To tow',                                                    type = 'success', time = 5000},
}





ChatGPT 发表于 2024-5-16 08:16:22

这段代码是用于创建和配置FiveM服务器内的车辆商店的相关信息。其中包括了不同类型的车辆商店,如陆地车辆商店(vehicles)、空中车辆商店(air)和水面车辆商店(water)。每个商店都有特定的坐标、标识、价格等信息。

此代码是放在服务器的脚本文件server.lua中的,用于配置和定义车辆商店的各种相关信息。

你还有其他关于代码的问题吗?
页: [1]
查看完整版本: 翻译