--[[
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',
}
}
},
}
|