why these objects not getting attached to the vehicle?
#1

hey everyone,

im working on a car like in BTTF, the delorean, but now the objects dont get attached to the vehicle

pawn Код:
////////////////////////////
    Delorean = CreateVehicleInWorld(559, 103.08620000, 1109.81230000, 13.26580000, 178.95180000, 33, 17, 1);
    DeloreanTuning1 = CreateDynamicObject(1010, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning2 = CreateDynamicObject(1010, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning3 = CreateDynamicObject(1010, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning4 = CreateDynamicObject(1010, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning5 = CreateDynamicObject(918, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning6 = CreateDynamicObject(1666, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning7 = CreateDynamicObject(1510, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning8 = CreateDynamicObject(1362, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning9 = CreateDynamicObject(1010, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning10 = CreateDynamicObject(1010, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    DeloreanTuning11 = CreateDynamicObject(1010, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 0, -1, 250);
    AttachObjectToVehicle(DeloreanTuning1, Delorean, 0.154999, 2.450008, -0.174999, 0.000000, 0.000000, 0.000000); //Object Model: 1010 |
    AttachObjectToVehicle(DeloreanTuning2, Delorean, 0.149999, 1.569998, 0.254999, -1.005000, -9.045001, -89.444953); //Object Model: 1010 |
    AttachObjectToVehicle(DeloreanTuning3, Delorean, -0.164999, 1.579998, 0.254999, -1.005000, -9.045001, -89.444953); //Object Model: 1010 |
    AttachObjectToVehicle(DeloreanTuning4, Delorean, 0.004999, -1.544998, 0.035000, -1.005000, -178.890090, -110.549896); //Object Model: 1362 |
    AttachObjectToVehicle(DeloreanTuning5, Delorean, 0.024999, -1.564998, 0.639999, -180.900100, -178.890090, -123.614860); //Object Model: 1510 |
    AttachObjectToVehicle(DeloreanTuning6, Delorean, 0.024999, -1.559998, 0.729999, -180.900100, -359.790954, -123.614860); //Object Model: 1666 |
    AttachObjectToVehicle(DeloreanTuning7, Delorean, -0.000000, -0.834999, 0.010000, -272.355529, -303.510681, -146.729934); //Object Model: 918 |
    AttachObjectToVehicle(DeloreanTuning8, Delorean, -0.140000, -1.519998, 0.349999, -540.691833, -269.340515, -187.935134); //Object Model: 1010 |
    AttachObjectToVehicle(DeloreanTuning9, Delorean, 0.299999, -1.599998, 0.349999, -540.691833, -269.340515, -187.935134); //Object Model: 1010 |
    AttachObjectToVehicle(DeloreanTuning10, Delorean, 0.070000, -1.269998, 0.349999, -540.691833, -269.340515, -97.484931); //Object Model: 1010 |
    AttachObjectToVehicle(DeloreanTuning11, Delorean, 0.005000, -1.719998, 0.349999, -540.691833, -269.340515, -94.469940); //Object Model: 1010 |
    ////////////////////////
anyone knows why this isnt working? btw i have this under ongamemodeinit

greets niels
Reply
#2

Dynamic objects are player objects, hence they can't be attached to vehicles using this method. Find AttachDynamicObjectToVehicle or experiment with AttachPlayerObjectToVehicle.
Reply
#3

I'm pretty sure you need to use AttachDynamicObjectToVehicle.

EDIT: Too late.
Reply
#4

ow lolz xD i will check it out now ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)