SA-MP vehicle streamer problem with custom object -
DleyDeR - 23.11.2017
Hi. I'm trying to change roads textures ( I created textures by myself ), but I have problem with vehicles ( AddStaticVehicle ).
So - for first I deleted all roads and roads LODs with function; RemoveBuildingForPlayer. Next I added all the textures ( .txd ) and models ( .dff ) to the models folder. All roads work correctly, but problem appear when the player is 300 meters away from vehicles, then vehicles change their position.
(( I think the vehicles falling down, because they can't find correct position ))
I tried to use Incognito streamer for objects ( CreateDynamicObject ++ i tried to increase STREAMER_OBJECT_SD/STREAMER_OBJECT_DD values )
I changed stream_distance and stream_rate too, but there's no any changes...
Is there any way to fix this or not?
BTW thanks for any responds.
Re: SA-MP vehicle streamer problem with custom object -
H4bdel - 23.11.2017
Change all your "CreateDynamicObject" draw and stream distance. Vehicles and players are streamed at maximum 400 "meters". So just make sure your create objects have the stream distance higher than 400 meters, that way the server will load the object before the vehicle and it will not fall through the ground.
Put the last two parameters to 750 or a little lower, like this:
Quote:
CreateDynamicObject(18802, 2892.36621, -11.53248, 17.34394, 0.00000, 0.00000, 0.00000, -1, -1, -1, 750, 750);
|
Re: SA-MP vehicle streamer problem with custom object -
DleyDeR - 23.11.2017
[[SOLVED]] I import func from VC script
Code:
CreateVC2SAObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDist, hadfarawaymodel)
{
new streamer_objectid;
streamer_objectid = CreateDynamicObject(modelid,X,Y,Z,rX,rY,rZ,VC2SA4SAMP_VWORLD);
DrawDist *= 2.0;
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, streamer_objectid, E_STREAMER_STREAM_DISTANCE, DrawDist + 50.0);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, streamer_objectid, E_STREAMER_DRAW_DISTANCE, DrawDist);
if(hadfarawaymodel) {
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, streamer_objectid, E_STREAMER_STREAM_DISTANCE, 1000.0 + DrawDist + 50.0);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, streamer_objectid, E_STREAMER_DRAW_DISTANCE, 1000.0 + DrawDist);
}
return streamer_objectid;
}