汉化下列代码
--[[
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',
}
}
},
}
--[[
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,
}
--[[
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.
|