lizhuoda 发表于 2024-8-12 19:36:41

h

请汉化以下东西,不改变原有代码
Config = {}
Config.Locale = "en" -- en,es,de or any language support
--FRAMEWORK
Config.framework = 'ESX' -- ESX, QBCORE
Config.target = true -- use ox_target,qb-target with peds when interacting to Garage.
--GENERAL SETTING
Config.Mysql = 'oxmysql' -- "ghmattisql", "mysql-async", "oxmysql"
Config.VehicleShopCoord = {
    = vec3(-35.65,-1095.9,26.4), --x , y, z
    = vec3(-1232.23,-349.45,37.32), --x , y, z
} --x,y,z of the current vehicle shop
Config.use_RenzuCustoms = false -- Use renzu_customs getter and setter for Vehicle Properties
Config.ReturnDamage = true -- return visual damage when restoring vehicle from garage
Config.RefreshOwnedVehiclesOnStart = true -- refresh vehicles store state (return any lost vehicles every server start (not script restart))
Config.ReturnPayment = 1000 -- a value to pay if vehicle is not in garage
Config.floatingtext = true -- use native floating text and marker to interact with garages (popui and floatingtext must be opposite settings) (popui must be false if this is true)
Config.UsePopUI = false -- Create a Thread for checking playercoords and Use POPUI to Trigger Event, set this to false if using rayzone. Popui is originaly built in to RayZone -- DOWNLOAD https://github.com/renzuzu/renzu_popui
Config.Quickpick = true -- if false system will create a garage shell and spawn every vehicle you preview
Config.UniqueCarperGarage = false -- if false, show all vehicles to all garage location! else if true, Vehicles Saved in Garage A cannot be take out from Garage B for example.
Config.GarageKeys = true -- Enable Player to Give Public Garage Keys to enable vehicle sharing
-- BLIPS --
Config.BlipNamesStatic = true -- if true no more garage a garage b blip names from MAP , only saysGarage
--GENERAL SETTING

-- VEHICLE IMAGES
Config.use_renzu_vehthumb = true

Config.Oxlib = true -- ox_lib https://github.com/overextended/ox_lib, for menus, contextmenu notification and etc.. if this is disable, it will use renzu_notify and renzu_contextmenu
Config.Ox_Inventory = true -- ox_inventory for vehicle keys as item https://github.com/overextended/ox_inventory if this is enable, vehiclekeys command will be disable as vehicle sharing is now item based
-- OX INV and ox lib is in BETA for this resource. use it in your own accord its enable by default if resource is started.
-- everytime you get a vehicle from garage you will receive a item key.
-- everytime you store vehicle (only public and private) item key will be removed.
-- item are added without the checks if slots is full.
-- the item works on other players. can use keylocks, park (real park and parkmeter), store vehicle, unpark vehicle.
Config.Renzu_jobs = false -- Job business Impound (impound only for now)
Config.EnableImpound = true -- enable/disable impound
Config.EnableHeliGarage = true -- enable/disable Helis
Config.PlateSpace = true -- enable / disable plate spaces (compatibility with esx 1.1?)
Config.Realistic_Parking = true
Config.ParkButton = 45 -- R
Config.EnableReturnVehicle = true -- enable / disable return vehicle feature
Config.DefaultPlate = 'ROLEPLAY' -- default plate being used to default_vehicles args

-- MARKER
Config.UseMarker = true -- Drawmarker
Config.MarkerDistance = 20 -- distance to draw the marker
--MARKER

-- PROPERTY / HOUSING GARAGE
Config.EnablePropertyCoordGarageCoord = false-- set to false if you will use custom exports and events
Config.HousingBlips = false
-- TriggerEvent('renzu_garage:property',"Forum Drive 11/Apt13", vector3(-1053.82, -933.09, 3.36)) -- example manual trigger
Config.PropertyQuickPick = true -- quickpick -- deprecated method 1.72
Config.UniqueProperty = true -- if enable , only stored vehicles in this Property ID will be show -- deprecated 1.72
Config.PrivateHousingGarageEnable = true -- will use IPL garages , small, medium, large (same with private garage) if this is false, it will use normal garage function like Public garage, quick pick menu

