How to attach to Object on car?
#1

How to attach to Object on car? For example: On a car to put in above box

Sorry for my bad English
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=267742
http://forum.sa-mp.com/showthread.ph...bjectToVehicle
Reply
#3

Код:
AddStaticVehicleEx(578,2473.1008,-1695.8274,14.1410,0.1838,125,125,15);
CreateObject(2669,2473.16748047,-1696.18505859,14.85577965,0.00000000,0.00000000,0.00000000);
CreateObject(2678,2472.41357422,-1698.82775879,14.72235680,0.00000000,0.00000000,0.00000000);
CreateObject(2679,2473.91943359,-1698.83776855,14.72235680,0.00000000,0.00000000,0.00000000);
This truck has to carry that box(this 3 objects), but do not get how something will happen :X
Reply
#4

Idea?
Reply
#5

pawn Код:
new car = AddStaticVehicleEx(578,2473.1008,-1695.8274,14.1410,0.1838,125,125,15);
new object1 = CreateObject(2669,2473.16748047,-1696.18505859,14.85577965,0.00000000,0.00000000,0.00000000);
new object2 = CreateObject(2678,2472.41357422,-1698.82775879,14.72235680,0.00000000,0.00000000,0.00000000);
new object3 = CreateObject(2679,2473.91943359,-1698.83776855,14.72235680,0.00000000,0.00000000,0.00000000);
AttachObjectToVehicle(object1, car, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(object2, car, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(object3, car, 0, 0, 0, 0, 0, 0);
Reply
#6

so?

Код:
new VehicleObject[3];

new dtf;
VehicleObject[0] = CreateObject(2669,2473.16748047,-1696.18505859,14.85577965,0.00000000,0.00000000,0.00000000);
VehicleObject[1] = CreateObject(2678,2472.41357422,-1698.82775879,14.72235680,0.00000000,0.00000000,0.00000000);
VehicleObject[2] = CreateObject(2679,2473.91943359,-1698.83776855,14.72235680,0.00000000,0.00000000,0.00000000);
dtf = CreateVehicle(578,2473.1008,-1695.8274,14.1410,0.1838,86,86,600);
AttachObjectToVehicle(VehicleObject[0],dtf,2473.16748047,-1696.18505859,14.85577965,0.00000000,0.00000000,0.00000000);
AttachObjectToVehicle(VehicleObject[1],dtf,2472.41357422,-1698.82775879,14.72235680,0.00000000,0.00000000,0.00000000);
AttachObjectToVehicle(VehicleObject[2],dtf,2473.91943359,-1698.83776855,14.72235680,0.00000000,0.00000000,0.00000000);
Reply
#7

Yes, but the offsets are wrong. Try with 0 first and see if it works.
Reply
#8

Works, but not working Float:Z. Do not hold altitude
Objects are shifted
Reply
#9

Coordinates not working CreateObject ...
Reply
#10

Can you upload a picture of what it is now and what it should be?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)