15.01.2013, 17:26
hey everybody,
somehow this objects i wanna attach all go to the wrong vehicle...
i use this include btw: https://sampforum.blast.hk/showthread.php?tid=229111&page=8
ok so a little while ago, i wanted to attach some objects NEAR the cargobob helicopter, so 1 could be a driver of it, 1 passenger, and 2 or 3 ppl on each side, that worked out well, then i wanted to create it for the second cargobob, and it didnt work... idk how or what, but it didnt, they didnt got attached etc.
then now i downloaded that include, and i wanted to attach those missiles to 5 different rustlers, but it doesnt attaches it to ANY of the 5 rustlers, instead of the rustlers, it attaches them to the first cargobob i attached those other side objects to, so ppl could lift with the helicopter, anyways this is my code, can anybody tell me what im doing wrong that it all attaches to 1 vehicle(cargobob)?
my createvehicleinworld(originally made by Ryder):
can anybody tell me what is wrong with this code?
greets niels
somehow this objects i wanna attach all go to the wrong vehicle...
i use this include btw: https://sampforum.blast.hk/showthread.php?tid=229111&page=8
ok so a little while ago, i wanted to attach some objects NEAR the cargobob helicopter, so 1 could be a driver of it, 1 passenger, and 2 or 3 ppl on each side, that worked out well, then i wanted to create it for the second cargobob, and it didnt work... idk how or what, but it didnt, they didnt got attached etc.
then now i downloaded that include, and i wanted to attach those missiles to 5 different rustlers, but it doesnt attaches it to ANY of the 5 rustlers, instead of the rustlers, it attaches them to the first cargobob i attached those other side objects to, so ppl could lift with the helicopter, anyways this is my code, can anybody tell me what im doing wrong that it all attaches to 1 vehicle(cargobob)?
pawn Код:
// on top i have:
new CargoBob1, CargoBob2;
new Rustler[5];
// ongamemodeinit
CargoBob1 = CreateVehicleInWorld(548, -1362.5999756, -2320.8999023, 71.1999969, 90.0000000, -1, -1, 7);
CargoBob2 = CreateVehicleInWorld(548, -1669.3000488, -2274.1000977, 40.0999985, 90.0000000, -1, -1, 7);
CB2Tuning1 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CB2Tuning2 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CB2Tuning3 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CB2Tuning4 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CB2Tuning5 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CB2Tuning6 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CargoB1Tuning1 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CargoB1Tuning2 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CargoB1Tuning3 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CargoB1Tuning4 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CargoB1Tuning5 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
CargoB1Tuning6 = CreateDynamicObject(914, 0, 0, 0, 0, 0, 0, 7, -1, -1, 100.0);
AttachDynamicObjectToVehicle(CB2Tuning1, CargoBob2, -2.295005, -0.504999, -1.609998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CB2Tuning2, CargoBob2, -2.295005, 0.979999, -1.624998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CB2Tuning3, CargoBob2, -2.295005, 2.465008, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CB2Tuning4, CargoBob2, 2.425007, 2.465008, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CB2Tuning5, CargoBob2, 2.425007, 0.949999, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CB2Tuning6, CargoBob2, 2.425007, -0.534999, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CargoB1Tuning1, CargoBob1, -2.295005, -0.504999, -1.609998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CargoB1Tuning2, CargoBob1, -2.295005, 0.979999, -1.624998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CargoB1Tuning3, CargoBob1, -2.295005, 2.465008, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CargoB1Tuning4, CargoBob1, 2.425007, 2.465008, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CargoB1Tuning5, CargoBob1, 2.425007, 0.949999, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
AttachDynamicObjectToVehicle(CargoB1Tuning6, CargoBob1, 2.425007, -0.534999, -1.639998, -90.449951, 1.005001, 0.000000); //Object Model: 914 |
Rustler[0] = CreateVehicleInWorld(476, -1353.4000244, -2330.6000977, 62.5999985, 180.0000000, -1, -1, 7);
Rustler[1] = CreateVehicleInWorld(476, -1369.9000244, -2331.0000000, 62.5999985, 180.0000000, -1, -1, 7);
AddVehicleMissiles(Rustler[0],-1.324998, -0.904999);
AddVehicleMissiles(Rustler[1],-1.324998, -0.904999);
Rustler[2] = CreateVehicleInWorld(476, -1685.4000244, -2290.0000000, 42.9000015, 0.0000000, -1, -1, 7);
Rustler[3] = CreateVehicleInWorld(476, -1697.4000244, -2289.0000000, 44.0999985, 354.0000000, -1, -1, 7);
Rustler[4] = CreateVehicleInWorld(476, -1718.8000488, -2310.3000488, 45.5999985, 93.9968262, -1, -1, 7);
AddVehicleMissiles(Rustler[2],-1.324998, -0.904999);
AddVehicleMissiles(Rustler[3],-1.324998, -0.904999);
AddVehicleMissiles(Rustler[4],-1.324998, -0.904999);
pawn Код:
CreateVehicleInWorld(modelid, Float: x, Float: y, Float: z, Float: ang, color1, color2, worldid) return \
SetVehicleVirtualWorld(AddStaticVehicle(modelid, x, y, z, ang, color1, color2), worldid);
greets niels