attach objects to vehicles
#1

0.3c brings new function - AttachObjectToVehicle. This is a powerful and handy function. With this you can do stuff like:



or



But getting coordinates for this based on car origin is difficult.

BUT to make this easier, gtab the sa map editor here: https://sampforum.blast.hk/showthread.php?tid=139409

Then the procedure is simple:

- Add a vehicle ide number to the map
- Place it at coordinates 0,0,0 with no rotation
- Move camera to it (use views tab - point camera here option)
- Remove the piece of ground that is in the way there
- Now add objects as you would want them on the car, click show code option and you get this - examples:

Код:
DFT examples: 

// side ramps option:
CreateObject(3078, -1.48, -1.68, 0.71,   -90.00, -90.00, 0.00);
CreateObject(3078, 1.50, -1.72, 0.71,   -90.00, -90.00, 0.00);

// blue open cargo crate (you can also use the other 3 cargo container ids - 2932, 2934, 2935)
CreateObject(3043, -0.01, -2.06, 1.20,   0.00, 0.00, 0.00);
						
// lion cage option
CreateObject(2909, -1.37, -1.75, 0.95,   0.00, 0.00, 0.00);
CreateObject(2909, 1.43, -1.75, 0.95,   0.00, 0.00, 0.00);
CreateObject(2909, 0.02, -1.77, 2.19,   0.00, -90.00, 0.00);
CreateObject(2904, 0.02, -5.62, 0.98,   0.00, 90.00, 0.00);
You can now use the coordinates and angles exported directly for AttachObjectToVehicle.
Reply


Messages In This Thread
attach objects to vehicles - by JernejL - 04.01.2011, 22:46
Re: attach objects to vehicles - by Potassium - 04.01.2011, 23:05
Re: attach objects to vehicles - by Retardedwolf - 04.01.2011, 23:12
Re: attach objects to vehicles - by blewert - 04.01.2011, 23:25
Re: attach objects to vehicles - by Retardedwolf - 05.01.2011, 05:55
Re: attach objects to vehicles - by HyperZ - 05.01.2011, 08:04
Re: attach objects to vehicles - by Retardedwolf - 05.01.2011, 08:48
Re: attach objects to vehicles - by davve95 - 12.01.2011, 14:54
Re: attach objects to vehicles - by Infamous - 12.01.2011, 16:22
Re : attach objects to vehicles - by XBOGTA - 09.12.2012, 05:21
Re: attach objects to vehicles - by Mennims - 26.06.2013, 16:27
Re: attach objects to vehicles - by OpticKiller - 26.06.2013, 16:28
Re: attach objects to vehicles - by Mennims - 26.06.2013, 19:16
Re: attach objects to vehicles - by Darnell - 29.07.2013, 14:10
Re: attach objects to vehicles - by Cebo - 11.02.2014, 12:31
Re: attach objects to vehicles - by MpK - 25.04.2014, 11:52
Re: attach objects to vehicles - by Ari - 01.01.2015, 09:17

Forum Jump:


Users browsing this thread: 2 Guest(s)