Full View config.installationparts.lua

Preview File Updated: v2.0.0 - 20.04.2024

-- @UseHelpUI: For advanced part installation which can prompt the player what they need to do now
Config.UseHelpUI = true

-- @DisableAbilityToRunWithParts - Is the player to be blocked from running with parts in hand?
Config.DisableAbilityToRunWithParts = true

-- @UseManualPartInstallation: Do you want the player to have to manually install each part separately to give the tuning process realism
Config.UseManualPartInstallation = true

-- @UseTargetForPartInstallation: Do you want to use target system for part installation
Config.UseTargetForPartInstallation = false

-- @TeleportToVehicleAfterInstallForMS: Is the player to be teleported to the vehicle for a millisecond, it will not be practically visible and the newly installed part in each player will synchronize
Config.TeleportToVehicleAfterInstallForMS = true

-- @TeleportToVehicleAfterFullInstallation: Is the mechanic to be transported to the vehicle after the installation of all parts is completed so that all Vehicle Properties are loaded 
Config.TeleportToVehicleAfterFullInstallation = true

-- @InstallationPartsPoints: Points for workshops to find purchased parts for the installation
Config.InstallationPartsPoints = {
    ['BennyS'] = {
        ['clean'] = vector3(-227.83, -1327.94, 29.89 + 1.0),
        ['repair'] = vector3(-227.83, -1327.94, 29.89 + 1.0),

        ['color1'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['color2'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['pearlescentColor'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['wheelColor'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['plateIndex'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['neonColor'] = vector3(-200.83, -1318.38, 30.09 + 1.0),

        [0] = vector3(-195.9, -1315.47, 30.09 + 1.0), -- Spoilers
        [1] = vector3(-195.9, -1315.47, 30.09 + 1.0), -- Front Bumper
        [2] = vector3(-195.9, -1315.47, 30.09 + 1.0), -- Rear Bumper
        [4] = vector3(-198.43, -1315.29, 30.09 + 1.0), -- Exhaust
        [7] = vector3(-195.9, -1315.47, 30.09 + 1.0), -- Hood

        [11] = vector3(-196.37, -1317.22, 30.09 + 1.0), -- Engine
        [12] = vector3(-196.42, -1315.07, 30.09 + 1.0), -- Brakes
        [13] = vector3(-196.42, -1315.07, 30.09 + 1.0), -- Transmission
        [15] = vector3(-196.42, -1315.07, 30.09 + 1.0), -- Suspension
        ['engineSwap'] = vector3(-196.37, -1317.22, 30.09 + 1.0), -- Engine
        [23] = vector3(-206.03, -1331.13, 29.91 + 1.0), -- Wheels
    },

    ['BennyS-Paintshop'] = {
        ['color1'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['color2'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['pearlescentColor'] = vector3(-200.83, -1318.38, 30.09 + 1.0),
        ['clean'] = vector3(-227.83, -1327.94, 29.89 + 1.0),
    },

    ...
    
}

-- @UseAdvancedEngineInstallation: Advanced engine installation with engine on stand
Config.UseAdvancedEngineInstallation = true

-- @UseAdvancedBrakesInstallation: Advanced brakes installation with jacks
Config.UseAdvancedBrakesInstallation = true

-- @UseAdvancedTransmissionInstallation: Advanced transmission installation with jacks
Config.UseAdvancedTransmissionInstallation = true

-- @UseAdvancedSuspensionInstallation: Advanced suspension installation with jacks
Config.UseAdvancedSuspensionInstallation = true

-- @UseAdvancedEngineSwapInstallation: Advanced engine swap installation with engine on stand
Config.UseAdvancedEngineSwapInstallation = true

-- @UseAdvancedWheelsInstallation: Advanced installation of each wheel separately 
Config.UseAdvancedWheelsInstallation = true


Config.ClassesOfVehiclesWithAdvancedInstallations = {
    [0] = true, -- Compacts
    [1] = true, -- Sedans
    [2] = true, -- SUVs
    [3] = true, -- Coupes
    [4] = true, -- Muscle
    [5] = true, -- Sports Classics
    [6] = true, -- Sports
    [7] = true, -- Super
    [8] = false, -- Motorcycles
    [9] = true, -- Off-road
    [10] = false, -- Industrial
    [11] = false, -- Utility
    [12] = true, -- Vans
    [13] = false, -- Cycles
    [14] = false, -- Boats
    [15] = false, -- Helicopters
    [16] = false, -- Planes
    [17] = false, -- Service
    [18] = true, -- Emergency
    [19] = false, -- Military
    [20] = true, -- Commercial
    [21] = false, -- Trains
    [22] = false, -- Open Wheel
}

Config.AdvancedInstallationsProps = {
    [11] = {
        helpUI = {
            getStand = "Take the engine on a stand.",
            installEngine = "Install the engine.",
        },
        standHash = joaat("prop_engine_hoist"),
        standOffset = {-0.085, 0.24, -1.3, 10.0, 30.0, 100.0},
        standBone = 57005,
        standAnimation = {"missfinale_c2ig_11", "pushcar_offcliff_m"},
        
        partHash = joaat("prop_car_engine_01"),
        partOffsetToStand = {-0.1, -1.6, 1.4, 0.0, 0.0, 0.0},

        installationPointDirection = 'front',
        installationOffset = vec(0.0, 0.2, 0.2),
        installationPointDirectionBackEngine = 'rear',
        installationOffsetBackEngine = vec(0.0, -0.2, 0.2),
        installationAnimation = {"mini@repair", "fixing_a_ped"},
        installationTime = 4000,
        openDoors = {4},
    },
    [12] = {
        helpUI = {
            getStand = "Take the jacks.",
            installStand = "Place the jacks under vehicle.",
            installPart = "Tune the brakes.",
        },
        standHash = joaat("xs_prop_x18_axel_stand_01a"),
        standBone = 28422,
        standOffset = {0.07, -0.44, -0.1, -80.0, 20.0, 0.0},
        standBone2 = 60309,
        standOffset2 = {0.0, -0.44, 0.275, -120.0, -20.0, 0.0},
        standAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        time = 3000,
        standInstallationPointDirection = 'front-left',
        standInstallationOffset = vec(0.1, -2.0, 0.2),
        standInstallationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        
        installation = {
            [1] = {
                pointDirection = "rear",
                offset = vec(0.4, 0.1, 0.2),
                animation = {"amb@world_human_vehicle_mechanic@male@base", "base"},
                time = 6000,
                pedDirection = 'front',
            },
            [2] = {
                pointDirection = "front",
                offset = vec(0.0, -0.1, 0.2),
                animation = {"amb@world_human_vehicle_mechanic@male@base", "base"},
                time = 6000,
                pedDirection = 'rear',
            },
        },
    },
    [13] = {
        helpUI = {
            getStand = "Take the jacks.",
            installStand = "Place the jacks under vehicle.",
            installPart = "Tune the transmission.",
        },
        standHash = joaat("xs_prop_x18_axel_stand_01a"),
        standBone = 28422,
        standOffset = {0.07, -0.44, -0.1, -80.0, 20.0, 0.0},
        standBone2 = 60309,
        standOffset2 = {0.0, -0.44, 0.275, -120.0, -20.0, 0.0},
        standAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        time = 3000,
        
        standInstallationPointDirection = 'front-left',
        standInstallationOffset = vec(0.1, -2.0, 0.2),
        standInstallationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        
        installation = {
            [1] = {
                pointDirection = "front",
                offset = vec(0.0, -0.1, 0.2),
                animation = {"amb@world_human_vehicle_mechanic@male@base", "base"},
                time = 6000,
                pedDirection = 'rear',
            },
        },
    },
    [15] = {
        helpUI = {
            getStand = "Take the jacks.",
            installStand = "Place the jacks under vehicle.",
            installPart = "Tune the suspension.",
        },
        standHash = joaat("xs_prop_x18_axel_stand_01a"),
        standBone = 28422,
        standOffset = {0.07, -0.44, -0.1, -80.0, 20.0, 0.0},
        standBone2 = 60309,
        standOffset2 = {0.0, -0.44, 0.275, -120.0, -20.0, 0.0},
        standAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        time = 3000,

        standInstallationPointDirection = 'front-left',
        standInstallationOffset = vec(0.1, -2.0, 0.2),
        standInstallationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        
        installation = {
            [1] = {
                pointDirection = "rear",
                offset = vec(0.4, 0.1, 0.2),
                animation = {"amb@world_human_vehicle_mechanic@male@base", "base"},
                time = 6000,
                pedDirection = 'front',
            },
            [2] = {
                pointDirection = "front",
                offset = vec(0.0, -0.1, 0.2),
                animation = {"amb@world_human_vehicle_mechanic@male@base", "base"},
                time = 6000,
                pedDirection = 'rear',
            },
        },
    },
    ['engineSwap'] = {
        helpUI = {
            getStand = "Take the engine on a stand.",
            installEngine = "Install the engine.",
        },
        standHash = joaat("prop_engine_hoist"),
        standOffset = {-0.085, 0.24, -1.3, 10.0, 30.0, 100.0},
        standBone = 57005,
        standAnimation = {"missfinale_c2ig_11", "pushcar_offcliff_m"},
        
        partHash = joaat("prop_car_engine_01"),
        partOffsetToStand = {-0.1, -1.6, 1.4, 0.0, 0.0, 0.0},

        installationPointDirection = 'front',
        installationOffset = vec(0.0, 0.2, 0.2),
        installationPointDirectionBackEngine = 'rear',
        installationOffsetBackEngine = vec(0.0, -0.2, 0.2),
        installationAnimation = {"mini@repair", "fixing_a_ped"},
        installationTime = 4000,
        openDoors = {4},
    },
    [23] = {
        helpUI = {
            getStand = "Take the jacks.",
            installStand = "Place the jacks under vehicle.",
            getWheel = "Take the wheel.",
            installWheel = "Install the wheel.",
        },
        standHash = joaat("xs_prop_x18_axel_stand_01a"),
        standBone = 28422,
        standOffset = {0.07, -0.44, -0.1, -80.0, 20.0, 0.0},
        standBone2 = 60309,
        standOffset2 = {0.0, -0.44, 0.275, -120.0, -20.0, 0.0},
        standAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        time = 3000,

        standInstallationPointDirection = 'front-left',
        standInstallationOffset = vec(0.1, -2.0, 0.2),
        standInstallationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        
        hash = joaat('prop_wheel_rim_01'),
        boneAttach = 57005,
        propPlacement = {0.169, -0.018, -0.22, -90.0, -110.0, 282.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationTime = 4000,

        installation = {
            [1] = {
                bone = "wheel_lf",
                animation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
                time = 6000,
            },
            [2] = {
                bone = "wheel_lr",
                animation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
                time = 6000,
            },
            [3] = {
                bone = "wheel_rf",
                animation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
                time = 6000,
            },
            [4] = {
                bone = "wheel_rr",
                animation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
                time = 6000,
            },
            [5] = {
                bone = "wheel_lm1",
                animation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
                time = 6000,
            },
            [6] = {
                bone = "wheel_rm1",
                animation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
                time = 6000,
            },
        },
    },
}

Config.InstallationPartsPropsList = {
    -- @param installationPointDirection: 'front', 'front-left', 'front-right', 'rear', 'rear-left', 'rear-right'

    ['clean'] = {
        hash = joaat('prop_sponge_01'),
        boneAttach = 28422,
        propPlacement = {0.0, 0.0, -0.01, 90.0, 0.0, 0.0},
        installationPointDirection = 'front-left',
        installationOffset = vec(0.1, -0.75, 0.2),
        installationAnimation = {"amb@world_human_maid_clean@", "base"},
        installationTime = 4000,
    },

    ['repair'] = {
        hash = joaat("prop_tool_wrench"),
        boneAttach = 57005,
        propPlacement = {0.119, -0.072, -0.05, -90.0, 120.0, 12.0},
        installationPointDirection = 'front',
        installationOffset = vec(0.4, 0.1, 0.2),
        installationPointDirectionBackEngine = 'rear',
        installationOffsetBackEngine = vec(0.0, -0.1, 0.2),
        installationAnimation = {"mini@repair", "fixing_a_ped"},
        installationTime = 4000,
        openDoors = {4},
    },

    ['color1'] = {
        hash = joaat('prop_cs_spray_can'),
        boneAttach = 57005,
        propPlacement = {0.119, -0.072, -0.05, -90.0, 120.0, 12.0},
        installationPointDirection = 'front-left',
        installationOffset = vec(-0.4, 0.15, 0.2),
        installationAnimation = {"anim@amb@business@weed@weed_inspecting_lo_med_hi@", "weed_spraybottle_stand_spraying_01_inspector"},
        installationTime = 4000,
    },

    ['color2'] = {
        hash = joaat('prop_cs_spray_can'),
        boneAttach = 57005,
        propPlacement = {0.119, -0.072, -0.05, -90.0, 120.0, 12.0},
        installationPointDirection = 'front-right',
        installationOffset = vec(-0.4, 0.15, 0.2),
        installationAnimation = {"anim@amb@business@weed@weed_inspecting_lo_med_hi@", "weed_spraybottle_stand_spraying_01_inspector"},
        installationTime = 4000,
    },
    
    ['pearlescentColor'] = {
        hash = joaat('prop_cs_spray_can'),
        boneAttach = 57005,
        propPlacement = {0.119, -0.072, -0.05, -90.0, 120.0, 12.0},
        installationPointDirection = 'front-left',
        installationOffset = vec(-0.4, 0.15, 0.2),
        installationAnimation = {"anim@amb@business@weed@weed_inspecting_lo_med_hi@", "weed_spraybottle_stand_spraying_01_inspector"},
        installationTime = 4000,
    },

    ['wheelColor'] = {
        hash = joaat('prop_cs_spray_can'),
        boneAttach = 57005,
        propPlacement = {0.119, -0.072, -0.05, -90.0, 120.0, 12.0},
        installationPointDirection = 'front-left',
        installationOffset = vec(-0.4, 0.15, 0.2),
        installationAnimation = {"anim@amb@business@weed@weed_inspecting_lo_med_hi@", "weed_spraybottle_stand_spraying_01_inspector"},
        installationTime = 4000,
    },

    ['plateIndex'] = {
        hash = joaat('p_num_plate_01'),
        boneAttach = 57005,
        propPlacement = {0.119, -0.072, -0.05, -90.0, 120.0, 12.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationPointDirection = 'rear',
        installationOffset = vec(0.0, -0.15, 0.2),
        installationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        installationTime = 4000,
    },

    ['neonColor'] = {
        hash = joaat('xs_prop_arena_lights_tube_l_a'),
        boneAttach = 57005,
        propPlacement = {0.169, -0.018, -0.22, 90.0, -110.0, 282.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationPointDirection = 'front-left',
        installationOffset = vec(0.2, -2.25, 0.2),
        installationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        installationTime = 4000,
    },

    [0] = { -- Spoiler
        hash = joaat('imp_prop_impexp_spoiler_02a'),
        boneAttach = 57005,
        propPlacement = {0.36, 0.078, -0.195, -20.0, -110.0, 10.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationPointDirection = 'rear',
        installationOffset = vec(0.0, -0.1, 0.2),
        installationAnimation = {"mini@repair", "fixing_a_ped"},
        installationTime = 4000,
    },

    [1] = { -- Front Bumper
        hash = joaat('imp_prop_impexp_front_bumper_01a'),
        boneAttach = 57005,
        propPlacement = {0.36, 0.078, -0.195, -20.0, -110.0, 10.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationPointDirection = 'front',
        installationOffset = vec(0.0, 0.1, 0.2),
        installationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        installationTime = 4000,
    },

    [2] = { -- Rear Bumper
        hash = joaat('imp_prop_impexp_rear_bumper_02a'),
        boneAttach = 57005,
        propPlacement = {0.36, 0.078, -0.195, -20.0, -110.0, 10.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationPointDirection = 'rear',
        installationOffset = vec(0.0, -0.1, 0.2),
        installationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        installationTime = 4000,
    }, 

    [4] = { -- Exhaust
        hash = joaat('imp_prop_impexp_exhaust_06'),
        boneAttach = 57005,
        propPlacement = {-0.04, -0.03, 0.09, 200.0, 220.0, 12.0},
        installationPointDirection = 'rear',
        installationOffset = vec(0.0, -0.1, 0.2),
        installationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        installationTime = 4000,
    },

    [7] = { -- Hood
        hash = joaat('prop_car_bonnet_02'),
        boneAttach = 60309,
        propPlacement = {0.025, 0.08, 0.255, -145.0, 290.0, 0.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationPointDirection = 'front',
        installationOffset = vec(0.0, 0.1, 0.2),
        installationAnimation = {"mini@repair", "fixing_a_ped"},
        installationTime = 4000,
    },

    [23] = { -- Wheels
        hash = joaat('prop_wheel_rim_01'),
        boneAttach = 57005,
        propPlacement = {0.169, -0.018, -0.22, -90.0, -110.0, 282.0},
        animation = {"anim@heists@box_carry@", "idle"},
        installationPointDirection = 'front-left',
        installationOffset = vec(0.15, -1.65, 0.2),
        installationAnimation = {"anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer"},
        installationTime = 4000,
    },

    -- [32] = {
    --     hash = joaat('prop_ejector_seat_01'),
    --     boneAttach = 57005,
    --     propPlacement = {0.025, 0.08, 0.255, -145.0, 290.0, 0.0},
    -- }, -- Seat

    -- [39] = {
    --     hash = joaat("prop_car_engine_01"),
    --     propPlacement = {0.025, 0.08, 0.255, -145.0, 290.0, 0.0},
    -- }, -- Engine Block

}

Config.OnInstallationPart = {
    ['clean'] = function(vehicle, properties)

    end,
    ['repair'] = function(vehicle, properties)
        print('[Config.OnInstallationPart] Vehicle has been fixed.')

        -- properties['engineHealth'] = 1000.0

        if GetResourceState('VehicleDeformation') ~= 'missing' then
            exports['VehicleDeformation']:FixVehicleDeformation(vehicle)
        end
    end,
}

Last updated