One issue. When someone takes it out of jg-garages
this happens
One issue. When someone takes it out of jg-garages
this happens
I am not sure what the issue would be here, I personally do not use jg-garages.
What my script at least does is the following:
I am not sure if there is something in jg-garages that breaks this. Do you experience this only when using jg-garages?
Yes, I do, Very weird
I have had the same issues on my test server with nothing else running other than ox.
Hey, really awesome script! You can tell right away that you’ve put some real thought into fixing the usual issues most flatbed scripts have — sync, performance, and bugs. It runs smoothly and feels way more polished than many of the overpriced paid versions out there.
I’ve seen a few similar scripts before, but I really like your focus on optimization and immersion. If you manage to add a winch or tow cable system to pull damaged vehicles onto the flatbed — that would be the cherry on top. It’d make the whole thing even more immersive and useful!
Keep it up, can’t wait to see where you take this next! ![]()
![]()
Thank you for the kind words!
I actually looked into a winch/rope before, but in my experience (proper) synchronization can be quite a challenge since rope physics are not synced between clients.
Maybe I will look into this again in the future ![]()
Hey, totally understandable — syncing rope physics between clients is nearly impossible in GTA/FiveM.
Here’s a simple and stable workaround that simulates a realistic winch without using rope physics:
Example implementation:
local pulling = false
RegisterNetEvent("flatbed:winchVehicle", function()
local flatbed = GetVehiclePedIsIn(PlayerPedId(), false)
local veh = GetClosestVehicle(GetEntityCoords(flatbed), 6.0, 0, 70)
if not veh or veh == 0 then return end
local bedCoords = GetOffsetFromEntityInWorldCoords(flatbed, 0.0, -6.0, 0.2)
local targetCoords = GetOffsetFromEntityInWorldCoords(flatbed, 0.0, -2.0, 0.6)
pulling = true
PlaySoundFromEntity(-1, "Winch_Start", flatbed, "DLC_HEIST_PLANNING_BOARD_SOUNDS", false, 0)
local steps = 50
for i = 1, steps do
if not pulling then break end
local ratio = i / steps
local newPos = vec3(
bedCoords.x + (targetCoords.x - bedCoords.x) * ratio,
bedCoords.y + (targetCoords.y - bedCoords.y) * ratio,
bedCoords.z + (targetCoords.z - bedCoords.z) * ratio
)
SetEntityCoords(veh, newPos.x, newPos.y, newPos.z, false, false, false, false)
Wait(100)
end
AttachEntityToEntity(veh, flatbed, 20, 0.0, -2.0, 0.6, 0.0, 0.0, 0.0, false, false, true, false, 2, true)
PlaySoundFromEntity(-1, "Winch_Stop", flatbed, "DLC_HEIST_PLANNING_BOARD_SOUNDS", false, 0)
pulling = false
end)
This moves the vehicle smoothly up the ramp and fixes it in place — no desync, no physics glitches, and it looks like a real winch in action.
If desired, add a small prop (like “prop_rope_hook_01”) between flatbed and vehicle for the visual cable effect.
GreetZ,
NebelRebell
Nebelbank.net
Maybe in the future I will work on an update. In the meantime, if you need a script to push broken vehicles on the flatbed, we also offer a free vehicle push script: Free FiveM Vehicle Push Script | Gamzky Scripts
@XyroGFX @ArduousGamer Maybe this update fixes the issues you guys were facing.
how do we get the car on the flatbed when the car is completely broken down (cant move at all)… can you install a rope in the next update please
If you need a script to push broken vehicles on the flatbed, we also offer a free vehicle push script: Free FiveM Vehicle Push Script | Gamzky Scripts
maybe add a rope to the flatbed script, it would be more realistic please boss
I am not sure about the rules on all this stuff but I ended up going through the ringer with chatgpt because i have minimal programming knowledge. In the end i was able to fix the issue with JG garages. I am willing to share the edited sv_main as long as its allowed. Just going to wait for confirmation
Hi @Sansuish,
You are free to share any code or fixes here that may also help other users! ![]()
Other users also faced issues when using jg-garage, so it may help them as well.
sv_main.lua (6.3 KB)
Like i said i really am a noob so for all i know this could be less optimized than the original but it works with jg-garages for me. Again, thank you for the awesome script!
You fixed it?
i mean it works with JG garages, but technically ChatGPT fixed it haha
Since there were a lot of requests, I also released a free tow script which works together with the flatbed script. Check it out here: [FREE] Tow Rope Script
I can’t and others can’t on our test server get the bed to load.