Streamer Plugin
From SA-MP Wiki
This article is currently a Work In Progress. It is therefore possible that the content of this article is currently incomplete or incorrect. |
Plugin developed by Incognito, download is available on the release page.
This plugin streams objects, pickups, checkpoints, race checkpoints, map icons, and 3D text labels at user-defined server ticks. Basic area detection is also included. Because it is written entirely in C++, much of the overhead from PAWN is avoided. This streamer, as a result, is quite a bit faster than any other implementation currently available in PAWN.
Contents |
Streaming
For those of you who don't know how streamers work (The people who always asked why there wasn't an AttachDynamicObjectToVehicle when it wasn't available (It's added now in the latest 0.3e version))
Note | Hereafter, the term 'item' will be used to refer to any thing that can be streamed by the plugin: objects, pickups, checkpoints, map icons and areas. |
Streamers create player items instead of global ones (except for pickups for which no 'per-player' version exists), and only show them for the players they are created for if that player is near by. The plugin is a little more advanced than the Pawn streamers but the concept is basically the same. A repeating timer loops through each item, checks if the item's respecting player is within it's stream distance and creates the object if they are.
A good example of how streamers work is here you can see how in that grid of objects, only the ones within a certain radius of the player are created.
Plugin Functions
Streamer_TickRate
Description:
rate | Set the tickrate. |
Return Values:
Streamer_MaxItems
Description:
type | The type to set the maximum items for. Refer to the definitions. |
items | The maximum amount of items to stream. |
Return Values:
Streamer_VisibleItems
Description:
type | The type of streamed item (object, pickup, 3d text label etc.) to set the maximum visible items for. Refer to the definitions. |
items | The maximum amount of items that can be visible. |
Return Values:
Streamer_CellDistance
Description:
streamdistance | The cell distance to set. |
Return Values:
Streamer_CellSize
Description:
size | The cell size to set. |
Return Values: