[RELEASE] esx_jb_trailer

Any idea why the predator boat (with proper hash) won’t attach to the boat trailer?

do a showcase, so we can undersand you problem better :slight_smile:

1 Like

https://streamable.com/dqmpb Here you go, showing how the predator boat just won’t work while the dinghy did

i think i maybe know why, becasue i do get closest vehicle and it doesn’t trigger police vehicles i think

1 Like

Any way to fix that?

yes


That would require you to make necessary edit to make it work.

1 Like

Thanks :slight_smile: I added a pull on the GitHub that fixes the issue :slight_smile:

1 Like

Nice :smiley: I would of done it but im so busy with the trailer hehe. Glad to know you worked on it to make it work :smiley: I never realised that gta has so many cars. 600 cars . That is a lot

1 Like

It’s fine :slight_smile: and Ikr, we tried to add all the GTA cars to our ingame car dealer and we realized that then lol but thanks :slight_smile:

Well i thought i did had it all but when Jager_bom gave me the list i was like Wow i only have half XD

1 Like

the code will work if you look at it, because it uses raycast, but if you do look somewhere else, it will take another car, it’ a semi fix if you know and certainly your players know what to do

thats why i wouldn’t recomment to use raycast with players…

yes but its the only way for police boat to work that i found as a solution. So a check could be added for police to use ray and then use closestvehicle for other boat. Unless you know another solution.

normally putting 127 as flag with closest vehicle should work , but it’s like it doesn’t :frowning:

here is the documentation:
https://pastebin.com/kghNFkRi

i test other numbers found on google and did not work either so the ray as of now is the only way to make the predator work. So on his pr he should make like it was but could make a config to look for police boat that needs ray so this way the only time user need to look at is the police and well police should know that when they become a police. For now this could be a solution.

Yes i saw that documentation but i wish gta sometime wouldn’t make all this stuff unorganized or complicated XD

So im almost done with the list i had done with traillersmall then i will made a pr with then i will take a little break with this lol It’s very boring lol Spawn car get back in truck to get the marker then go in marker test car, tweak xyz, restart script test again then dv. repeat.
Once i do the pr i will compare the list that ive done with the list your provided then i will display what car are not done and if someone wants to do it or help then they can.

what a possible fix could be is getting the latest vehicle the player was in. then it will always return an entity. but then you may not be in any other car then the car you want to ‘tow’
you will have to check weather the vehicle is the vehicle attatched to the trailer or not (if you inderstand what i am saying )
so look if salder has a trailer if it does it may not be towed he must enter again the car he wants to tow

1 Like

But if you tow multiple car that mean you need to go in car after entering tow then tow car then get in new car then tow. This probably makes it more confusing for player. I mean the ray cast was meant only for police boat which is mostly for police which you can tell them when in training.

well it is like that now ? isn’t it, if you want vehicle on the big trailer you need to get your vehicle, put it on the spot where it triggers closest vehicle then getting a new car then again driving to the spot getclosestvehicle.

you could easilt remove getclosest vehicle and get the last vehicle entered

Yeahh if you look it that way. I guess that is true. Then i guess this solution is probably best then when i think of this this mean even if there is two car close to that marker would mean if would indeed use the one you entered :stuck_out_tongue: I Think this would be the best alternative.

yes you only need to check if vehicle is empty (no one is driving) and close to the trailer, becasue otherwise maybe someone will steal vehicle and the stolen vehicle is in the north an you are at the airport and then you trigger get latest vehicle and put it on my trailer players will look weard :’)

use this native
https://runtime.fivem.net/doc/natives/#_0x9A9112A0FE9A4713

1 Like