-- PARKING METER (WIP)
Config.ParkingMeter = true -- use configure parking props and park near by them
Config.ParkingAnywhere = true -- if this is true ParkingMeter Prop Feature will be replaced
-- ParkingAnywhere is like a realistic parking but by using /park command or /parkingmater
-- you can park anywhere using /park
Config.MeterProp = {
    = 'prop_parknmeter_01',
    = 'prop_parknmeter_02',
}
Config.MeterPayment = 5000

-- FEAT 1.71, a lot of functions here used One Sync State bags, One Sync must be enable

-- GarageKeys
Config.GarageKeysCommand = 'garagekeys' -- command to call garagekeys UI
-- /garagekeys -- to give
-- /garagekeys manage -- to open shared garage

-- Vehicle Keys --
Config.VehicleKeysCommand = 'vehiclekeys' -- command to call vehiclekeys ui
Config.EnableKeySystem = true -- Main Key System Config, if this is disable , a lot of feature of lock and hotwire will not work
Config.LockAllLocalVehicle = true -- lock all vehicles in area if not unlocked state (This are not looped, its being locked only when you Press F) (if you are using F Keybind in other script, this might not work properly) ex. in renzu_hud, F is being used, you may need to disable it there.
Config.LockParkedLocalVehiclesOnly = true -- if this is true and Config.LockAllLocalVehicle is true, its useless, this is useful if Config.LockAllLocalVehicle is false and this is true
Config.EnableLockpick = true -- enable lock pick item and command function
Config.EnableDuplicateKeys = true -- Carlock Purpose and to bypass hotwired
Config.GiveKeystoMissionEntity = true -- important if you dont want to hotwire mission vehicle, eg. trucker, taxi, delivery vehicles. (this will give car lock too)
Config.RequestDuplicateCoord = {
    = vec3(218.74,-811.37,30.65), --x , y, z -- where the player can request duplicate keys
}
Config.RemoveKeys = true -- remove keys upon storing vehicle
--Hotwire
Config.EnableHotwire = true -- enable hotwire if keys is not present in state
Config.HotwireLevel = 5 -- how many pins to complete (renzu_lockgame) https://github.com/renzuzu/renzu_lockgame
-- Lockpick
Config.EnableLockpickCommand = true -- enable / disable command
Config.LockpickCommand = 'lockpick' -- command name
Config.LockpickItem = 'lockpick' -- itemname -- makesure you register this
Config.LockpickLevel = 3 -- how many pins to complete
-- Fail Alert
Config.EnableAlert = true
Config.AlertJob = 'police'
Config.FailAlert = function() -- linden outlaw alert are preconfigured (please correct this , i might be wrong) https://github.com/thelindat/linden_outlawalert
    local data = {displayCode = '211', description = 'Carjacking', isImportant = 0, recipientList = {Config.AlertJob}, length = '10000', infoM = 'fa-info-circle', info = 'Ongoing Carnapping'}
    local dispatchData = {dispatchData = data, caller = 'Alarm', coords = GetEntityCoords(PlayerPedId())}
    TriggerServerEvent('wf-alerts:svNotify', dispatchData)
    print("SENT ALERT")
end

-- Carlock
Config.CarlockKey = 'J' -- Keyboard (changable in keybinds FIVEM setting)

-- Variables
Message = Locale

-- NOTIFY
Config.Renzu_notify = true -- if false we will use default framework notification
Config.Notify = function(type,msg,xPlayer)
    if Config.Oxlib and not IsDuplicityVersion() then
      if type == 'info' then type = 'inform' end -- nice logic
      lib.notify({
            title = 'Garage',
            description = msg,
            status = type
      })
    elseif Config.Oxlib and IsDuplicityVersion() then
      TriggerClientEvent('renzu_garage:notify', xPlayer.source, type, msg)
    elseif Config.Renzu_notify and not IsDuplicityVersion() then
      TriggerEvent('renzu_notify:Notify', type,Message, msg)
    elseif Config.Renzu_notify and IsDuplicityVersion() then
      TriggerClientEvent('renzu_notify:Notify', xPlayer.source, type,Message, msg)
    elseif not Config.Renzu_notify and not IsDuplicityVersion() then
      ShowNotification(msg)
    elseif not Config.Renzu_notify and xPlayer then
      xPlayer.showNotification(msg)
    end
