samp-streamer-plugin icon indicating copy to clipboard operation
samp-streamer-plugin copied to clipboard

AttachDynamicObjectToVehicle

Open r4sheed opened this issue 5 years ago • 2 comments

Hey there

I've attached some objects to train trailers which driven by an NPC. If the NPC leaves the streaming distance the objects are dissapearing until the NPC re-enters to it's streaming area.

This is my code, simple

objectid = CreateDynamicObject(3066, x, y, (z - 10.0), 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(objectid, vehicleid, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);

I tried to set the streaming distance to 3000, but if the vehicle is unstreamed for the player I'll found the objects in the air.

r4sheed avatar Jan 03 '20 11:01 r4sheed

Have you tried making the object static (setting the streaming distance to -1.0)?

samp-incognito avatar Jan 22 '20 03:01 samp-incognito

A tried to figure it out with float infinity but I also tried -1.0, as you said. The result is the same, but I think it's not streamer fault.

image

The object stuck at the last streamed position

r4sheed avatar Feb 11 '20 19:02 r4sheed