Toyota 发表于 2024-9-4 15:44:38

翻译成中文,保留源代码


Citizen.CreateThread(function()
    Config.CameraControls = {
      ['takephoto'] = {
            key = 38,
            icon = 'entericon',
            label = 'Press take a photo.',
            icon2 = 'cameraicon'
      },
      ['flipcamera'] = {
            key = 38,
            icon = 'leftarrowicon',
            icon2 = 'cameraicon2',
            label = 'Press to flip cam mods.',
      },
      -- ['flash'] = {
      --   key = 38,
      --   icon = 'flashicon',
      --   label = 'Press {icon} to toggle flash.',
      -- },
      ['cursor'] = {
            key = 38,
            icon = 'alticon',
            label = 'Press to open cursor.',
            icon2 = 'mouseicon',
      },
      ['changecamera'] = {
            key = 38,
            icon = 'uparrowicon',
            icon2 = 'rotateicon',
            label = 'Press to flip camera.',
      }
    }
end)


-- ███████╗██╗░░░██╗███████╗██╗░░░░░
-- ██╔════╝██║░░░██║██╔════╝██║░░░░░
-- █████╗░░██║░░░██║█████╗░░██║░░░░░
-- ██╔══╝░░██║░░░██║██╔══╝░░██║░░░░░
-- ██║░░░░░╚██████╔╝███████╗███████╗
-- ╚═╝░░░░░░╚═════╝░╚══════╝╚══════╝

Config.SetVehicleFuel = function(vehicle, fuel_level)
    if GetResourceState("LegacyFuel") == "started" then
      return exports["LegacyFuel"]:SetFuel(vehicle, fuel_level)
    elseif GetResourceState("x-fuel") == "started" then
      return exports["x-fuel"]:SetFuel(vehicle, fuel_level)
    else
      return SetVehicleFuelLevel(vehicle, fuel_level + 0.0)
    end
end

-- ██╗░░░██╗███████╗██╗░░██╗██╗░█████╗░██╗░░░░░███████╗██╗░░██╗███████╗██╗░░░██╗
-- ██║░░░██║██╔════╝██║░░██║██║██╔══██╗██║░░░░░██╔════╝██║░██╔╝██╔════╝╚██╗░██╔╝
-- ╚██╗░██╔╝█████╗░░███████║██║██║░░╚═╝██║░░░░░█████╗░░█████═╝░█████╗░░░╚████╔╝░
-- ░╚████╔╝░██╔══╝░░██╔══██║██║██║░░██╗██║░░░░░██╔══╝░░██╔═██╗░██╔══╝░░░░╚██╔╝░░
-- ░░╚██╔╝░░███████╗██║░░██║██║╚█████╔╝███████╗███████╗██║░╚██╗███████╗░░░██║░░░
-- ░░░╚═╝░░░╚══════╝╚═╝░░╚═╝╚═╝░╚════╝░╚══════╝╚══════╝╚═╝░░╚═╝╚══════╝░░░╚═╝░░░
Config.Vehiclekey = true
Config.GiveVehicleKey = function(plate, model) -- you can change vehiclekeys export if you use another vehicle key system
    if Config.Vehiclekey then
      if GetResourceState("cd_garage") == "started" then
            TriggerEvent("cd_garage:AddKeys", exports["cd_garage"]:GetPlate(vehicle))
      elseif GetResourceState("qs-vehiclekeys") == "started" then
            model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
            exports['qs-vehiclekeys']:GiveKeys(plate, model)
      elseif GetResourceState("wasabi-carlock") == "started" then
            exports.wasabi_carlock:GiveKey(plate)
      elseif GetResourceState("qb-vehiclekeys") == "started" then
            TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", plate)
      end
    end
end

