Object Distance
#1

Hello, people. Today I made a building with 1100 objects. I use Incognito Streamer and I put maximum visibility of objects to 5000. When I'm near the building everything is visible but away no longer visible.
Here's the code of one of the objects:
Code:
CreateDynamicObject(6959,2218.8000500,1003.2000100,9.9000000,0.0000000,0.0000000,0.0000000, -1, -1, -1, 5000);
Near the building:
Attachment 6522

Slightly far from the building:
Attachment 6523
Please, help!
Reply
#2

There's a maximum of 1000 objects, so you wont be able to see all of them at the same time
Reply
#3

1. Replace All CreateObject/CreateDynamicObject to CreateDynamicObjectEx
2. Change CreateDynamicObjectEx parameters in the include (streamer.inc)
pawn Code:
(
native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
to ->
native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 700.0, Float:streamdistance = 700.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
)
3. Now use this function in your OnGameModeInit Callback ( put Streamer_VisibleItems(STREAMER_TYPE_OBJECT, 1000); on your OnGameModeInit )
4. Now Your Problem Fixed!!!
Reply
#4

I'd suggest you to use one of my includes, made using model sizes, which streams objects realistically.
Check out the thread!
https://sampforum.blast.hk/showthread.php?tid=428089

It streams objects depending upon 'importance' (actually model sizes), so a building being important, it would do that.
Cheers
Reply
#5

Quote:
Originally Posted by Aliassassin123456
View Post
1. Replace All CreateObject/CreateDynamicObject to CreateDynamicObjectEx
2. Change CreateDynamicObjectEx parameters in the include (streamer.inc)
pawn Code:
(
native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
to ->
native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 700.0, Float:streamdistance = 700.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
)
3. Now use this function in your OnGameModeInit Callback ( put Streamer_VisibleItems(STREAMER_TYPE_OBJECT, 1000); on your OnGameModeInit )
4. Now Your Problem Fixed!!!
I did this now,but i got question will my server lag or something with more players?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)