AttachObjectToVehicle help! -
Mennims - 26.06.2013
Help with this code
new objectid = CreateObject(10245,0,0,0,0,0,0,80);
new vehicleid = 433;
AttachObjectToVehicle(objectid, vehicleid, -540.9130, -497.3527, 26.0530, 0.0000, 0.0000, 0.0000);
For starters I want to attach the object ID 10245 to the top of my car, and I want the car to be at -540.9130, -497.3527, 26.0530, 0.0000, 0.0000, 0.0000, how would I do it and what function should I put the code under? This is really confusing me please be detailed too and explain
Re: AttachObjectToVehicle help! -
Vince - 26.06.2013
CreateVehicle, CreateObject, AttachObjectToVehicle. Furthermore, this function use OFFSETS. The center of the car is always 0, 0, 0 no matter where it's been spawned.
Re: AttachObjectToVehicle help! -
Mennims - 26.06.2013
Ok thanks but please can you do it for me, so I can see how

Thanks for clearing the offsets
Re: AttachObjectToVehicle help! -
Mennims - 26.06.2013
By using the AttachObjectToVehicle does it automatically create the vehicle? Also where do I put the command? What functions can I use it under? OnGameModeInit, OnPlayerConnect?
Re: AttachObjectToVehicle help! -
Mennims - 26.06.2013
Quote:
Originally Posted by Vince
CreateVehicle, CreateObject, AttachObjectToVehicle. Furthermore, this function use OFFSETS. The center of the car is always 0, 0, 0 no matter where it's been spawned.
|
Okay but when I do all that it doesn't appear on map