SA-MP Forums Archive
Objects not streaming! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Objects not streaming! (/showthread.php?tid=643595)



Objects not streaming! - NLDBrian - 23.10.2017

For some reason my objects only load when you are like standing ontop of it (It despawns when distance is more than about 3m).. I've tried to define the DD and SD BEFORE the streamer include.. This didn't work!

An example of my object string:
pawn Код:
CreateDynamicObject(8652,1232.19995117,-1432.09997559,13.39999962,0.00000000,0.00000000,89.00000000);
I already tried the following:
pawn Код:
CreateDynamicObject(8652,1232.19995117,-1432.09997559,13.39999962,0.00000000,0.00000000,89.00000000, 0, 0, 400); //0, 0, 400 = VW, Int, Distance
Please help me out here!

It has around 18000 objects..


Re: Objects not streaming! - NLDBrian - 24.10.2017

Anyone?


Re: Objects not streaming! - IvanElistratov - 24.10.2017

OnGameModeInit > Streamer_SetVisibleItems(0,3000)

Streamer 2.8+


Re: Objects not streaming! - NLDBrian - 24.10.2017

Quote:
Originally Posted by IvanElistratov
Посмотреть сообщение
OnGameModeInit > Streamer_SetVisibleItems(0,3000)

Streamer 2.8+
This still does not work


Re: Objects not streaming! - kingmk - 24.10.2017

Quote:
Originally Posted by NLDBrian
Посмотреть сообщение
For some reason my objects only load when you are like standing ontop of it (It despawns when distance is more than about 3m).. I've tried to define the DD and SD BEFORE the streamer include.. This didn't work!

An example of my object string:
pawn Код:
CreateDynamicObject(8652,1232.19995117,-1432.09997559,13.39999962,0.00000000,0.00000000,89.00000000);
I already tried the following:
pawn Код:
CreateDynamicObject(8652,1232.19995117,-1432.09997559,13.39999962,0.00000000,0.00000000,89.00000000, 0, 0, 400); //0, 0, 400 = VW, Int, Distance
Please help me out here!

It has around 18000 objects..
I'm not sure, but try:

Код:
new objectid = CreateDynamicObject(8652,1232.19995117,-1432.09997559,13.39999962,0.00000000,0.00000000,89.00000000);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_DRAW_DISTANCE, 400.0);



Re: Objects not streaming! - NLDBrian - 24.10.2017

Quote:
Originally Posted by kingmk
Посмотреть сообщение
I'm not sure, but try:

Код:
new objectid = CreateDynamicObject(8652,1232.19995117,-1432.09997559,13.39999962,0.00000000,0.00000000,89.00000000);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_DRAW_DISTANCE, 400.0);
so find and replace all CreateDynamicObject with: new objectid = CreateDynamicObject?


Re: Objects not streaming! - Danisoni - 24.10.2017

Without 'new'.

You can also put OnGameModeInit:
Код:
Streamer_SetVisibleItems(STREAMER_TYPE_OBJECT, 800);



Re: Objects not streaming! - NLDBrian - 24.10.2017

It's still not working I just checked I have around 15000 objects in the script!
If anyone wants to see what exactly is going on, hes free to join!

I just can't get it fixed


Re: Objects not streaming! - kingmk - 24.10.2017

Quote:
Originally Posted by NLDBrian
Посмотреть сообщение
so find and replace all CreateDynamicObject with: new objectid = CreateDynamicObject?
No just create a fucntion like this.

Код:
forward Ex_CreateDynamicObject(modelid, Float: x, Float: y, Float: z, Float: rx, Float: ry, Float: rz, worldid = -1, interiorid = -1, playerid = -1, Float: streamdistance = 300.0);
public Ex_CreateDynamicObject(modelid, Float: x, Float: y, Float: z, Float: rx, Float: ry, Float: rz, worldid = -1, interiorid = -1, playerid = -1, Float: streamdistance = 300.0)
{
    new objectid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
    Streamer_SetFloatData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_DRAW_DISTANCE, 300.0);
    return objectid;
}
Then replace CreateDynamicObject to Ex_CreateDynamicObject and test if this worked out.

or just #define CreateDynamicObject Ex_CreateDynamicObject


Re: Objects not streaming! - NLDBrian - 24.10.2017

Quote:
Originally Posted by kingmk
Посмотреть сообщение
No just create a fucntion like this.

Код:
forward Ex_CreateDynamicObject(modelid, Float: x, Float: y, Float: z, Float: rx, Float: ry, Float: rz, worldid = -1, interiorid = -1, playerid = -1, Float: streamdistance = 300.0);
public Ex_CreateDynamicObject(modelid, Float: x, Float: y, Float: z, Float: rx, Float: ry, Float: rz, worldid = -1, interiorid = -1, playerid = -1, Float: streamdistance = 300.0)
{
    new objectid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
    Streamer_SetFloatData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_DRAW_DISTANCE, 300.0);
    return objectid;
}
Then replace CreateDynamicObject to Ex_CreateDynamicObject and test if this worked out.

or just #define CreateDynamicObject Ex_CreateDynamicObject
This returns:
Код:
error 059: function argument may not have a default value (variable "worldid")