diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/carcols.meta b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/carcols.meta new file mode 100644 index 000000000..f3f1e418e --- /dev/null +++ b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/carcols.meta @@ -0,0 +1,756 @@ + + + + + + lgc19flatbed + + + + + + + VehicleLight_sirenlight + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/carvariations.meta b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/carvariations.meta new file mode 100644 index 000000000..cd8a24662 --- /dev/null +++ b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/carvariations.meta @@ -0,0 +1,41 @@ + + + + + + lgc19flatbed + + + + 5 + 5 + 131 + 0 + + + + + + + + + + 0_default_modkit + + + + + Standard White + + + + White Plate 2 + + + + + + + + + \ No newline at end of file diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/handling.meta b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/handling.meta new file mode 100644 index 000000000..c870a6d92 --- /dev/null +++ b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/handling.meta @@ -0,0 +1,63 @@ + + + + + + lgc19flatbed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20220048 + 0 + 20 + TRUCK + + + + + + + + \ No newline at end of file diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/vehicles.meta b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/vehicles.meta new file mode 100644 index 000000000..e4c51f6da --- /dev/null +++ b/resources/[cars]/[mechaniccars]/LGC19FLATBED/data/vehicles.meta @@ -0,0 +1,127 @@ + + + vehshare + + + + lgc19flatbed + lgc19flatbed + lgc19flatbed + lgc19flatbed + 2019 Peterbilt 337 + null + null + null + null + + null + FLATBED + LAYOUT_TRUCK + FLATBED_COVER_OFFSET_INFO + EXPLOSION_INFO_TRUCK + + DEFAULT_FOLLOW_VEHICLE_CAMERA + MID_BOX_VEHICLE_AIM_CAMERA + VEHICLE_BONNET_CAMERA_MID + DEFAULT_POV_CAMERA_LOOKAROUND_MID + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_TRUCK_RIG + + + + + + + + + + + + + + + + + + + + + + 500.000000 + 500.000000 + 500.000000 + 500.000000 + 500.000000 + 500.000000 + + + + + + + + + + + SWANKNESS_1 + + FLAG_BIG FLAG_CAN_HONK_WHEN_FLEEING FLAG_AVOID_TURNS FLAG_EXTRAS_REQUIRE FLAG_PEDS_CAN_STAND_ON_TOP FLAG_DONT_SPAWN_IN_CARGEN FLAG_USE_FAT_INTERIOR_LIGHT FLAG_IS_BULKY FLAG_BLOCK_FROM_ATTRACTOR_SCENARIO FLAG_CANNOT_TAKE_COVER_WHEN_STOOD_ON + VEHICLE_TYPE_CAR + VPT_FRONT_PLATES + VDT_CAVALCADE + VC_EMERGENCY + VWT_SPORT + + + + + S_M_M_Trucker_01 + + + + + + VEH_EXT_BONNET + + + + + + + + WHEEL_WIDE_REAR_RIGHT_CAMERA + WHEEL_WIDE_REAR_LEFT_CAMERA + + Truck + + + + + TRUCK_PHANTOM_FRONT_LEFT + TRUCK_PACKER_FRONT_RIGHT + + + + + + vehicles_cav_interior + lgc19flatbed + + + \ No newline at end of file diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/fxmanifest.lua b/resources/[cars]/[mechaniccars]/LGC19FLATBED/fxmanifest.lua new file mode 100644 index 000000000..726b66d76 --- /dev/null +++ b/resources/[cars]/[mechaniccars]/LGC19FLATBED/fxmanifest.lua @@ -0,0 +1,18 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +fx_version 'adamant' +games { 'gta5' } + +description 'LGCustoms' + +files { + 'data/handling.meta', + 'data/vehicles.meta', + 'data/carcols.meta', + 'data/carvariations.meta' +} + +data_file 'HANDLING_FILE' 'data/handling.meta' +data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta' +data_file 'CARCOLS_FILE' 'data/carcols.meta' +data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta' \ No newline at end of file diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed.yft b/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed.yft new file mode 100644 index 000000000..e6065104d Binary files /dev/null and b/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed.yft differ diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed.ytd b/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed.ytd new file mode 100644 index 000000000..41b086031 Binary files /dev/null and b/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed.ytd differ diff --git a/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed_hi.yft b/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed_hi.yft new file mode 100644 index 000000000..5e65ccf4a Binary files /dev/null and b/resources/[cars]/[mechaniccars]/LGC19FLATBED/stream/lgc19flatbed_hi.yft differ diff --git a/resources/[jobs]/[mechanic]/ebu_flatbeds/.fxap b/resources/[jobs]/[mechanic]/ebu_flatbeds/.fxap new file mode 100644 index 000000000..7236e079b Binary files /dev/null and b/resources/[jobs]/[mechanic]/ebu_flatbeds/.fxap differ diff --git a/resources/[jobs]/[mechanic]/ebu_flatbeds/Readme.md b/resources/[jobs]/[mechanic]/ebu_flatbeds/Readme.md new file mode 100644 index 000000000..9458cb207 --- /dev/null +++ b/resources/[jobs]/[mechanic]/ebu_flatbeds/Readme.md @@ -0,0 +1,67 @@ +###### +## There are no longer circles- makesure to read the controls. Bed controls are done at the back left or right of the truck. +##### + +## Default Controls: +[E] - At bed to attach / detach vehicle (useable in vehicle on bed as well) +[LeftArrow] - Attach, Wind winch +[RightArrow] - Unwind winch +[UpArrow] - Raise Bed (automatic, click once) +[DownArrow] - Lower Bed (automatic, click once) +[G] - Remove Rope +[SHIFT] - Access Hand Winch controls +[SHIFT] + [LeftArrow] - Grab winch +[SHIFT] + [RightArrow] - Return winch +[SHIFT] + [E] - Attach winch + +## How to use: +# For ROLLING beds: +1. Lower bed +2. Ensure the vehicle is behind the truck close to the bed +3. Press Left Arrow next to the flatbed truck body to attach the winch +4. Press Left Arrow again to wind the winch +5. Press E when the vehicle is ON the bed. If the vehicle is inside the bed, or too high, press E to disconnect then E again to reconnect the car. + +# For Static beds: +1. Ensure the car is behind the truck. +2. Press E next to the truck, or inside the car. + + + +## Exports / Events: +# wind start/stop winding the winch +targetflatbedWind(truck) +# OR connect target or wind start/stop winding the winch +targetflatbedWind(truck, target) +# event: +"ebu_flatbeds:client:targetflatbedWind" + +# start/stop unwinding the winch +targetflatbedUnWind(truck) +# event: +"ebu_flatbeds:client:targetflatbedUnWind" + +# attach/detach vehicle on bed +targetflatbedAtt(truck) +# event: +"ebu_flatbeds:client:targetflatbedAtt" + +# delete rope attached to truck +targetflatbedRope(truck) +# event +"ebu_flatbeds:client:targetflatbedRope" + +# toggle wheel lift on truck (if applicable) +targetflatbedWheel(truck) +# event: +"ebu_flatbeds:client:targetflatbedWheel" + +# Raise / stop the bed +targetflatbedRaise(truck) +# event: +"ebu_flatbeds:client:targetflatbedRaise" + +# Lower /stop the bed +targetflatbedLower(truck) +# event: +"ebu_flatbeds:client:targetflatbedLower" \ No newline at end of file diff --git a/resources/[jobs]/[mechanic]/ebu_flatbeds/client/client.lua b/resources/[jobs]/[mechanic]/ebu_flatbeds/client/client.lua new file mode 100644 index 000000000..3c36a3d62 Binary files /dev/null and b/resources/[jobs]/[mechanic]/ebu_flatbeds/client/client.lua differ diff --git a/resources/[jobs]/[mechanic]/ebu_flatbeds/client/utils.lua b/resources/[jobs]/[mechanic]/ebu_flatbeds/client/utils.lua new file mode 100644 index 000000000..b8a301956 --- /dev/null +++ b/resources/[jobs]/[mechanic]/ebu_flatbeds/client/utils.lua @@ -0,0 +1,241 @@ +if not Config.DisableExtKeyControls then + RegisterKeyMapping('+bedLower', Config.Controlmessages.LowerBed, 'keyboard', 'DOWN') + RegisterKeyMapping('+bedRaise', Config.Controlmessages.RaiseBed, 'keyboard', 'UP') + RegisterKeyMapping('+flatbedWheel', Config.Controlmessages.WheelLift, 'keyboard', 'H') + if Config.EnableRopes then + RegisterKeyMapping('+flatbedWind', Config.Controlmessages.WindWinch..' / '..Config.Controlmessages.GrabWinch, 'keyboard', 'LEFT') + RegisterKeyMapping('+flatbedUWind', Config.Controlmessages.ExtendWinch..' / '..Config.Controlmessages.ReturnWinch, 'keyboard', 'RIGHT') + RegisterKeyMapping('+flatbedRope', Config.Controlmessages.DetachWinch..' / '..Config.Controlmessages.AttachWinch, 'keyboard', 'G') + end +end + +if not Config.DisableInVehControl then + RegisterKeyMapping('+flatbedAtt', Config.Controlmessages.AttachVehicle, 'keyboard', 'E') +end + +RegisterKeyMapping('+flatbedWarp', 'Flatbed Get In Car', 'keyboard', 'F') + +function loadComplete(car, truck) + --This is called once a vehicle is loaded onto a truck + +end + +--allowed() is the function that determines if the player is allowed to use the controls. DO NOT RENAME THE FUNCTION +--Place whatever job check code you want in here, return true if allowed, false if not +function allowed() + return true +end + +--This function allows checks for vehicle ownership before attaching ropes or to the bed +-- args [truck(entity), car(entity)] +function checkOwnership(truck, car) + return true +end + +--This function returns if the vehicle is locked or not when trying to get in the loaded vehicle from next to the trailer +--false = NOT locked true == LOCKED +function IsVehicleLocked(car) + return DecorGetInt(car, '_VEH_DOOR_LOCK_STATUS') == 2 or DecorGetInt(car, '_VEH_DOOR_LOCK_STATUS') == 10 +end + +--======NOTIFICATIONS======-- +function LoadCompleteNotif() + EndTextCommandThefeedPostTickerForced(1,1) + ThefeedNextPostBackgroundColor(184) + BeginTextCommandThefeedPost("STRING") + AddTextComponentSubstringPlayerName(Config.NotiLoadCompleteMessage) + EndTextCommandThefeedPostTicker(true, true) + Wait(3000) + EndTextCommandThefeedPostTickerForced(1,1) +end + +function UnLoadCompleteNotif() + EndTextCommandThefeedPostTickerForced(1,1) + ThefeedNextPostBackgroundColor(184) + BeginTextCommandThefeedPost("STRING") + AddTextComponentSubstringPlayerName(Config.NotiUnLoadCompleteMessage) + EndTextCommandThefeedPostTicker(true, true) + Wait(3000) + EndTextCommandThefeedPostTickerForced(1,1) +end + +function FBBlockedNotif() + EndTextCommandThefeedPostTickerForced(1,1) + ThefeedNextPostBackgroundColor(6) + BeginTextCommandThefeedPost("STRING") + AddTextComponentSubstringPlayerName(Config.NotiFBBlockedMessage) + EndTextCommandThefeedPostTicker(true, true) + Wait(3000) + EndTextCommandThefeedPostTickerForced(1,1) +end + +function BlockedMessage() + EndTextCommandThefeedPostTickerForced(1,1) + ThefeedNextPostBackgroundColor(6) + BeginTextCommandThefeedPost("STRING") + AddTextComponentSubstringPlayerName(Config.NotiBlockedMessage) + EndTextCommandThefeedPostTicker(true, true) + Wait(3000) + EndTextCommandThefeedPostTickerForced(1,1) +end + + + +--Help Text Messages +function message(lineOne, lineTwo, lineThree, duration, loop) + BeginTextCommandDisplayHelp("THREESTRINGS") + AddTextComponentSubstringPlayerName(lineOne) + AddTextComponentSubstringPlayerName(lineTwo or "") + AddTextComponentSubstringPlayerName(lineThree or "") + + -- shape (always 0), loop (bool), makeSound (bool), duration (5000 max 5 sec) + EndTextCommandDisplayHelp(0, loop, false, duration or 5000) +end + + +--Advanced Functions +function validTruck(veh) + local playerPos = GetEntityCoords(PlayerPedId()) + local truckCoords = GetEntityCoords(veh) + if trucks and #trucks > 0 and has_value(trucks, GetEntityModel(veh)) and #(playerPos - truckCoords) < 10 then + return true + end + return false +end + +--Target +if Config.UseTarget then + --QB CORE + local bones = {"seat_dside_f", "seat_dside_r", "seat_pside_f", "seat_pside_f", 'boot', "scoop", 'chassis'} + local options = {} + options[#options+1] = { + num = 1, + icon = 'fa-solid fa-car-side', + label = '[Winch] Attach Winch', + action = function(entity) + playerAttach(entity) + end, + canInteract = function(entity, distance, data) + return winchInHand and Config.EnableRopes + end, + } + options[#options+1] = { + num = 2, + icon = 'fa-solid fa-angles-left', + label = '[Winch] Attach / Wind Winch', + action = function(entity) + TriggerEvent("ebu_flatbeds:client:targetflatbedWind", entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and allowed() and Config.EnableRopes + end, + } + options[#options+1] = { + num = 3, + icon = 'fa-solid fa-angles-right', + label = '[Winch] UnWind Winch', + action = function(entity) + TriggerEvent("ebu_flatbeds:client:targetflatbedUnWind", entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and allowed() and Config.EnableRopes + end, + } + options[#options+1] = { + num = 4, + icon = 'fa-solid fa-angles-up', + label = '[Winch] Raise Bed', + action = function(entity) + TriggerEvent("ebu_flatbeds:client:targetflatbedRaise", entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and allowed() + end, + } + options[#options+1] = { + num = 5, + icon = 'fa-solid fa-angles-down', + label = '[Winch] Lower Bed', + action = function(entity) + TriggerEvent("ebu_flatbeds:client:targetflatbedLower", entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and allowed() + end, + } + options[#options+1] = { + num = 6, + icon = 'fa-solid fa-ban', + label = '[Winch] Remove Winch', + action = function(entity) + TriggerEvent("ebu_flatbeds:client:targetflatbedRope", entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and allowed() and Config.EnableRopes + end, + } + options[#options+1] = { + num = 7, + icon = 'fa-solid fa-car-side', + label = '[Winch] Attach / Detach Vehicle', + action = function(entity) + TriggerEvent("ebu_flatbeds:client:targetflatbedAtt", entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and allowed() + end, + } + options[#options+1] = { + num = 8, + icon = 'fa-solid fa-truck-ramp-box', + label = '[Winch] Toggle Wheel Lift', + action = function(entity) + TriggerEvent("ebu_flatbeds:client:targetflatbedWheel", entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].wheellift and allowed() and Config.EnableRopes + end, + } + --Grab winch from truck + options[#options+1] = { + num = 9, + icon = 'fa-solid fa-car-side', + label = '[Winch] Grab Winch', + action = function(entity) + playerGrab(entity, PlayerPedId()) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and allowed() and Config.EnableRopes + end, + } + --Grab winch from winched car + options[#options+1] = { + num = 10, + icon = 'fa-solid fa-car-side', + label = '[Winch] Grab Veh Winch', + action = function(entity) + playerGrabVeh(entity, PlayerPedId()) + end, + canInteract = function(entity, distance, data) + return getIsVehWinched(entity) and allowed() and Config.EnableRopes + end, + } + options[#options+1] = { + num =11, + icon = 'fa-solid fa-car-side', + label = '[Winch] Return Winch', + action = function(entity) + playerReturn(entity) + end, + canInteract = function(entity, distance, data) + return Config.Trucks[GetEntityModel(entity)] and Config.Trucks[GetEntityModel(entity)].type ~= "static" and winchInHand and Config.EnableRopes + end, + } + + exports['qb-target']:AddTargetBone(bones, { + options = options, + distance = 5.5 + }) + +end + diff --git a/resources/[jobs]/[mechanic]/ebu_flatbeds/config.lua b/resources/[jobs]/[mechanic]/ebu_flatbeds/config.lua new file mode 100644 index 000000000..e211a01a6 --- /dev/null +++ b/resources/[jobs]/[mechanic]/ebu_flatbeds/config.lua @@ -0,0 +1,1107 @@ +Config = {} + +Config.Debug = false -- Used for support + +Config.InteractDistance = 2.0 -- Distance to check if near a truck on foot +Config.CloseVehiclesDistance = 10.0 -- Distance to check for nearby vehicles +Config.GetInDistance = 3.5 + + +--Ctrl + Shift Bed Control +Config.DisableCabControl = true -- Disables Left Stick Control and Ctrl + Shift while driving. +Config.DisableSpeed = 3.0 -- Speed at which the controls get disabled + +--Rope/Winch Config +Config.EnableRopes = true -- if disabled, ALL rope / winching is disabled +Config.WinchSpeed = 0.11 -- Winch Speed. HIGHLY suggest adjusting in 0.1 increments +Config.MaxWinchLength = 50 +Config.MinWindDistance = 2.6 +Config.ModifierKey = 21 -- Default 21 (SHIFT): Key to hold to see secondary winch controls +Config.ModifierKeyName = '~INPUT_SPRINT~' -- Match name to number here https://docs.fivem.net/docs/game-references/controls/ +Config.AutoWinchOnDetach = true -- Automatically attach winch rope when detaching from bed +Config.AutoAttach = true --Automatically attach a vehicle when it reaches the min winch length +Config.Doublecheck = true -- Double locks the vehicle onto the bed to try and ensure its touching the bed + +Config.LegacyMove = false -- Set to true if the new winch method does not work for you + + +--Bed Movement +Config.BedSpeed = 0.0003 -- Speed of the bed movement +Config.DisableUnloadOnUp = true --Prevent Unloading car when bed is up + +--NOTIFICATIONS-- +Config.Notifications = true -- See utils.lua for functions + +--TRANSLATIONS More customization in utils.lua including key controls +Config.NotiUnLoadCompleteMessage = "Unload Complete" +Config.NotiLoadCompleteMessage = "Loading Complete" +Config.NotiBlockedMessage = "Unloading zone blocked" +Config.NotiFBBlockedMessage = "Flatbed blocked or occupied" + +--========Target System========-- +Config.UseTarget = false --Enable Target system. Set up in utils.lua. Supports qb-target by default + +--If the below are disabled, it is recommened to set Config.ShowMarkers and Config.ShowHelp to false +Config.DisableExtKeyControls = false --Disable key controls for bed control. Attach/Detach from inside vehicle separate +Config.DisableInVehControl = false --Disable key controls for in vehicle. + +--========Markers & Prompts=======-- +--Increases tick rate from 0.01 to 0.08 - 0.1 when in range +Config.ShowMarkers = true -- Display markers at interaction points +Config.ShowHelp = true -- Display help prompts + +Config.MarkerDistance = 5.0 -- Distance from point to see marker +Config.WaitTimer = 3000 -- Update rate to check for nearby trailer seconds * 1000 (Default 3000) + +Config.MessageDistance = 2.0 -- Distance from point to display message (Default 2.0) +Config.Marker = { + type = 1, -- marker shape: https://docs.fivem.net/docs/game-references/markers/ (Default 27) + + Size = 1.0, -- marker size (Default 2.0) + + Color = { -- RGBA color + red = 100, + green = 200, + blue = 200, + alpha = 150 + }, + heightOffset = 0.0, -- Height from ground for marker. Marker at ground Z (Default 0.0) + Bob = false, -- Marker bobbing up and down (Default false) + faceCamera = false, -- Marker always faces camera (Default false) + rotate = false -- Marker rotates (Default false) +} + +Config.Controlmessages = { + LowerBed = "Lower", + RaiseBed = "Raise bed", + AttachVehicle = "Attach/Detach", + WindWinch = "Wind", + ExtendWinch = "Unwind", + DetachWinch = "Detach Winch", + GrabWinch = "Grab Winch", + ReturnWinch = "Return Winch", + AttachWinch = "Attach Winch", + WheelLift = "WheelLift" +} + +--========Trucks========-- +Config.Trucks = { + --Bagged + [GetHashKey('bcsandking5500wr2')] = { + type = 'rolling', -- Rolling for moving beds, static for flatbeds like the vanilla flatbed + boneName = 'misc_a', -- Name of the bone to attach to Generally embedded in the flatbed + hasBedControl = true, + MaxUnwindDistance = 10.0, -- Max distance in meters the winch will unwind + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, 0.4, -0.1), -- Offset from the boneName position + carHeightOffset = 0.375, -- Height to adjust attached car by + winchBone = 'misc_b', -- Bone for winch Rope + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, -- How far backwards from the winch bone to check from + animation = true, + animExt = 1 + }, + [GetHashKey('ct660tow')] = { + type = 'rolling', -- Rolling for moving beds, static for flatbeds like the vanilla flatbed + boneName = 'misc_a', -- Name of the bone to attach to Generally embedded in the flatbed + hasBedControl = true, + MaxUnwindDistance = 10.0, -- Max distance in meters the winch will unwind + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, 0.4, -0.1), -- Offset from the boneName position + carHeightOffset = 0.375, -- Height to adjust attached car by + winchBone = 'misc_b', -- Bone for winch Rope + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, -- How far backwards from the winch bone to check from + MinPos = 0.03, -- Position of the bed when raised fully + MaxPos = 0.26 -- Position of the bed when lowered fully + }, + [GetHashKey('bcthauler2')] = { + type = 'trailer', -- Trailer + boneName = 'misc_a', -- Name of the bone to attach to Generally embedded in the flatbed + hasBedControl = true, + MaxUnwindDistance = 10.0, -- Max distance in meters the winch will unwind + BedControl = {vector3(-1.0,4.0,-0.55),vector3(1.0,4.0,-0.55)}, + winchBone = 'misc_b', -- Bone for winch Rope + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, -- How far backwards from the winch bone to check from + }, + [GetHashKey('bc205500w')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, 0.8, 0.0), + carHeightOffset = 0.2, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.028, + MaxPos = 0.26 + }, + [GetHashKey('bcsandking5500wr')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, 0.8, 0.0), + carHeightOffset = -0.05, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 3.0, --How far backwards from the winch bone to check from + MinPos = 0.03, --Position of the bed when raised fully + MaxPos = 0.26 -- Position of the bed when lowered fully + }, + --Code3 + [GetHashKey('c3rollback')] = { + type = 'rolling', + boneName = 'misc_b', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-6.0,-0.55)}, + carPosition = vector3(0.0, 0.5, 0.2), + carHeightOffset = -0.05, + winchBone = 'misc_a', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.02, + MaxPos = 0.25 + }, + [GetHashKey('c3pwrollback')] = { + type = 'rolling', + boneName = 'misc_b', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.6,-0.55)}, + carPosition = vector3(0.0, 0.5, 0.2), + carHeightOffset = -0.05, + winchBone = 'misc_a', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.02, + MaxPos = 0.22 + }, + [GetHashKey('c3f350rollback')] = { + type = 'rolling', + boneName = 'misc_b', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.6,-0.55)}, + carPosition = vector3(0.0, 0.5, 0.2), + carHeightOffset = -0.05, + winchBone = 'misc_a', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.02, + MaxPos = 0.23 + }, + [GetHashKey('c3navistar')] = { + type = 'rolling', + boneName = 'misc_b', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.2,-0.55),vector3(1.8,-5.2,-0.55)}, + carPosition = vector3(0.0, 0.4, -0.4), + carHeightOffset = 0.0, + winchBone = 'misc_a', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.02, + MaxPos = 0.27 + }, + [GetHashKey('c3silvrollback')] = { + type = 'rolling', + boneName = 'misc_b', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.9,-0.55)}, + carPosition = vector3(0.0, 0.5, -0.0), + carHeightOffset = -0.05, + winchBone = 'misc_a', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.02, + MaxPos = 0.23 + }, + + --Redneck + [GetHashKey('f550rb')] = { + type = 'rolling', + staticBed = false, + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.75,-0.55),vector3(1.8,-4.75,-0.55)}, + carPosition = vector3(0.0, -0.0, 0.0), + carHeightOffset = 0.2, + winchBone = 'attach_male', + winchDistCheck = 5.0, + winchOffset = 8.0, + MinPos = 0.00, + MaxPos = 0.33 + + }, + [GetHashKey('f550rbc')] = { + type = 'rolling', + staticBed = false, + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.75,-0.55),vector3(1.8,-4.75,-0.55)}, + carPosition = vector3(0.0, -0.0, 0.0), + carHeightOffset = -0.2, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.33 + }, + [GetHashKey('20ramrbc')] = { + type = 'rolling', + staticBed = false, + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.75,-0.55),vector3(1.8,-4.75,-0.55)}, + carPosition = vector3(0.0, -0.0, 0.0), + carHeightOffset = 0, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.33 + + }, + + --https://www.gta5-mods.com/vehicles/freightliner-m2-crew-cab-flatbed-add-on-script-beta [[VEHICLE ONLY]] + [GetHashKey('flatbedm2')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.5,-0.55), vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, 1.2, -0.1), + carHeightOffset = 0.2, + winchBone = 'misc_b', + winchDistCheck = 10.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0 , --How far backwards from the winch bone to check from + MinPos = 0.025, + MaxPos = 0.22 + }, + + --LordGooben + [GetHashKey('lgc19flatbed')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, 1.2, -0.1), + carHeightOffset = 0.5, + winchBone = 'misc_b', + winchDistCheck = 10.0, + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.028, + MaxPos = 0.23 + }, + + --MAOAM + [GetHashKey('biftowmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,0.55),vector3(1.8,-1.5,0.55)}, + unloadPos = {vector3(-2.0,-2.0,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.06), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 5.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.25, + wheellift = 5 + + }, + [GetHashKey('389towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,0.55),vector3(1.8,-1.5,0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25, + wheellift = 5 + + }, + [GetHashKey('389towmfd3')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,0.55),vector3(1.8,-1.5,0.55)}, + carPosition = vector3(0.0, -0.1, 0.06), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25, + wheellift = 5 + + }, + [GetHashKey('389towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.9,0.55),vector3(1.8,-1.9,0.55)}, + carPosition = vector3(0.0, -0.3, -0.12), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.22, + wheellift = 5 + + }, + [GetHashKey('389towmfd5')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.9,0.55),vector3(1.8,-1.9,0.55)}, + carPosition = vector3(0.0, -0.3, -0.12), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.22, + wheellift = 5 + + }, + [GetHashKey('389towmfd6')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 12.0, + BedControl = {vector3(-1.8,-2.5,0.55), vector3(1.8,-2.5,0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.14, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.035, + MaxPos = 0.25, + wheellift = 5 + + }, + + [GetHashKey('389towmfd7')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.9,0.55),vector3(1.8,-1.9,0.55)}, + carPosition = vector3(0.0, -1.2, -0.08), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.036, + MaxPos = 0.24, + wheellift = 5 + + }, + + [GetHashKey('112towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 11.0, + BedControl = {vector3(-1.8,-7.5,-0.55),vector3(1.8,-7.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.2), + carHeightOffset = 0.0, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25, + wheellift = 5 + }, + [GetHashKey('t112towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 11.0, + BedControl = {vector3(-1.8,-7.5,-0.55),vector3(1.8,-7.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.2), + carHeightOffset = 0.0, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25, + wheellift = 5 + }, + [GetHashKey('108towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-3.0,-0.55),vector3(1.8,-3.0,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.4, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25, + wheellift = 5 + }, + [GetHashKey('t108towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-3.0,-0.55),vector3(1.8,-3.0,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.4, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25, + wheellift = 5 + }, + [GetHashKey('108utwmfd3')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-3.0,-0.55),vector3(1.8,-3.0,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.55, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.21 + }, + + [GetHashKey('440towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-6.5,-0.55),vector3(1.8,-6.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.1, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.24, + wheellift = 5 + }, + [GetHashKey('t440towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-6.5,-0.55),vector3(1.8,-6.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.1, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.24, + wheellift = 5 + }, + [GetHashKey('440towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.5,-0.55),vector3(1.8,-5.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.45, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.26, + wheellift = 5 + }, + [GetHashKey('t440towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.5,-0.55),vector3(1.8,-5.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.45, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.26, + wheellift = 5 + }, + [GetHashKey('cortowmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.25,-0.55),vector3(1.8,-5.25,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.05, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.26, + wheellift = 5 + }, + [GetHashKey('tcortowmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.25,-0.55),vector3(1.8,-5.25,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.05, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.26, + wheellift = 5 + }, + [GetHashKey('112utwmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-2.5,-0.55),vector3(1.8,-2.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.6, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25 + }, + + [GetHashKey('112utwmfd3')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-2.5,-0.55),vector3(1.8,-2.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.6, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25 + }, + + [GetHashKey('112towmfd3')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-7.0,-0.55),vector3(1.8,-7.0,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.25, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.23, + wheellift = 5 + + }, + + [GetHashKey('112towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.5,-0.55),vector3(1.8,-5.5,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.3, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.23, + wheellift = 5 + }, + [GetHashKey('t112towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.5,-0.55),vector3(1.8,-5.5,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.3, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.0, + MaxPos = 0.23, + wheellift = 5 + }, + [GetHashKey('t112towmfd3')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.5,-0.55),vector3(1.8,-5.5,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.3, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.23, + wheellift = 5 + }, + [GetHashKey('t112towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.5,-0.55),vector3(1.8,-5.5,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.3, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.23, + wheellift = 5 + }, + [GetHashKey('112towmfd5')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-3.0,-0.55),vector3(1.8,-3.0,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.35, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.24, + wheellift = 5 + }, + [GetHashKey('t112towmfd5')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-3.0,-0.55),vector3(1.8,-3.0,-0.55)}, + carPosition = vector3(0.0, -0.1, 0.0), + carHeightOffset = 0.35, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.24, + wheellift = 5 + }, + [GetHashKey('112towmfd6')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 12.0, + BedControl = {vector3(-1.8,-3.0,0.55),vector3(1.8,-3.0,0.55)}, + carPosition = vector3(0.0, -1.2, -0.08), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.01, + MaxPos = 0.24, + wheellift = 5 + + }, + [GetHashKey('t112towmfd6')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 12.0, + BedControl = {vector3(-1.8,-3.0,0.55),vector3(1.8,-3.0,0.55)}, + carPosition = vector3(0.0, -1.2, -0.08), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.24, + wheellift = 5 + + }, + [GetHashKey('112boxmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-6.0,-0.55),vector3(1.8,-6.0,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.3, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.25, + wheellift = 5 + }, + + [GetHashKey('800towmfd4')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-2.5,-0.55),vector3(1.8,-7.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = 0.0, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.0, + MaxPos = 0.21 + }, + + [GetHashKey('550towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,0.55),vector3(1.8,-1.5,0.55)}, + carPosition = vector3(0.0, -0.1, -0.5), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 5.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.17, + wheellift = 5 + }, + [GetHashKey('t550towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,0.55),vector3(1.8,-1.5,0.55)}, + carPosition = vector3(0.0, -0.1, -0.5), + carHeightOffset = 0.375, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 5.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.17, + wheellift = 5 + }, + + --MAOAM Public Release https://www.gta5-mods.com/vehicles/peterbilt-337-tuning-by-mfd-fivem + [GetHashKey('Gtow')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.0,-0.55),vector3(1.8,-4.0,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.2), + carHeightOffset = 0.0, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 10.0, --How far backwards from the winch bone to check from + MinPos = 0.01, + MaxPos = 0.2 + }, + + [GetHashKey('106towmfd1')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,-0.55),vector3(1.8,-1.5,-0.55)}, + carPosition = vector3(0.0, -0.2, -1.0), + carHeightOffset = 0.35, --Will vary per truck + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.21, + wheellift = 5 + }, + [GetHashKey('t106towmfd1')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,-0.55),vector3(1.8,-1.5,-0.55)}, + carPosition = vector3(0.0, -0.2, -1.0), + carHeightOffset = 0.35, --Will vary per truck + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.21, + wheellift = 5 + }, + [GetHashKey('106towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,-0.55),vector3(1.8,-1.5,-0.55)}, + carPosition = vector3(0.0, -0.2, -1.0), + carHeightOffset = 0.35, --Will vary per truck + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.21, + wheellift = 5 + }, + [GetHashKey('t106towmfd2')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,-0.55),vector3(1.8,-1.5,-0.55)}, + carPosition = vector3(0.0, -0.2, -1.0), + carHeightOffset = 0.35, --Will vary per truck + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.21, + wheellift = 5 + }, + [GetHashKey('106towmfd3')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,-0.55),vector3(1.8,-1.5,-0.55)}, + carPosition = vector3(0.0, -0.2, -1.0), + carHeightOffset = 0.35, --Will vary per truck + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.21, + wheellift = 5 + }, + [GetHashKey('t106towmfd3')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-1.5,-0.55),vector3(1.8,-1.5,-0.55)}, + carPosition = vector3(0.0, -0.2, -1.0), + carHeightOffset = 0.35, --Will vary per truck + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.00, + MaxPos = 0.21, + wheellift = 5 + }, + --Paul + [GetHashKey('rollback2')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = -0.1, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.025, + MaxPos = 0.23 + }, + [GetHashKey('rollback3')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = -0.1, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.025, + MaxPos = 0.23 + }, + [GetHashKey('rollback4')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.9,-0.55),vector3(1.8,-4.9,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = -0.2, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.23 + }, + [GetHashKey('rollback14')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = -0.22, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.032, + MaxPos = 0.23 + }, + [GetHashKey('rollback1')] = { + type = 'rolling', + boneName = 'misc_a', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-4.5,-0.55),vector3(1.8,-4.5,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = -0.22, + winchBone = 'misc_b', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.032, + MaxPos = 0.23 + }, + + --Flair + [GetHashKey('independent389')] = { + type = 'rolling', + boneName = 'misc_z', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-6.4,-0.55),vector3(1.8,-6.4,-0.55)}, + carPosition = vector3(0.0, -0.2, 0.0), + carHeightOffset = -0.05, + winchBone = 'attach_male', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 12.0, --How far backwards from the winch bone to check from + MinPos = 0.03, + MaxPos = 0.23, + wheellift = 5 + }, + + --Other + [GetHashKey('towy')] = { + type = 'rolling', + boneName = 'misc_b', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.5,-0.55),vector3(1.8,-5.5,-0.55)}, + carPosition = vector3(0.0, 0.4, -0.1), + carHeightOffset = -0.1, + winchBone = 'misc_a', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.028, + MaxPos = 0.26 + }, + + [GetHashKey('ramtow')] = { + type = 'rolling', + boneName = 'misc_f', + hasBedControl = true, + MaxUnwindDistance = 10.0, + BedControl = {vector3(-1.8,-5.0,-0.55),vector3(1.8,-5.0,-0.55)}, + carPosition = vector3(0.0, -0.5, 0.0), + carHeightOffset = 0.15, + winchBone = 'misc_w', + winchDistCheck = 5.0, -- How far from winchOffset to check for a vehicle + winchOffset = 8.0, --How far backwards from the winch bone to check from + MinPos = 0.028, + MaxPos = 0.26 + }, + + + --STATIC BEDS + [GetHashKey('flatbed')] = { + type = 'static', + carloadPos = vector3(0.0, -10.0, -0.55), + BedControl = {vector3(-2.0, -5.0, -0.55)}, + carPosition = vector3(0.0, -2.3, 0.4), + bikePositions = {vector3(0.0, -2.3, 0.8)}, + carHeightOffset = -0.7, + }, + [GetHashKey('slamtruck')] = { + type = 'static', + carloadPos = vector3(0.0, -8.0, -0.55), + BedControl = {vector3(-2.0, -4.0, -0.55)}, + carPosition = vector3(0.0, -2.3, 0.4), + bikePositions = {vector3(0.0, -2.3, 0.8)}, + carHeightOffset = -0.7, + chkDist = 4.0 + }, + + --PICKUP TRUCK EXAMPLE + [GetHashKey('sadler')] = { + type = 'static', + carloadPos = vector3(0.0, -5.5, -0.55), + BedControl = {vector3(-1.5, -3.0, -0.55)}, + carPosition = vector3(0.0, -2.2, 0.8), + bikePositions = {vector3(0.0, -2.3, 0.8)}, + carHeightOffset = -0.6, + }, + + --Corentin + [GetHashKey('flatbed1amber')] = { + type = 'static', + carloadPos = vector3(-1.0, -9.0, -0.55), + BedControl = {vector3(-2.0, -5.0, -0.55)}, + carPosition = vector3(0.0, -1.9, 0.1), + bikePositions = {vector3(0.0, -2.3, 0.8)}, + carHeightOffset = -0.3, + }, + + [GetHashKey('flatbed2amber')] = { + type = 'static', + carloadPos = vector3(-1.0, -9.0, -0.55), + BedControl = {vector3(-2.0, -5.0, -0.55)}, + carPosition = vector3(0.0, -3.3, 0.0), + bikePositions = {vector3(0.0, -2.3, 0.8)}, + carHeightOffset = -0.3, + }, + + [GetHashKey('flatbed3amber')] = { + type = 'static', + carloadPos = vector3(-1.0, -9.0, -0.55), + BedControl = {vector3(-2.0, -5.0, -0.55)}, + carPosition = vector3(0.0, -3.3, 0.0), + bikePositions = {vector3(0.0, -2.3, 0.8)}, + carHeightOffset = -0.3, + }, +} + +Config.BlacklistedVehs = { + 'kamacho' +} \ No newline at end of file diff --git a/resources/[jobs]/[mechanic]/ebu_flatbeds/fxmanifest.lua b/resources/[jobs]/[mechanic]/ebu_flatbeds/fxmanifest.lua new file mode 100644 index 000000000..d34a93461 --- /dev/null +++ b/resources/[jobs]/[mechanic]/ebu_flatbeds/fxmanifest.lua @@ -0,0 +1,27 @@ +fx_version 'adamant' +game 'gta5' +lua54 'yes' + +description 'Flatbeds Winch Script' +author 'Theebu' + +version '0.7.8a' + +shared_scripts { + 'config.lua', +} + +client_scripts { + 'client/utils.lua', + 'client/client.lua' +} + +server_scripts { + 'server/server.lua' +} + +escrow_ignore { + 'config.lua', + 'client/utils.lua' +} +dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[jobs]/[mechanic]/ebu_flatbeds/server/server.lua b/resources/[jobs]/[mechanic]/ebu_flatbeds/server/server.lua new file mode 100644 index 000000000..a7ada2079 Binary files /dev/null and b/resources/[jobs]/[mechanic]/ebu_flatbeds/server/server.lua differ