-- ░██████╗░██╗░░░██╗██╗░█████╗░██╗░░██╗  ██╗░░░░░░█████╗░░█████╗░░█████╗░████████╗██╗░█████╗░███╗░░██╗░██████╗
-- ██╔═══██╗██║░░░██║██║██╔══██╗██║░██╔╝  ██║░░░░░██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║██╔════╝
-- ██║██╗██║██║░░░██║██║██║░░╚═╝█████═╝░  ██║░░░░░██║░░██║██║░░╚═╝███████║░░░██║░░░██║██║░░██║██╔██╗██║╚█████╗░
-- ╚██████╔╝██║░░░██║██║██║░░██╗██╔═██╗░  ██║░░░░░██║░░██║██║░░██╗██╔══██║░░░██║░░░██║██║░░██║██║╚████║░╚═══██╗
-- ░╚═██╔═╝░╚██████╔╝██║╚█████╔╝██║░╚██╗  ███████╗╚█████╔╝╚█████╔╝██║░░██║░░░██║░░░██║╚█████╔╝██║░╚███║██████╔╝
-- ░░░╚═╝░░░░╚═════╝░╚═╝░╚════╝░╚═╝░░╚═╝  ╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝╚═════╝░
Config.QuickLocations = {
    bank = {
      vector3(150.266, -1040.203, 29.374),
      vector3(-1212.980, -330.841, 37.787),
      vector3(-2962.582, 482.627, 15.703),
      vector3(-112.202, 6469.295, 31.626),
      vector3(314.187, -278.621, 54.170),
      vector3(-351.534, -49.529, 49.042),
      vector3(241.727, 220.706, 106.286),
      vector3(1175.064, 2706.643, 38.094),
    },
    gas_stations = {
      vector3(49.4187, 2778.793, 58.043),
      vector3(263.894, 2606.463, 44.983),
      vector3(1039.958, 2671.134, 39.550),
      vector3(1207.260, 2660.175, 37.899),
      vector3(2539.685, 2594.192, 37.944),
      vector3(2679.858, 3263.946, 55.240),
      vector3(2005.055, 3773.887, 32.403),
      vector3(1687.156, 4929.392, 42.078),
      vector3(1701.314, 6416.028, 32.763),
      vector3(179.857, 6602.839, 31.868),
      vector3(-94.4619, 6419.594, 31.489),
      vector3(-2554.996, 2334.40, 33.078),
      vector3(-1800.375, 803.661, 138.651),
      vector3(-1437.622, -276.747, 46.207),
      vector3(-2096.243, -320.286, 13.168),
      vector3(-724.619, -935.1631, 19.213),
      vector3(-526.019, -1211.003, 18.184),
      vector3(-70.2148, -1761.792, 29.534),
      vector3(265.648, -1261.309, 29.292),
      vector3(819.653, -1028.846, 26.403),
      vector3(1208.951, -1402.567, 35.224),
      vector3(1181.381, -330.847, 69.316),
      vector3(620.843, 269.100, 103.089),
      vector3(2581.321, 362.039, 108.468),
      vector3(176.631, -1562.025, 29.263),
      vector3(176.631, -1562.025, 29.263),
      vector3(-319.292, -1471.715, 30.549),
      vector3(1784.324, 3330.55, 41.253)
    },
    shops = {
      vector3(373.875, 325.896, 102.566),
      vector3(2557.458, 382.282, 107.622),
      vector3(-3038.939, 585.954, 6.908),
      vector3(-1487.553, -379.107, 39.163),
      vector3(1392.562, 3604.684, 33.980),
      vector3(-2968.243, 390.910, 14.043),
      vector3(2678.916, 3280.671, 54.24),
      vector3(-48.519, -1757.514, 28.421),
      vector3(1163.373, -323.801, 68.205),
      vector3(-707.501, -914.260, 18.215),
      vector3(-1820.523, 792.518, 137.118),
      vector3(1698.388, 4924.404, 41.063),
      vector3(1961.464, 3740.672, 31.343),
      vector3(1135.808, -982.281, 45.415),
      vector3(25.88, -1347.1, 28.5),
      vector3(547.431, 2671.710, 41.156),
      vector3(-3241.927, 1001.462, 11.830),
      vector3(1166.024, 2708.930, 37.157),
      vector3(1729.216, 6414.131, 34.037),
    },
    clothing_shops = {
      vector3(72.3, -1399.1, 28.4),
      vector3(-703.8, -152.3, 36.4),
      vector3(-167.9, -299.0, 38.7),
      vector3(428.7, -800.1, 28.5),
      vector3(-829.4, -1073.7, 10.3),
      vector3(-1447.8, -242.5, 48.8),
      vector3(11.6, 6514.2, 30.9),
      vector3(123.6, -219.4, 53.6),
      vector3(1696.3, 4829.3, 41.1),
      vector3(618.1, 2759.6, 41.1),
      vector3(1190.6, 2713.4, 37.2),
      vector3(-1193.4, -772.3, 16.3),
      vector3(-3172.5, 1048.1, 19.9),
      vector3(-1108.4, 2708.9, 18.1)
    },
}


