SA-MP Forums Archive
AttachObjectToVehicle ??? - 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 ??? (/showthread.php?tid=569625)



AttachObjectToVehicle ??? - quochuy - 01.04.2015

AttachObjectToVehicle ?



Re: AttachObjectToVehicle ??? - CalvinC - 01.04.2015

https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
You have to do it in your script, but it's easy, there's an example on the wiki as well of how to do it.


Re: AttachObjectToVehicle ??? - Vince - 01.04.2015

Coordinates for Attach functions are offsets and all positions are calculated from the center of the vehicle. Thus, the easiest thing to do is to create a vehicle at 0, 0, 0 and work off that.


Re : AttachObjectToVehicle ??? - IzadorO - 01.04.2015

https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

It's a function in which attaches a previous created object to a vehicle.

Example:

ExampleObject = CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, FloatrawDistance);

AttachObjectToVehicle(ExampleObject, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);


Re: AttachObjectToVehicle ??? - quochuy - 01.04.2015

software create ? . Starless ??


Re: AttachObjectToVehicle ??? - quochuy - 01.04.2015

or tool create AttachObjectToVehicle ? .


Re: AttachObjectToVehicle ??? - CalvinC - 01.04.2015

You can just use the map editor to get the coordinates and model id, place the vehicle at coordinates 0, 0, 0 and then you'll get the correct offsets.
Use pawno to open your script and use AttachObjectToVehicle.
Here's a tutorial if needed:
https://sampforum.blast.hk/showthread.php?tid=267742


Re: AttachObjectToVehicle ??? - quochuy - 01.04.2015

Quote:
Originally Posted by IzadorO
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

It's a function in which attaches a previous created object to a vehicle.

Example:

ExampleObject = CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, FloatrawDistance);

AttachObjectToVehicle(ExampleObject, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
Quote:
Originally Posted by CalvinC
Посмотреть сообщение
You can just use the map editor to get the coordinates and model id, place the vehicle at coordinates 0, 0, 0 and then you'll get the correct offsets.
Use pawno to open your script and use AttachObjectToVehicle.
Here's a tutorial if needed:
https://sampforum.blast.hk/showthread.php?tid=267742
how to create the object , and get the coordinates of AttachObjectToVehicle


Re: AttachObjectToVehicle ??? - Golf - 01.04.2015

If you want to keep it simple use this https://sampforum.blast.hk/showthread.php?tid=282883


Re: AttachObjectToVehicle ??? - quochuy - 01.04.2015

Quote:
Originally Posted by Golf
Посмотреть сообщение
If you want to keep it simple use this https://sampforum.blast.hk/showthread.php?tid=282883
How to get the coordinates ? ? ? .