SA-MP Forums Archive
Attach object to a player then a vehicle. - 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: Attach object to a player then a vehicle. (/showthread.php?tid=564773)



Attach object to a player then a vehicle. - fonia5 - 23.02.2015

As the title says i have done this so far (Below) and am not sure how i attach the object to a player then the player to attach the object by a command /loadtruck.


Код:
	new TruckingObjects;
	TruckingObjects = CreateDynamicObject(1224, 2208.57959, -2287.17358, 14.31383,   0.00000, 0.00000, -44.70000);
	AttachObjectToPlayer(TruckingObjects, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
This is the vehicle model i want it to be attached no idea how i would detect it.
Код:
CreateVehicle(578, 2212.1331, -2266.8428, 14.0662, 45.6600, -1, -1, 100);



Re: Attach object to a player then a vehicle. - CalvinC - 23.02.2015

Use AttachObjectToVehicle to attach an object to a vehicle.
To detect a vehicle model, use GetVehicleModel.


Re: Attach object to a player then a vehicle. - fonia5 - 23.02.2015

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
Use AttachObjectToVehicle to attach an object to a vehicle.
To detect a vehicle model, use GetVehicleModel.
Thank's a bush man am still trying to learn on making jobs as a i have never done it before.