Questions about Incognito's Streamer
#1

Hi, I was told that I needed a streamer if I want to put more than 1000 objects in SA-MP, I'm using Shabi RoxX's map editor and it already has a Streamer in it(I think it's Incognito's). I have just replaced all my 'Create Object', 'Move Object', 'IsValidObject', 'IsObjectMoving', 'GetObjectPos', 'DestroyObject' & 'OnObjectMoved' to Streamer's function, it compiles fine but I don't like working with thing I'm not familiar with so I'm hoping someone can answer my questions about Incognito's Streamer.

1. What is a streamer? What does Incognito mean by "This plugin streams object..."? A way to create objects bypassing SA-MP's limit detection?
2. Why did Incognito added 'Dynamic' to all his functions' name? Is it only because he wants to create a function named similar to SA-MP's? Was the object created by the original SA-MP function(CreateObject) dynamic too? Does my object work the same as when it is created with the original SA-MP function?
3. Can I just add the word 'Dynamic' before 'Object' to all my current SA-MP object functions? Is Incognito's Streamer's function's parameter the same as SA-MP's, he did not specify which parameter is optional and did not provide enough details about his function and callbacks
4. Is it possible to reload objects by using 'DestroyAllDynamicObjects' function in my gamemode then reloading my map filterscript from my game mode with RCon's reloadfs command?
5. Can someone please explain the objects limitation? What Incognito mean by '500 visible objects'

Lastly, I'm really sorry if I have asked the same question that has been answered before or asked a question that has a clear answer, I'm in a rush and very in need to know about this plugin.
Thanks in advance
Reply
#2

1. A streamer is a feature that will stream objects when you get close to them, i.e. it will load them when you get closer, and unload them further away. This prevents lag and crashes from huge objects and therefore means that you have an unlimited amount of objects.
2. I don't know why he called it that, but, using CreateObject will use the un-streamed versions of objects, and CreateDynamicObject will use streamed versions of objects.
3. Yes, and no, because there are extra parameters you'll see. You can find those on the SA-MP wiki.
4. Try it :P.
5. 500 visible objects in one place at the same time. Check https://sampwiki.blast.hk/wiki/Limits for the unstreamed objects info.
Reply
#3

1.) It simply creates/deletes different PER-PLAYER elements when a player is in range of them such as objects and 3Dtext
2.) It makes sense since this is a completely dynamic system.
3.) Incognito's streamer is a plugin you can only use functions which are defined in one way or another that means you create your own functions.
4.) If you unload any filterscript that uses the streamer all dynamic elements will automatically be deleted objects etc.
5.) 500 visible objects means how many can be streamed in for the player at one time.
Reply
#4

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
2. I don't know why he called it that, but, using CreateObject will use the un-streamed versions of objects, and CreateDynamicObject will use streamed versions of objects.
Based on my understanding from your description, CreateObject will create an object but only shows it when a player comes in range, CreateDynamicObject will only create object when player is in range? I see

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
3.) Incognito's streamer is a plugin you can only use functions which are defined in one way or another that means you create your own functions.
4.) If you unload any filterscript that uses the streamer all dynamic elements will automatically be deleted objects etc.
I don't really get your number 3, I meant I already have a object script with the default SA-MP functions name(CreateObject, Move Object etc), can I just add Dynamic just before the word Object(Means the extra parameters are optional) or do I have to change the parameters or maybe only for some functions. So number 4, I just have to reload my map filterscript to recreate the map?
Reply
#5

Ahh ok I get what you mean now yes you can do that to some extent, try using this so you can set draw distance.

pawn Код:
stock AddDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, drawdistance = 300.0)
{
    new oid;
    oid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
    Streamer_SetFloatData(STREAMER_TYPE_OBJECT, oid, E_STREAMER_DRAW_DISTANCE, drawdistance);
    return oid;
}
Yes, reloading a FS will destroy and reload anything used in the streamer without having to use functions to delete them.
Reply
#6

Thanks to both of you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)