SA-MP Forums Archive
[AttachObjectTovehicle] (no error, just need help ) - 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: [AttachObjectTovehicle] (no error, just need help ) (/showthread.php?tid=396251)



[AttachObjectTovehicle] (no error, just need help ) - cluckintucker - 30.11.2012

Hello, i was just wondering how to get a vehicle pos and attach a object to that vehicle at the pos its at for ex:

/siren - it attaches it up on the roof of the vehicle.
Can someone help, appreciate it. Thanks.


Re: [AttachObjectTovehicle] (no error, just need help ) - Ballu Miaa - 30.11.2012

When ever you attach an object to a vehicle. You dont require vehicle's positions. You just need offset's/positions where exactly it will be attached at the vehicle.


Re: [AttachObjectTovehicle] (no error, just need help ) - cluckintucker - 01.12.2012

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
When ever you attach an object to a vehicle. You dont require vehicle's positions. You just need offset's/positions where exactly it will be attached at the vehicle.
im sure you do need vehicle positions because when you want to attach it at a certain position you have to have the vehicles position or if you just put it at a random position it would stay there


Re: [AttachObjectTovehicle] (no error, just need help ) - Ballu Miaa - 01.12.2012

That is what we call the offset. It is a position on the vehicle not of the vehicle at which you want the attach the object at.


Re: [AttachObjectTovehicle] (no error, just need help ) - Ballu Miaa - 01.12.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
I don't think there is a good way to find offsets beyond trial and error unfortunately; however, someone else may know of a script. As a hint, a siren will go on top, which is up on the "Z" axis, i.e. the third co-ordinate.
Exactly! However the default Offset's of any Attached Object is 0.00 , 0.00 , 0.00. Same goes for the rotation. Use default values for the offset's and see where you exactly need to attach it to.

There are many filterscript which let's the user Change the offset's according to the user.

Use this , i get Offset's using this FS.