19.03.2011, 12:14
(
Последний раз редактировалось RyDeR`; 20.03.2011 в 00:38.
)
Foreword
Yes, yet another PAWN based streamer!
I've written a streamer before which was actually a big fail. It was based on the basic streaming algorithm and also had a lot of bugs. This one is completely different (see all features below).
Features
You should customize these before using the streamer:
Streamer Settings
We have one callback which gets called when an object is done moving:
Streamer Functions
Notes
Mirror - Solidfiles (Last Update - 20/03/2011)
Changelog
Yes, yet another PAWN based streamer!
I've written a streamer before which was actually a big fail. It was based on the basic streaming algorithm and also had a lot of bugs. This one is completely different (see all features below).
Features
- Completely reworked the streamer.
- Changed streaming algorithm: look for objects in environment of player, get all possible closest objects (using QuickSort (-> very fast)), and only create and delete if need.
- Supports virtuals worlds.
- Supports interior ID's.
- Supports streaming objects for one specific player.
- Supports draw distance.
- Very realistic object moving syncronisation and position updating.
- Never objects missing problem.
- Fast and flexible streaming (no delay).
- .amx is more little compared to (some) other streamers (almost %50 reduced).
- And lots of more...
You should customize these before using the streamer:
pawn Код:
#if defined MAX_PLAYERS
#undef MAX_PLAYERS
#if !defined MAX_PLAYERS
#define MAX_PLAYERS \
(200)
#endif
#endif
#if defined MAX_OBJECTS
#undef MAX_OBJECTS
#if !defined MAX_OBJECTS
#define MAX_OBJECTS \
(400)
#endif
#endif
#if !defined MAX_STREAMED_OBJECTS
#define MAX_STREAMED_OBJECTS \
(2000)
#endif
#if !defined MAX_STREAM_RADIUS
#define MAX_STREAM_RADIUS \
(300.0)
#endif
#if !defined STREAMER_UPDATE_INTERVAL
#define STREAMER_UPDATE_INTERVAL \
(800)
#endif
We have one callback which gets called when an object is done moving:
pawn Код:
forward OnStreamedObjectMoved(objectid);
pawn Код:
IsValidStreamedObject(objectid);
CreateStreamedObject(modelid, Float: x, Float: y, Float: z, Float: rx, Float: ry, Float: rz, virtualworld = -1, interior = -1, playerid = -1, Float: drawdistance = 0.0);
DestroyStreamedObject(objectid);
MoveStreamedObject(objectid, Float: x, Float: y, Float: z, Float: speed);
StopStreamedObject(objectid);
SetStreamedObjectPos(objectid, Float: x, Float: y, Float: z);
GetStreamedObjectPos(objectid, &Float: x, &Float: y, &Float: z);
SetStreamedObjectRot(objectid, Float: rx, Float: ry, Float: rz);
GetStreamedObjectRot(objectid, &Float: rx, &Float: ry, &Float: rz);
- Parameters assigned -1 means for all. Example, for all virtual worlds. If you change that for example to 0, it will only show in virtual world 0.
- If you have still an old version of my streamer, delete it and use this one.
- Please report bugs in the comment section below.
- Download, extract and put them in the correct folder.
- Open rObjectStreamer.pwn, change the settings at the top and compile it.
- Open the scripts where you want to use this streamer in and include this at the top of your script using #include <rObjectStreamer>
- Write rObjectStreamer in server.cfg (Put this in the beginning of your filterscripts, otherwise it won't work like any other streamer)
Mirror - Solidfiles (Last Update - 20/03/2011)
Changelog
- Saturday 19 March 2011 (19/03/2011)
- First public release.
- Sunday 20 March 2011 (20/03/2011)
- Fixed an exceeding array problem.
- Everything recontrolled for bugs, and no found.
- New setting added. (MAX_OBJECTS, now you can set amount of max objects appearable (NOTE: maximum is 400))