SA-MP Forums Archive
Attaching vehicles to vehicles? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Attaching vehicles to vehicles? (/showthread.php?tid=405330)



Attaching vehicles to vehicles? - Deal-or-die - 06.01.2013

Hey,
I was interested to know on how I was able to attach a vehicle to another vehicle.

An example would be, locking vehicles onto the packer.
(www.vs-rp.com/Development/Temp/VehLock.png)


Cheers,
Deal.


Re: Attaching vehicles to vehicles? - [D]ry[D]esert - 06.01.2013

I think you cant.


Re: Attaching vehicles to vehicles? - Kudoz - 06.01.2013

something like this? : https://sampforum.blast.hk/showthread.php?tid=93095


Re: Attaching vehicles to vehicles? - Deal-or-die - 06.01.2013

Yeah I saw that one my search just prior to posting this but being as laggy as it is and being able to attach multiple vehicles to one vehicle at once is kinda what I was after. I suppose I could take that script and pull it apart and try make something myself but was just curious as to if there was an easier way or not.

Cheers for your assistance anyway.


Re: Attaching vehicles to vehicles? - mineralo - 06.01.2013

I had an idea how to attach a vehicle to other one without lagging like that timer, I thought to create a blank object and to somehow to attach to both vehicle and its will attach.
just an idea


Re: Attaching vehicles to vehicles? - park4bmx - 06.01.2013

the only way is the link to the post by "Gamer_Z".
Why ?

Because the only way is to run a timer and set that vehicle pos to the same as your vehicle but just the X,Y,Z adjusted.

There might be a less lagy way that i think of but that will require a timer as well which will not look so lagy.
instead of setting the vehicle pos set its velocity!
by that way it will have the same velocity as the vehicle your driving and not look lagy at all as it will be smooth even on slow timer.


Re: Attaching vehicles to vehicles? - Vince - 06.01.2013

I don't think you can set the velocity on a vehicle that has no driver. Not sure, though.


Re: Attaching vehicles to vehicles? - Deal-or-die - 06.01.2013

Gah, that is what they need in the next patch/update of samp. AttachVehicleToVehicle(VehicleID, X, Y, Z RotX, RotY, RotZ) or something similar.

Thanks for your help Guys, would be good to be able to get this to work.


Re: Attaching vehicles to vehicles? - park4bmx - 06.01.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
I don't think you can set the velocity on a vehicle that has no driver. Not sure, though.
yep done a test just now, doesn't work if the vehicle has no driver ;X
but with a driver it works/looks really well.