open.mp forum
[Pawn] AttachDynamicObjectToObject - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] AttachDynamicObjectToObject (/showthread.php?tid=2296)



AttachDynamicObjectToObject - Davee52 - 2022-05-30

Hi. I tried to use AttachDynamicObjectToObject, but failed, the object doesn't attach. Any ideas?

Code:
new id,p;

stock CreateATM(Float:PX,Float:PY,Float:PZ,Float:PRX, Float:PRY, Float:PRZ){

id= CreateDynamicObject(19526, PX,PY,PZ, PRX,PRY,PRZ, -1, -1, -1, 10.00, 10.00);

SetDynamicObjectMaterial(id, 0, 2942, "kmb_atmx", "kmb_atm", 0x00000000);

SetDynamicObjectMaterial(id, 2, 14708, "labig1int2", "ab_mottleGrey", 0x00000000);

SetDynamicObjectMaterial(id, 3, 2942, "kmb_atmx", "kmb_atm_sign", 0x00000000);

SetDynamicObjectMaterial(id, 5, 1252, "barrelexpos", "atm", 0x00000000);

p = CreateDynamicObject(19483, PX.2123, PY.12836, PZ.1343, 0.000000, -48.300056, -90.000053, -1, -1, -1, 10.00, 10.00);

SetDynamicObjectMaterialText(p, 0, "{ffffff}CASH", 130, "Ariel", 20, 1, 0x00000000, 0x00000000, 1);

AttachDynamicObjectToObject(p,id,0.2123,0.12836,1.1343,0.000000, -48.300056, -90.000053,1);

}



P.S: It does work correctly when I convert it to default Create Object and AttachObjectToObject.. But i'm using streamer plugin


RE: AttachDynamicObjectToObject - Flofey - 2022-11-09

wwrong thread