end

if not IsDuplicityVersion() then
    if GetResourceState('ox_lib') ~= 'started' then
      cache = {}
    end
    ESX = nil
    QBCore = nil
    fetchdone = false
    PlayerData = {}
    playerLoaded = false
    TriggerServerCallback_ = nil
    vehicletable = 'owned_vehicles'
    vehiclemod = 'vehicle'
    owner = 'owner'
    stored = 'stored'
    garage__id = 'garage_id'
    type_ = 'type'
    Zones = {}
    cancel = false
    LastVehicleFromGarage = nil garageid = 'A' inGarage = false ingarage = false garage_coords = {} shell = nil ESX = nil fetchdone = false PlayerData = {} playerLoaded = false canpark = false spawned_cars = {} vtype = 'car' vehiclesdb = {} tid = 0 propertygarage = false parkmeter = {} jobgarages = {} coordcache = {} propertyspawn = {} lastcat = nil deleting = false housingcustom = nil garage_public = false shell = nil i = 0 vehtable = {} garage_id = 'A' meter_cars = {} inshell = false patrolcars = {} cat = nil OwnedVehicles = {} VTable = {} owned_veh = {} neargarage = false markers = {} drawsleep = 1 drawtext = false indist = false jobgarage = false garagejob = nil ispolice = false vhealth = 1000 myoldcoords = nil spawnedgarage = {} shell = nil i = 0 vehtable = {} garage_id = 'A' min = 0 max = 10 plus = 0 countspawn = 0 opened = false newprop = nil object = nil insidegarage = true private_garages = {} activeshare = nil currentprivate = nil carrymode = false carrymod = false tostore = {} vehicleinarea = {} impoundata = nil parkedvehicles = {} vehiclekeysdata = nil entering = false garagekeysdata = nil
end

ChatGPT 发表于 2024-8-12 19:37:14

Config = {}
Config.Locale = "zh" -- en,es,de 或任何支持的语言
--框架
Config.framework = 'ESX' -- ESX, QBCORE
Config.target = true -- 与车库交互时使用 ox_target,qb-target 与 NPC。
--一般设置
Config.Mysql = 'oxmysql' -- "ghmattisql", "mysql-async", "oxmysql"
Config.VehicleShopCoord = {
   = vec3(-35.65,-1095.9,26.4), --x , y, z
   = vec3(-1232.23,-349.45,37.32), --x , y, z
} -- 当前车辆商店的 x,y,z 坐标
Config.use_RenzuCustoms = false -- 使用 renzu_customs 获取和设置车辆属性
Config.ReturnDamage = true -- 从车库恢复车辆时返回可视损坏
Config.RefreshOwnedVehiclesOnStart = true -- 在服务器启动时刷新车辆存储状态(返回任何丢失的车辆)
Config.ReturnPayment = 1000 -- 如果车辆不在车库中要支付的金额
Config.floatingtext = true -- 使用原生浮动文本和标记与车库交互(popui 和 floatingtext 必须是相反的设置)(如果这是真的,popui 必须为假)
Config.UsePopUI = false -- 创建一个线程检查玩家坐标并使用 POPUI 触发事件,如果使用 rayzone,请将此设置为 false。Popui 原本内置于 RayZone -- 下载 https://github.com/renzuzu/renzu_popui
Config.Quickpick = true -- 如果为 false,系统将创建一个车库外壳并生成您预览的每辆车
Config.UniqueCarperGarage = false -- 如果为 false,则所有车库位置都显示所有车辆!否则,如果为 true,Garage A 中保存的车辆不能从 Garage B 拿出,例如。
Config.GarageKeys = true -- 允许玩家给公共车库钥匙以启用车辆共享
-- 标记 --
Config.BlipNamesStatic = true -- 如果 true,地图上不再显示车库 A 和车库 B 的标记名称,只显示车库
--一般设置

-- 车辆图片
Config.use_renzu_vehthumb = true

