搜索
开启左侧

汉化代码

[复制链接]
15604402 发表于 2025-2-27 03:34:20 | 显示全部楼层 |阅读模式

--[[
    This script sets up a construction system for a FiveM server. It allows you to create interactive construction zones with NPCs working on them.

    1. **Config.Construction**: Enables or disables the construction system.

    2. **Config.Constructions**: A table of defined construction projects. Each entry includes:
        - **duration**: Time in milliseconds for the construction to complete (e.g., 60 seconds here).
        - **model**: Temporary construction model that replaces the final model during the building phase.
        - **peds**: A list of NPCs with their models, positions, headings, and animations to simulate workers.


Config.Construction = false -- Enable constructión timer/animations?

---@type table<string, Construction>
Config.Constructions = {
    ['lf_house_04_'] = {
        duration = 10 * 60, -- 1 minute
        model = 'prop_pighouse2', -- Construction model. When construction is done it will be change with original model
        peds = {            -- Your ped offsets you can add whatever you want
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_05_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_07_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_08_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_09_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_10_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_11_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_13_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_15_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_16_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_17_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_18_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_19_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_20_'] = {
        duration = 10 * 60,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
}



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 论坛版权

使用道具 举报

ChatGPT 发表于 2025-2-27 03:34:28 | 显示全部楼层
以下是脚本的汉化版本:
-- 
-- 该脚本为FiveM服务器设置了一个建筑系统。它允许你创建互动的建筑区域,并有NPC在其上进行工作。

-- 1. **Config.Construction**: 启用或禁用建筑系统。

-- 2. **Config.Constructions**: 定义的建筑项目表。每个条目包括:
--    - **duration**: 建筑完成所需的时间(以毫秒为单位,例如,这里是60秒)。
--    - **model**: 临时建筑模型,在施工阶段替代最终模型。
--    - **peds**: NPC列表,包括它们的模型、位置、朝向和动画,以模拟工人。

Config.Construction = false -- 是否启用建筑计时器/动画?

---@type table
Config.Constructions = {
    ['lf_house_04_'] = {  -- 建筑项目ID
        duration = 10 * 60 * 1000, -- 持续时间(10分钟)
        model = 'prop_pighouse2', -- 建筑模型。完工后将更换为原始模型
        peds = { -- 工人NPC
            {
                model = 's_m_m_dockwork_01', -- NPC模型
                offsets = vec3(0.0, 0.3, 0.0), -- NPC位置偏移
                heading = 65.54, -- 朝向
                anim = 'base', -- 动画名称
                dict = 'anim@amb@office@boardroom@boss@male@', -- 动画字典
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    ['lf_house_05_'] = {
        duration = 10 * 60 * 1000,
        model = 'prop_pighouse2',
        peds = {
            {
                model = 's_m_m_dockwork_01',
                offsets = vec3(0.0, 0.3, 0.0),
                heading = 65.54,
                anim = 'base',
                dict = 'anim@amb@office@boardroom@boss@male@',
            },
            {
                model = 's_m_m_gardener_01',
                offsets = vec3(1.0, 2.0, 0.0),
                heading = 179.27,
                anim = 'idle_a',
                dict = 'amb@world_human_picnic@female@idle_a',
            }
        }
    },
    -- 其他建筑项目可以用相似的格式继续添加...
}

### 注意事项:
- 在Lua中,表的键必须放在方括号中,如 `['lf_house_04_']`。
- 持续时间单位为毫秒,因此需要将分钟转换为毫秒(`10 * 60 * 1000`)。
- 代码应放置在`server.lua`或`client.lua`中,具体取决于你的实现需求。如果是处理服务器逻辑,放在`server.lua`中;如果是与玩家交互的逻辑,放在`client.lua`中。
回复

使用道具 举报

 楼主| 15604402 发表于 2025-2-27 03:35:34 | 显示全部楼层
--[[
    Shell/IPL/MLO General Controls Configuration:

    This section allows you to configure the general controls and language settings
    when modifying or creating shells, IPL (Interior Proxy Library), or MLO (Map Loaded Object) models.

    You can adjust these controls to your preference, ensuring smooth operation when
    handling interiors and models in your server.

    Make sure to configure these settings carefully, as they will determine how you
    interact with and customize interiors within the game.
]]

ActionControls = {
        forward = {
                label = 'Forward +/-',
                codes = { 33, 32 }
        },
        right = {
                label = 'Right +/-',
                codes = { 35, 34 }
        },
        up = {
                label = 'Up +/-',
                codes = { 52, 51 }
        },
        add_point = {
                label = 'Add Point',
                codes = { 24 }
        },
        set_any = {
                label = 'Set',
                codes = { 24 }
        },
        undo_point = {
                label = 'Undo Last',
                codes = { 25 }
        },
        set_position = {
                label = 'Set Position',
                codes = { 24 }
        },
        add_garage = {
                label = 'Add Garage',
                codes = { 24 }
        },
        rotate_z = {
                label = 'RotateZ +/-',
                codes = { 20, 73 }
        },
        rotate_z_scroll = {
                label = 'RotateZ +/-',
                codes = { 17, 16 }
        },
        increase_z = {
                label = 'Z Boundary +/-',
                codes = { 180, 181 }
        },
        decrease_z = {
                label = 'Z Boundary +/-',
                codes = { 21, 180, 181 }
        },
        done = {
                label = 'Done',
                codes = { 191 }
        },
        change_player = {
                label = 'Player +/-',
                codes = { 82, 81 }
        },
        change_shell = {
                label = 'Change Shell +/-',
                codes = { 189, 190 }
        },
        select_player = {
                label = 'Select Player',
                codes = { 191 }
        },
        cancel = {
                label = 'Cancel',
                codes = { 194 }
        },
        change_outfit = {
                label = 'Outfit +/-',
                codes = { 82, 81 }
        },
        delete_outfit = {
                label = 'Delete Outfit',
                codes = { 178 }
        },
        select_vehicle = {
                label = 'Vehicle +/-',
                codes = { 82, 81 }
        },
        spawn_vehicle = {
                label = 'Spawn Vehicle',
                codes = { 191 }
        },
        leftApt = {
                label = 'Previous Apartment',
                codes = { 174 }
        },
        rightApt = {
                label = 'Next Apartment',
                codes = { 175 }
        },
        testPos = {
                label = 'Test Pos',
                codes = { 47 }
        },
}

Config.DynamicDoors = true                 -- Enable dynamic doors? needs `setr game_enableDynamicDoorCreation "true"`
Config.CreditToggleActiveInDefault = false -- Enable credit toggle active in default

CameraOptions = {
        lookSpeedX = 500.0,
        lookSpeedY = 500.0,
        moveSpeed = 10.0,
        climbSpeed = 10.0,
        rotateSpeed = 50.0,
}
[发帖际遇]: 一个袋子砸在了 15604402 头上,15604402 赚了 15 贡献. 幸运榜 / 衰神榜
回复

使用道具 举报

ChatGPT 发表于 2025-2-27 03:35:43 | 显示全部楼层
15604402 发表于 2025-02-27 03:35
--]

ActionControls = {
        forward = {
                label = 'Fo ...


以下是代码的汉化版本:
--[[
    此脚本定义了用于控制动作的按键配置,并包含摄像机选项和动态门的配置。
]]

ActionControls = {
    forward = {
        label = '前进 +/-',  -- 前进操作的标签
        codes = { 33, 32 }   -- 前进对应的按键代码
    },
    right = {
        label = '右转 +/-',
        codes = { 35, 34 }
    },
    up = {
        label = '向上 +/-',
        codes = { 52, 51 }
    },
    add_point = {
        label = '添加点',
        codes = { 24 }
    },
    set_any = {
        label = '设置',
        codes = { 24 }
    },
    undo_point = {
        label = '撤销最后',
        codes = { 25 }
    },
    set_position = {
        label = '设置位置',
        codes = { 24 }
    },
    add_garage = {
        label = '添加车库',
        codes = { 24 }
    },
    rotate_z = {
        label = '绕Z轴旋转 +/-',
        codes = { 20, 73 }
    },
    rotate_z_scroll = {
        label = '绕Z轴滚动 +/-',
        codes = { 17, 16 }
    },
    increase_z = {
        label = 'Z边界 +/-',
        codes = { 180, 181 }
    },
    decrease_z = {
        label = 'Z边界 +/-',
        codes = { 21, 180, 181 }
    },
    done = {
        label = '完成',
        codes = { 191 }
    },
    change_player = {
        label = '玩家 +/-',
        codes = { 82, 81 }
    },
    change_shell = {
        label = '切换外壳 +/-',
        codes = { 189, 190 }
    },
    select_player = {
        label = '选择玩家',
        codes = { 191 }
    },
    cancel = {
        label = '取消',
        codes = { 194 }
    },
    change_outfit = {
        label = '服装 +/-',
        codes = { 82, 81 }
    },
    delete_outfit = {
        label = '删除服装',
        codes = { 178 }
    },
    select_vehicle = {
        label = '车辆 +/-',
        codes = { 82, 81 }
    },
    spawn_vehicle = {
        label = '生成车辆',
        codes = { 191 }
    },
    leftApt = {
        label = '上一个公寓',
        codes = { 174 }
    },
    rightApt = {
        label = '下一个公寓',
        codes = { 175 }
    },
    testPos = {
        label = '测试位置',
        codes = { 47 }
    },
}

Config.DynamicDoors = true                 -- 是否启用动态门?需要 `setr game_enableDynamicDoorCreation "true"`
Config.CreditToggleActiveInDefault = false -- 默认情况下是否启用信用切换

CameraOptions = {
    lookSpeedX = 500.0,  -- 摄像机在X轴上的旋转速度
    lookSpeedY = 500.0,  -- 摄像机在Y轴上的旋转速度
    moveSpeed = 10.0,    -- 摄像机移动速度
    climbSpeed = 10.0,   -- 爬升速度
    rotateSpeed = 50.0,  -- 旋转速度
}

### 注意事项:
- 请根据你的需要将代码部分放置于 `client.lua` 或 `server.lua` 中。通常,UI和玩家交互相关的功能应放在 `client.lua` 中。
回复

使用道具 举报

 楼主| 15604402 发表于 2025-2-27 03:39:02 | 显示全部楼层
--[[
    Custom House Creation Configuration:

    This section allows you to manually create custom houses directly through the configuration
    files without using the in-game creation system. This option is more complex and is recommended
    only for experienced developers who are familiar with server-side modifications.

    If you are not an experienced developer, we strongly advise using the in-game F7 menu
    and the appropriate job role for creating and managing houses.

    Manual configuration should only be done if you understand the process well to avoid issues.
]]

CreatingHouse = {}

Config.Houses = {
        --         ['Test House'] = {
        --                 owned = 0,
        --                 price = 0,
        --                 locked = true,
        --                 address = 'Nikola p1',
        --                 tier = 1,
        --                 coords = {
        --                         enter = {
        --                                 ['z'] = 71.46570587158203,
        --                                 ['h'] = 311.8609924316406,
        --                                 ['x'] = 1303.005859375,
        --                                 ['y'] = -527.4683837890625
        --                         },
        --                         PolyZone = {
        --                                 thickness = 25.0,
        --                                 usePolyZone = true,
        --                                 points = { {
        --                                         ['x'] = 1303.5743408203125,
        --                                         ['y'] = -500.41802978515625,
        --                                         ['z'] = 71.0
        --                                 }, {
        --                                         ['x'] = 1293.0418701171875,
        --                                         ['y'] = -537.6560668945312,
        --                                         ['z'] = 71.0
        --                                 }, {
        --                                         ['x'] = 1311.5504150390625,
        --                                         ['y'] = -544.9464721679688,
        --                                         ['z'] = 71.0
        --                                 }, {
        --                                         ['x'] = 1327.7315673828125,
        --                                         ['y'] = -498.835205078125,
        --                                         ['z'] = 71.0
        --                                 } }
        --                         },
        --                         cam = {
        --                                 ['h'] = 311.8609924316406,
        --                                 ['y'] = -527.4683837890625,
        --                                 ['z'] = 71.46570587158203,
        --                                 yaw = -10.0,
        --                                 ['x'] = 1303.005859375
        --                         },
        --                         exit = {
        --                                 ['z'] = 27.56341361999511,
        --                                 ['h'] = 246.86099243164062,
        --                                 ['x'] = 1264.6019287109375,
        --                                 ['y'] = -545.8494262695312
        --                         },
        --                         interiorCoords = {
        --                                 ['x'] = 1266.744384765625,
        --                                 ['y'] = -544.3600463867188,
        --                                 ['z'] = 26.55422592163086,
        --                                 ['w'] = 311.8609924316406
        --                         },
        --                         shellCoords = {
        --                                 ['z'] = 26.55422592163086,
        --                                 ['h'] = 311.8609924316406,
        --                                 ['x'] = 1266.744384765625,
        --                                 ['y'] = -544.3600463867188
        --                         }
        --                 },
        --                 garage = {
        --                         max = 4, -- Maximum spawn point [max slot]
        --                         access = {},
        --                         slots = {
        --                                 [1] = { -- Spawn Points
        --                                         x = -125.64788055419922,
        --                                         y = -1297.646728515625,
        --                                         z = 29.44520378112793,
        --                                         h = 93.55599975585938,
        --                                 },
        --                         },
        --                         coords = {
        --                                 -- Garage location
        --                                 x = -228.8,
        --                                 y = -990.41,
        --                                 z = 29.34,
        --                                 h = 267.02,
        --                         }
        --                 },
        --         }
}

--[[
    Free Mode Keys Configuration:

    This configuration defines the key bindings for Free Mode, allowing users
    to move, rotate, and manipulate objects within the environment. These keys
    are mapped to specific functions to provide intuitive controls for object
    placement and adjustments.

    Each key binding corresponds to a particular action, such as increasing
    speed, moving objects in specific directions, or rotating them for fine-tuning.
    These bindings are essential for achieving precise placement and control
    over objects in the environment.

    Customizable Key Bindings:
    - ChangeKey: Switches between different movement modes.
    - Speed Adjustment: Controls the movement speed of objects.
    - Directional Movement: Moves objects along the X, Y, and Z axes.
    - Rotation: Rotates objects around their axes.
    - Tilt: Tilts objects for angled adjustments.
    - Stick to Ground: Aligns objects to the ground level.

    Developers or server administrators can customize these keys to match their
    preferences or to integrate seamlessly with other controls in their resource.
]]

Keys = { ['ESC'] = 322, ['F1'] = 288, ['F2'] = 289, ['F3'] = 170, ['F5'] = 166, ['F6'] = 167, ['F7'] = 168, ['F8'] = 169, ['F9'] = 56, ['F10'] = 57, ['~'] = 243, ['1'] = 157, ['2'] = 158, ['3'] = 160, ['4'] = 164, ['5'] = 165, ['6'] = 159, ['7'] = 161, ['8'] = 162, ['9'] = 163, ['-'] = 84, ['='] = 83, ['BACKSPACE'] = 177, ['TAB'] = 37, ['Q'] = 44, ['W'] = 32, ['E'] = 38, ['R'] = 45, ['T'] = 245, ['Y'] = 246, ['U'] = 303, ['P'] = 199, ['['] = 39, [']'] = 40, ['ENTER'] = 18, ['CAPS'] = 137, ['A'] = 34, ['S'] = 8, ['D'] = 9, ['F'] = 23, ['G'] = 47, ['H'] = 74, ['K'] = 311, ['L'] = 182, ['LEFTSHIFT'] = 21, ['Z'] = 20, ['X'] = 73, ['C'] = 26, ['V'] = 0, ['B'] = 29, ['N'] = 249, ['M'] = 244, [','] = 82, ['.'] = 81, ['LEFTCTRL'] = 36, ['LEFTALT'] = 19, ['SPACE'] = 22, ['RIGHTCTRL'] = 70, ['HOME'] = 213, ['PAGEUP'] = 10, ['PAGEDOWN'] = 11, ['DELETE'] = 178, ['LEFT'] = 174, ['RIGHT'] = 175, ['TOP'] = 27, ['DOWN'] = 173, ['NENTER'] = 201, ['N4'] = 108, ['N5'] = 60, ['N6'] = 107, ['N+'] = 96, ['N-'] = 97, ['N7'] = 117, ['N8'] = 61, ['N9'] = 118 }

Config.FreeModeKeys = {
        ChangeKey = Keys['LEFTCTRL'],

        MoreSpeed = Keys['.'],
        LessSpeed = Keys[','],

        MoveToTop = Keys['TOP'],         -- Key to move the object upwards (Top Arrow)
        MoveToDown = Keys['DOWN'],       -- Key to move the object downwards (Down Arrow)

        MoveToForward = Keys['TOP'],     -- Key to move the object forward (Top Arrow)
        MoveToBack = Keys['DOWN'],       -- Key to move the object backward (Down Arrow)
        MoveToRight = Keys['RIGHT'],     -- Key to move the object to the right (Right Arrow)
        MoveToLeft = Keys['LEFT'],       -- Key to move the object to the left (Left Arrow)

        RotateToTop = Keys['6'],         -- Key to rotate the object to the top (Number 6)
        RotateToDown = Keys['7'],        -- Key to rotate the object downwards (Number 7)
        RotateToLeft = Keys['8'],        -- Key to rotate the object to the left (Number 8)
        RotateToRight = Keys['9'],       -- Key to rotate the object to the right (Number 9)

        TiltToTop = Keys['Z'],           -- Key to tilt the object to the top
        TiltToDown = Keys['X'],          -- Key to tilt the object downwards
        TiltToLeft = Keys['C'],          -- Key to tilt the object to the left
        TiltToRight = Keys['V'],         -- Key to tilt the object to the right

        StickToTheGround = Keys['LEFTALT'], -- Key to stick the object to the ground (Left Alt)
}

--[[
    Debug Mode:

    This mode is designed to provide constant feedback and print information
    from the system, which can be helpful for developers to understand how
    the resource operates.

    We do not recommend enabling debug mode unless you are a developer,
    as it will flood your console with information, but it can be valuable
    for troubleshooting and understanding the inner workings of the system.
]]

Config.Debug = true      -- Enable or disable debug mode for general information and troubleshooting.
Config.ZoneDebug = false -- Enable or disable debug mode for zone-related actions and details.
[发帖际遇]: 15604402 捡了钱没交公 贡献 降了 23 . 幸运榜 / 衰神榜
回复

使用道具 举报

ChatGPT 发表于 2025-2-27 03:39:30 | 显示全部楼层
15604402 发表于 2025-02-27 03:39
--]

CreatingHouse = {}

Config.Houses = {
        --          = ...


以下是代码的汉化版本:
--[] 

CreatingHouse = {}

Config.Houses = {
    --     = {
    --         owned = 0,          -- 拥有者数量
    --         price = 0,         -- 房屋价格
    --         locked = true,     -- 是否锁定
    --         address = 'Nikola p1', -- 地址
    --         tier = 1,          -- 房屋等级
    --         coords = {        -- 坐标设置
    --             enter = {
    --                 x = 71.46570587158203,
    --                 y = 311.8609924316406,
    --                 z = 1303.005859375,
    --                 heading = -527.4683837890625
    --             },
    --             PolyZone = {
    --                 thickness = 25.0,
    --                 usePolyZone = true,  -- 是否使用多边形区域
    --                 points = {
    --                     {
    --                         x = 1303.5743408203125,
    --                         y = -500.41802978515625,
    --                         z = 71.0
    --                     }, 
    --                     {
    --                         x = 1293.0418701171875,
    --                         y = -537.6560668945312,
    --                         z = 71.0
    --                     }, 
    --                     {
    --                         x = 1311.5504150390625,
    --                         y = -544.9464721679688,
    --                         z = 71.0
    --                     }, 
    --                     {
    --                         x = 1327.7315673828125,
    --                         y = -498.835205078125,
    --                         z = 71.0
    --                     }
    --                 }
    --             },
    --             cam = {
    --                 x = 311.8609924316406,
    --                 y = -527.4683837890625,
    --                 z = 71.46570587158203,
    --                 yaw = -10.0,
    --                 heading = 1303.005859375
    --             },
    --             exit = {
    --                 x = 27.56341361999511,
    --                 y = 246.86099243164062,
    --                 z = 1264.6019287109375,
    --                 heading = -545.8494262695312
    --             },
    --             interiorCoords = {
    --                 x = 1266.744384765625,
    --                 y = -544.3600463867188,
    --                 z = 26.55422592163086,
    --                 heading = 311.8609924316406
    --             },
    --             shellCoords = {
    --                 x = 26.55422592163086,
    --                 y = 311.8609924316406,
    --                 z = 1266.744384765625,
    --                 heading = -544.3600463867188
    --             }
    --         },
    --         garage = {
    --             max = 4, -- 最大生成点
    --             access = {},
    --             slots = {
    --                 { -- 生成点
    --                     x = -125.64788055419922,
    --                     y = -1297.646728515625,
    --                     z = 29.44520378112793,
    --                     h = 93.55599975585938,
    --                 },
    --             },
    --             coords = {
    --                 -- 车库位置
    --                 x = -228.8,
    --                 y = -990.41,
    --                 z = 29.34,
    --                 h = 267.02,
    --             }
    --         },
    --     }
}

--[]

Keys = {  
    [1] = 322, 
    [2] = 288, 
    [3] = 289, 
    [4] = 170, 
    [5] = 166, 
    [6] = 167, 
    [7] = 168, 
    [8] = 169, 
    [9] = 56, 
    [10] = 57, 
    [11] = 243, 
    [12] = 157, 
    [13] = 158, 
    [14] = 160, 
    [15] = 164, 
    [16] = 165, 
    [17] = 159, 
    [18] = 161, 
    [19] = 162, 
    [20] = 163, 
    [21] = 84, 
    [22] = 83, 
    [23] = 177, 
    [24] = 37, 
    [25] = 44, 
    [26] = 32, 
    [27] = 38, 
    [28] = 45, 
    [29] = 245, 
    [30] = 246, 
    [31] = 303, 
    [32] = 199, 
    ['['] = 39, 
    [']'] = 40, 
    [34] = 18, 
    [35] = 137, 
    [36] = 34, 
    [37] = 8, 
    [38] = 9, 
    [39] = 23, 
    [40] = 47, 
    [41] = 74, 
    [42] = 311, 
    [43] = 182, 
    [44] = 21, 
    [45] = 20, 
    [46] = 73, 
    [47] = 26, 
    [48] = 0, 
    [49] = 29, 
    [50] = 249, 
    [51] = 244, 
    [52] = 82, 
    [53] = 81, 
    [54] = 36, 
    [55] = 19, 
    [56] = 22, 
    [57] = 70, 
    [58] = 213, 
    [59] = 10, 
    [60] = 11, 
    [61] = 178, 
    [62] = 174, 
    [63] = 175, 
    [64] = 27, 
    [65] = 173, 
    [66] = 201, 
    [67] = 108,
    [68] = 60,
    [69] = 107,
    [70] = 96,
    [71] = 97,
    [72] = 117,
    [73] = 61,
    [74] = 118 
}

Config.FreeModeKeys = {
    ChangeKey = Keys,

    MoreSpeed = Keys,
    LessSpeed = Keys,

    MoveToTop = Keys,           -- 移动物体向上(上箭头)
    MoveToDown = Keys,         -- 移动物体向下(下箭头)

    MoveToForward = Keys,       -- 移动物体向前(上箭头)
    MoveToBack = Keys,          -- 移动物体向后(下箭头)
    MoveToRight = Keys,         -- 移动物体向右(右箭头)
    MoveToLeft = Keys,          -- 移动物体向左(左箭头)

    RotateToTop = Keys,         -- 向上旋转物体(数字键 6)
    RotateToDown = Keys,        -- 向下旋转物体(数字键 7)
    RotateToLeft = Keys,        -- 向左旋转物体(数字键 8)
    RotateToRight = Keys,       -- 向右旋转物体(数字键 9)

    TiltToTop = Keys,           -- 向上倾斜物体
    TiltToDown = Keys,          -- 向下倾斜物体
    TiltToLeft = Keys,          -- 向左倾斜物体
    TiltToRight = Keys,         -- 向右倾斜物体

    StickToTheGround = Keys,    -- 将物体粘在地面(左Alt)
}

--[]

Config.Debug = true          -- 启用或禁用调试模式以获取一般信息和故障排除。
Config.ZoneDebug = false     -- 启用或禁用与区域相关的操作和详细信息的调试模式。

### 注意事项:
- 请根据实际需求将代码放置于 `server.lua` 或 `client.lua` 中。通常,涉及到玩家和界面的逻辑应放在 `client.lua` 中。
回复

使用道具 举报

文明发言,和谐互动
文明发言,和谐互动
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|首页 ( 冀ICP备2021005225号-1 ) |网站地图

GMT+8, 2025-3-13 02:51 , Processed in 0.099148 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2013 ELITE论坛【技术无价-分享快乐】

快速回复 返回顶部 返回列表