-- ███╗░░██╗░█████╗░████████╗██╗███████╗██╗░█████╗░░█████╗░████████╗██╗░█████╗░███╗░░██╗
-- ████╗░██║██╔══██╗╚══██╔══╝██║██╔════╝██║██╔══██╗██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║
-- ██╔██╗██║██║░░██║░░░██║░░░██║█████╗░░██║██║░░╚═╝███████║░░░██║░░░██║██║░░██║██╔██╗██║
-- ██║╚████║██║░░██║░░░██║░░░██║██╔══╝░░██║██║░░██╗██╔══██║░░░██║░░░██║██║░░██║██║╚████║
-- ██║░╚███║╚█████╔╝░░░██║░░░██║██║░░░░░██║╚█████╔╝██║░░██║░░░██║░░░██║╚█████╔╝██║░╚███║
-- ╚═╝░░╚══╝░╚════╝░░░░╚═╝░░░╚═╝╚═╝░░░░░╚═╝░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝

Config.Notification = function(message, type, isServer, src) -- You can change here events for notifications
    if isServer then


ChatGPT 发表于 2024-9-4 16:04:22

以下是您提供的代码的中文翻译,保留了源代码:

Citizen.CreateThread(function()
    Config.CameraControls = {
      ['takephoto'] = {
            key = 38,
            icon = 'entericon',
            label = '按下拍照。',
            icon2 = 'cameraicon'
      },
      ['flipcamera'] = {
            key = 38,
            icon = 'leftarrowicon',
            icon2 = 'cameraicon2',
            label = '按下翻转相机模式。',
      },
      --= {
      --   key = 38,
      --   icon = 'flashicon',
      --   label = '按下 {icon} 切换闪光灯。',
      -- },
      ['cursor'] = {
            key = 38,
            icon = 'alticon',
            label = '按下打开光标。',
            icon2 = 'mouseicon',
      },
      ['changecamera'] = {
            key = 38,
            icon = 'uparrowicon',
            icon2 = 'rotateicon',
            label = '按下翻转相机。',
      }
    }
end)

-- ███████╗██╗░░░██╗███████╗██╗░░░░░
-- ██╔════╝██║░░░██║██╔════╝██║░░░░░
-- █████╗░░██║░░░██║█████╗░░██║░░░░░
-- ██╔══╝░░██║░░░██║██╔══╝░░██║░░░░░
-- ██║░░░░░╚██████╔╝███████╗███████╗
-- ╚═╝░░░░░░╚═════╝░╚══════╝╚══════╝

Config.SetVehicleFuel = function(vehicle, fuel_level)
    if GetResourceState("LegacyFuel") == "started" then
      return exports["LegacyFuel"]:SetFuel(vehicle, fuel_level)
    elseif GetResourceState("x-fuel") == "started" then
      return exports["x-fuel"]:SetFuel(vehicle, fuel_level)
    else
      return SetVehicleFuelLevel(vehicle, fuel_level + 0.0)
    end
end

