SA-MP Forums Archive
[FS-INC] SuperStream v1.1 - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FS-INC] SuperStream v1.1 (/showthread.php?tid=112104)



[FS-INC] SuperStream v1.1 - thegoliathmaster - 05.12.2009

[FS] SuperStream
Presentation
Hi everyone, here's my streamer, i called it SuperStream (presumptuous i know...)

Function
This streamer shows the nearest objects to the player, the maximum distance is set to 350m, you can adjust it to your needs.
The distances of the selected objects (those nearer than 350m) are sorted with a function based on ******'s QuickSort function.

Note: This streamer doesn't take any distance parameter exept the maximum distance, this is a constant for speed and objects with distance over this are not sorted.

Improvements
You can get a better streaming by using the function StreamPlayer, you can decide the position to stream so you can stream objects for the players before they are in a place, it may be very useful for teleports.

Also, it is checking if the player is too far from last stream with OnPlayerUpdate to prevent lack of objects.

Installation
1. Place the filterscript in your filterscript folder
2. Add SuperStream to your filterscript line in server.cfg
3. Open your script containing objects and add #include <SuperStream.inc> to the top
4. Convert your objects to this format:
CreateStreamObject(model, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
note. It doesn't take any distance parameter, the format is very similar to MidoStream so you can use it to convert and remove distance. But, the best way to convert is probably using the CreateObject format and using CTRL+H and simply replace CreateObject by CreateStreamObject

Parameters
Parameters can be found between line 15 and line 27. Here's a short list of them:
.

Download:
Solidfiles - v1.1.2 :


Pastebin - v1.1.2
[FS] SuperStream.pwn
[INC] SuperStream.inc


Log:

V1.0 : original release

V1.1 : - Bug fixe with MoveStreamObject
- added the callback OnStreamObjectMoved
- streaming adjustment

V1.1.1 : minor bug fix
V1.1.2 : constant typo fix (thanks Double-O-Seven)

Comments are appreciated


Re: [FS-INC] SuperStream v1.1 - RenisiL - 05.12.2009

Great work! mean


Re: [FS-INC] SuperStream v1.1 - thegoliathmaster - 05.12.2009

Quote:
Originally Posted by RenisiL
Great work! mean
thanks man, if you have any suggestions, they are welcome


Re: [FS-INC] SuperStream v1.1 - DiddyBop - 05.12.2009

nice job.. but streamer plugin to me is best :P


Re: [FS-INC] SuperStream v1.1 - caribe88 - 06.12.2009

nice job, one question with how many objects you have tested it??


Re: [FS-INC] SuperStream v1.1 - thegoliathmaster - 06.12.2009

Hi,

actually i tested it with around 5000 objects, there was no problem.
if you have a lot of players and objects I don't recommand using this streamer.

i should run a test to run it to the limit soon...

EDIT: it can handle around 20 000, i tested, but only with few players, if you don't want your server to slow down it is not recommanded as there's no zones in this streamer

++Sim++



Re: [FS-INC] SuperStream v1.1 - _Gangster_ - 06.12.2009

Awesome work!!

but i like my streamer (C++ plugin streamer)...


Re: [FS-INC] SuperStream v1.1 - Double-O-Seven - 06.12.2009

You've written a bug:
pawn Код:
#if defined NO_TCIK_COUNT
    #define GetTickCount()             (CurrentTick)
#endif
NO_TCIK_COUNT but it should be NO_TICK_COUNT


Re: [FS-INC] SuperStream v1.1 - thegoliathmaster - 06.12.2009

Quote:
Originally Posted by Double-O-Seven
You've written a bug:
pawn Код:
#if defined NO_TCIK_COUNT
    #define GetTickCount()             (CurrentTick)
#endif
NO_TCIK_COUNT but it should be NO_TICK_COUNT
my bad, fixing this...

EDIT: done and thanks


Re: [FS-INC] SuperStream v1.1 - xTig3rZx - 13.01.2010

Very good streamer, objects are showing up correctly.
I haven,t seen any bug even with 10 000 objects.
Good quality, greatly scripted :P.
Good job guy.

++TZ++