Config.Oxlib = true -- ox_lib https://github.com/overextended/ox_lib,用于菜单、上下文菜单通知等。如果禁用,将使用 renzu_notify 和 renzu_contextmenu
Config.Ox_Inventory = true -- ox_inventory 用于车辆钥匙作为物品 https://github.com/overextended/ox_inventory 如果启用,vehiclekeys 命令将被禁用,因为车辆共享现在基于物品
-- OX INV 和 ox lib 是此资源的测试版。请根据自己的判断使用,默认情况下启用。
-- 每次从车库获取车辆时,您将收到一个物品钥匙。
-- 每次存储车辆(仅公共和私人)物品钥匙将被移除。
-- 物品在没有检查插槽是否已满的情况下添加。
-- 该物品适用于其他玩家。可以使用钥匙锁、停车(真正的停车和停车计)、存放车辆、取回车辆。
Config.Renzu_jobs = false -- 职业业务扣押(目前仅限扣押)
Config.EnableImpound = true -- 启用/禁用扣押
Config.EnableHeliGarage = true -- 启用/禁用直升机仓库
Config.PlateSpace = true -- 启用/禁用车牌空间(与 esx 1.1 兼容?)
Config.Realistic_Parking = true
Config.ParkButton = 45 -- R
Config.EnableReturnVehicle = true -- 启用/禁用返回车辆功能
Config.DefaultPlate = 'ROLEPLAY' -- 默认使用的车牌

-- 标记
Config.UseMarker = true -- 绘制标记
Config.MarkerDistance = 20 -- 绘制标记的距离
--标记

-- 物业/住房车库
Config.EnablePropertyCoordGarageCoord = false-- 如果将使用自定义导出和事件,则设置为 false
Config.HousingBlips = false
-- TriggerEvent('renzu_garage:property',"Forum Drive 11/Apt13", vector3(-1053.82, -933.09, 3.36)) -- 示例手动触发
Config.PropertyQuickPick = true -- 快速选择 -- 废弃方法 1.72
Config.UniqueProperty = true -- 如果启用,仅在此物业 ID 中存储的车辆将显示 -- 废弃 1.72
Config.PrivateHousingGarageEnable = true -- 将使用 IPL 车库,小型、中型、大型(与私人车库相同)如果为 false,则将使用正常车库功能,像公共车库、快速选择菜单

-- 停车计(正在进行中)
Config.ParkingMeter = true -- 使用配置停车道具并在附近停车
Config.ParkingAnywhere = true -- 如果为 true,ParkingMeter 属性功能将被替换
-- ParkingAnywhere 就像真实的停车,但通过使用 /park 命令或 /parkingmeter
-- 您可以使用 /park 在任何地方停车
Config.MeterProp = {
   = 'prop_parknmeter_01',
   = 'prop_parknmeter_02',
}
Config.MeterPayment = 5000

-- 功能 1.71,许多函数在这里使用 One Sync 状态袋,必须启用 One Sync

-- 车库钥匙
Config.GarageKeysCommand = 'garagekeys' -- 调用车库钥匙 UI 的命令
-- /garagekeys -- 给与
-- /garagekeys manage -- 打开共享车库

-- 车辆钥匙 --
Config.VehicleKeysCommand = 'vehiclekeys' -- 调用车辆钥匙 UI 的命令
Config.EnableKeySystem = true -- 主钥匙系统配置,禁用后,许多锁定和热接功能将无法使用
Config.LockAllLocalVehicle = true -- 如果未解锁状态,则锁定区域内的所有车辆(这不是循环的,仅在您按 F 时锁定)(如果您在其他脚本中使用 F 键绑定,这可能无法正常工作),例如,在 renzu_hud 中,F 被使用,您可能需要在那里禁用它。
Config.LockParkedLocalVehiclesOnly = true -- 如果为 true 且 Config.LockAllLocalVehicle 为 true,则无用,如果 Config.LockAllLocalVehicle 为 false 且此为 true,则有用
Config.EnableLockpick = true -- 启用撬锁物品和命令功能
Config.EnableDuplicateKeys = true -- 汽车锁用途和绕过热接
Config.GiveKeystoMissionEntity = true -- 重要,如果不想热接任务车辆,例如货车、出租车、送货车辆。(这也会给汽车锁)
Config.RequestDuplicateCoord = {
   = vec3(218.74,-811.37,30.65), --x , y, z -- 玩家可以请求复制钥匙的位置
}
Config.RemoveKeys = true -- 存放车辆时移除钥匙
--热接
Config.EnableHotwire = true -- 如果钥匙不在状态中,启用热接
Config.HotwireLevel = 5 -- 完成所需的引脚数量(renzu_lockgame)https://github.com/renzuzu/renzu_lockgame
-- 撬锁
Config.EnableLockpickCommand = true -- 启用/禁用命令
Config.LockpickCommand = 'lockpick' -- 命令名称
Config.LockpickItem = 'lockpick' -- 物品名称 -- 确保您注册了这个
Config.LockpickLevel = 3 -- 完成所需的引脚数量
-- 失败警报
Config.EnableAlert = true
Config.AlertJob = 'police'
Config.FailAlert = function() -- linden outlaw alert 已预配置(请纠正此错误,我可能错了) https://github.com/thelindat/linden_outlawalert
    local data = {displayCode = '211', description = '汽车盗窃', isImportant = 0, recipientList = {Config.AlertJob}, length = '10000', infoM = 'fa-info-circle', info = '正在进行的车辆盗窃'}
    local dispatchData = {dispatchData = data, caller = '警报', coords = GetEntityCoords(PlayerPedId())}
    TriggerServerEvent('wf-alerts:svNotify', dispatchData)
    print("已发送警报")