-- ██╗░░░██╗███████╗██╗░░██╗██╗░█████╗░██╗░░░░░███████╗██╗░░██╗███████╗██╗░░░██╗
-- ██║░░░██║██╔════╝██║░░██║██║██╔══██╗██║░░░░░██╔════╝██║░██╔╝██╔════╝╚██╗░██╔╝
-- ╚██╗░██╔╝█████╗░░███████║██║██║░░╚═╝██║░░░░░█████╗░░█████═╝░█████╗░░░╚████╔╝░
-- ░╚████╔╝░██╔══╝░░██╔══██║██║██║░░██╗██║░░░░░██╔══╝░░██╔═██╗░██╔══╝░░░░╚██╔╝░░
-- ░░╚██╔╝░░███████╗██║░░██║██║╚█████╔╝███████╗███████╗██║░╚██╗███████╗░░░██║░░░
-- ░░░╚═╝░░░╚══════╝╚═╝░░╚═╝╚═╝░╚════╝░╚══════╝╚══════╝╚═╝░░╚═╝╚══════╝░░░╚═╝░░░
Config.Vehiclekey = true
Config.GiveVehicleKey = function(plate, model) -- 如果您使用其他车辆钥匙系统,可以更改车辆钥匙导出
    if Config.Vehiclekey then
      if GetResourceState("cd_garage") == "started" then
            TriggerEvent("cd_garage:AddKeys", exports["cd_garage"]:GetPlate(vehicle))
      elseif GetResourceState("qs-vehiclekeys") == "started" then
            model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
            exports['qs-vehiclekeys']:GiveKeys(plate, model)
      elseif GetResourceState("wasabi-carlock") == "started" then
            exports.wasabi_carlock:GiveKey(plate)
      elseif GetResourceState("qb-vehiclekeys") == "started" then
            TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", plate)
      end
    end
end

