Here is the code.
Код:
new tmpobjid;
tmpobjid = CreateDynamicObject(19601,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, 411,2047.132,1337.139,10.671,199.567,-1,-1,-1, 0.030, -2.640, -0.130, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(19601,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid,411,2047.132,1337.139,10.671,199.567,-1,-1,-1, -0.006, 2.963, -0.400, 0.000, 0.000, 179.400);
You are attaching it to Vehicle ID 411 (which is the model id for Infernus).
However that function needs a Vehicle ID to attach to (not the model id of that vehicle). So you must replace 411 with a variable holding the Vehicle ID of the Vehicle you previously created.
Furthermore the offsets you put look like coordinates, so even if they attach they will never be visible (they'd be several kilometers away from the vehicle - and are probably not even streamed in).