end

-- 车锁
Config.CarlockKey = 'J' -- 键盘(可以在 keybinds FIVEM 设置中更改)

-- 变量
Message = Locale

-- 通知
Config.Renzu_notify = true -- 如果为 false,我们将使用默认框架通知
Config.Notify = function(type,msg,xPlayer)
    if Config.Oxlib and not IsDuplicityVersion() then
      if type == 'info' then type = 'inform' end -- 很好的逻辑
      lib.notify({
            title = '车库',
            description = msg,
            status = type
      })
    elseif Config.Oxlib and IsDuplicityVersion() then
      TriggerClientEvent('renzu_garage:notify', xPlayer.source, type, msg)
    elseif Config.Renzu_notify and not IsDuplicityVersion() then
      TriggerEvent('renzu_notify:Notify', type,Message, msg)
    elseif Config.Renzu_notify and IsDuplicityVersion() then
      TriggerClientEvent('renzu_notify:Notify', xPlayer.source, type,Message, msg)
    elseif not Config.Renzu_notify and not IsDuplicityVersion() then
      ShowNotification(msg)
    elseif not Config.Renzu_notify and xPlayer then
      xPlayer.showNotification(msg)
    end
end

if not IsDuplicityVersion() then
    if GetResourceState('ox_lib') ~= 'started' then
      cache = {}
    end
    ESX = nil
    QBCore = nil
    fetchdone = false
    PlayerData = {}
    playerLoaded = false
    TriggerServerCallback_ = nil
    vehicletable = 'owned_vehicles'
    vehiclemod = 'vehicle'
    owner = 'owner'
    stored = 'stored'
    garage__id = 'garage_id'
    type_ = 'type'
    Zones = {}
    cancel = false
    LastVehicleFromGarage = nil garageid = 'A' inGarage = false ingarage = false garage_coords = {} shell = nil ESX = nil fetchdone = false PlayerData = {} playerLoaded = false canpark = false spawned_cars = {} vtype = 'car' vehiclesdb = {} tid = 0 propertygarage = false parkmeter = {} jobgarages = {} coordcache = {} propertyspawn = {} lastcat = nil deleting = false housingcustom = nil garage_public = false shell = nil i = 0 vehtable = {} garage_id = 'A' meter_cars = {} inshell = false patrolcars = {} cat = nil OwnedVehicles = {} VTable = {} owned_veh = {} neargarage = false markers = {} drawsleep = 1 drawtext = false indist = false jobgarage = false garagejob = nil ispolice = false vhealth = 1000 myoldcoords = nil spawnedgarage = {} shell = nil i = 0 vehtable = {} garage_id = 'A' min = 0 max = 10 plus = 0 countspawn = 0 opened = false newprop = nil object = nil insidegarage = true private_garages = {} activeshare = nil currentprivate = nil carrymode = false carrymod = false tostore = {} vehicleinarea = {} impoundata = nil parkedvehicles = {} vehiclekeysdata = nil entering = false garagekeysdata = nil
end
页: [1]
查看完整版本: h