-- ░██████╗░██╗░░░██╗██╗░█████╗░██╗░░██╗  ██╗░░░░░░█████╗░░█████╗░░█████╗░████████╗██╗░█████╗░███╗░░██╗░██████╗
-- ██╔═══██╗██║░░░██║██║██╔══██╗██║░██╔╝  ██║░░░░░██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║██╔════╝
-- ██║██╗██║██║░░░██║██║██║░░╚═╝█████═╝░  ██║░░░░░██║░░██║██║░░╚═╝███████║░░░██║░░░██║██║░░██║██╔██╗██║╚█████╗░
-- ╚██████╔╝██║░░░██║██║██║░░██╗██╔═██╗░  ██║░░░░░██║░░██║██║░░██╗██╔══██║░░░██║░░░██║██║░░██║██║╚████║░╚═══██╗
-- ░╚═██╔═╝░╚██████╔╝██║╚█████╔╝██║░╚██╗  ███████╗╚█████╔╝╚█████╔╝██║░░██║░░░██║░░░██║╚█████╔╝██║░╚███║██████╔╝
-- ░░░╚═╝░░░░╚════╝░░░░╚═╝░╚════╝░╚═╝░░╚═╝  ╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝╚═════╝░
Config.QuickLocations = {
    bank = {
      vector3(150.266, -1040.203, 29.374),
      vector3(-1212.980, -330.841, 37.787),
      vector3(-2962.582, 482.627, 15.703),
      vector3(-112.202, 6469.295, 31.626),
      vector3(314.187, -278.621, 54.170),
      vector3(-351.534, -49.529, 49.042),
      vector3(241.727, 220.706, 106.286),
      vector3(1175.064, 2706.643, 38.094),
    },
    gas_stations = {
      vector3(49.4187, 2778.793, 58.043),
      vector3(263.894, 2606.463, 44.983),
      vector3(1039.958, 2671.134, 39.550),
      vector3(1207.260, 2660.175, 37.899),
      vector3(2539.685, 2594.192, 37.944),
      vector3(2679.858, 3263.946, 55.240),
      vector3(2005.055, 3773.887, 32.403),
      vector3(1687.156, 4929.392, 42.078),
      vector3(1701.314, 6416.028, 32.763),
      vector3(179.857, 6602.839, 31.868),
      vector3(-94.4619, 6419.594, 31.489),
      vector3(-2554.996, 2334.40, 33.078),
      vector3(-1800.375, 803.661, 138.651),
      vector3(-1437.622, -276.747, 46.207),
      vector3(-2096.243, -320.286, 13.168),
      vector3(-724.619, -935.1631, 19.213),
      vector3(-526.019, -1211.003, 18.184),
      vector3(-70.2148, -1761.792, 29.534),
      vector3(265.648, -1261.309, 29.292),
      vector3(819.653, -1028.846, 26.403),
      vector3(1208.951, -1402.567, 35.224),
      vector3(1181.381, -330.847, 69.316),
      vector3(620.843, 269.100, 103.089),
      vector3(2581.321, 362.039, 108.468),
      vector3(176.631, -1562.025, 29.263),
      vector3(176.631, -1562.025, 29.263),
      vector3(-319.292, -1471.715, 30.549),
      vector3(1784.324, 3330.55, 41.253)
    },
    shops = {
      vector3(373.875, 325.896, 102.566),
      vector3(2557.458, 382.282, 107.622),
      vector3(-3038.939, 585.954, 6.908),
      vector3(-1487.553, -379.107, 39.163),
      vector3(1392.562, 3604.684, 33.980),
      vector3(-2968.243, 390.910, 14.043),
      vector3(2678.916, 3280.671, 54.24),
      vector3(-48.519, -1757.514, 28.421),
      vector3(1163.373, -323.801, 68.205),
      vector3(-707.501, -914.260, 18.215),
      vector3(-1820.523, 792.518, 137.118),
      vector3(1698.388, 4924.404, 41.063),
      vector3(1961.464, 3740.672, 31.343),
      vector3(1135.808, -982.281, 45.415),
      vector3(25.88, -1347.1, 28.5),
      vector3(547.431, 2671.710, 41.156),
      vector3(-3241.927, 1001.462, 11.830),
      vector3(1166.024, 2708.930, 37.157),
      vector3(1729.216, 6414.131, 34.037),
    },
    clothing_shops = {
      vector3(72.3, -1399.1, 28.4),
      vector3(-703.8, -152.3, 36.4),
      vector3(-167.9, -299.0, 38.7),
      vector3(428.7, -800.1, 28.5),
      vector3(-829.4, -1073.7, 10.3),
      vector3(-1447.8, -242.5, 48.8),
      vector3(11.6, 6514.2, 30.9),
      vector3(123.6, -219.4, 53.6),
      vector3(1696.3, 4829.3, 41.1),
      vector3(618.1, 2759.6, 41.1),
      vector3(1190.6, 2713.4, 37.2),
      vector3(-1193.4, -772.3, 16.3),
      vector3(-3172.5, 1048.1, 19.9),
      vector3(-1108.4, 2708.9, 18.1)
    },
}

-- ███╗░░██╗░█████╗░████████╗██╗███████╗██╗░█████╗░░█████╗░████████╗██╗░█████╗░███╗░░██╗
-- ████╗░██║██╔══██╗╚══██╔══╝██║██╔════╝██║██╔══██╗██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║
-- ██╔██╗██║██║░░██║░░░██║░░░██║█████╗░░██║██║░░╚═╝███████║░░░██║░░░██║██║░░██║██╔██╗██║
-- ██║╚████║██║░░██║░░░██║░░░██║██╔══╝░░██║██║░░██╗██╔══██║░░░██║░░░██║██║░░██║██║╚████║
-- ██║░╚███║╚█████╔╝░░░██║░░░██║██║░░░░░██║╚█████╔╝██║░░██║░░░██║░░░██║╚█████╔╝██║░╚███║
-- ╚═╝░░╚══╝░╚════╝░░░░╚═╝░░░╚═╝╚═╝░░░░░╚═╝░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝

Config.Notification = function(message, type, isServer, src) -- 您可以在这里更改通知的事件
    if isServer then
      -- 服务器端的通知逻辑
    end
end

如果您有其他问题或需要进一步的帮助,请告诉我!
页: [1]
查看完整版本: 翻译成中文,保留源代码