[Plugin] Streamer Plugin

Would be better to add some function, like: GetDynamicObjectIDFromPlayerObject(playerobjectid) and reversed.

Anyway, Incognito. I made AttachPlayerObjectToPlayer & AttachPlayerObjectToPlayerObject are you planning to write function in streamer for this? I'll update YSF for 0.3z when it's get released.
Reply

I made a modified version of this streamer. (0.3z compatible)

You can use
pawn Код:
public OnShootDynamicObject(playerid, weaponid, objectid, Float:fX, Float:fY, Float:fZ)
{
}
to get the ID of a shot streamer object.

Modified files:
  • event.cpp
  • event.h
  • natives.cpp

Source
Windows
LINUX Debian 6 - by Kirollos
Reply

[quote=BigETI;2870043]I made a modified version of this streamer. (0.3z compatible)

You can use
pawn Код:
public OnShootDynamicObject(playerid, weaponid, objectid, Float:fX, Float:fY, Float:fZ)
{
}
Thank you!



Quote:
Originally Posted by kurta999
Посмотреть сообщение
I'll update YSF for 0.3z when it's get released.
Thanks! I'll wait for your release
Reply

Thanks, BigETI. I'll try to provide an official update soon, along with a few other improvements I've been working on.
Reply

Quote:
Originally Posted by BigETI
Посмотреть сообщение
I made a modified version of this streamer. (0.3z compatible)

You can use
pawn Код:
public OnShootDynamicObject(playerid, weaponid, objectid, Float:fX, Float:fY, Float:fZ)
{
}
to get the ID of a shot streamer object.

Modified files:
  • event.cpp
  • event.h
  • natives.cpp

Source
Windows
LINUX Debian 6 - by Kirollos
THANKS!
Reply

Quote:
Originally Posted by Incognito
Посмотреть сообщение
[...] along with a few other improvements I've been working on.
Any chance you could tell us what these improvements are?
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Any chance you could tell us what these improvements are?
(Incognito) improving spatial queries by using r-trees
(Incognito) besides that new callback for 0.3z, probably two new natives to convert SA-MP IDs to streamer IDs and vice versa.
Reply

Hi Incognito,

I have lot of ideas for this streamer, would be very good if you add some of them.
These things would be very useful for everyone. In past, I need everything of these function.

pawn Код:
GetDynamicPolygonCoordinates(&points_array[]);
GetDynamicPolygonPoints() - return number of points in this polygon
GetPlayerDynamicAreaID();
Support for create areas in areas.

Add option to change Streamer_GetDistanceToItem() mode to 2D or 3D distance check. Not useless, somehere you need to calculate 2D distance. Ex. Get distance to elevators if you move up/down with same keys.
pawn Код:
#define MODE_2D
#define MODE_3D

Streamer_GetDistanceToItem(Float:x, Float:y, Float:z, type, {Text3D,_}:id, &Float:distance, mode = MODE_3D);
Add "filtercolors" option:
pawn Код:
GetDynamic3DTextLabelText(Text3D:id, text[], maxlength = sizeof text, filtercolors = false); // With text {FF0000}ASD{33FF33}QWE if filtering enabled would return: ASDQWE
Same for GetDynamicObjectMaterialText()

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

In my server every player can attach 30object to their vehicle, and players can disable another player vehicle object for himself.
But the remove code is very complex and slow.

So I have idea to add "flags" parameter to every element with default is 0. (not used)

And if x bit of flag is disabled for player and the element flag is that which is disabled, then do not create these element for player. Ex if flag is 0x4 and player flags doesn't contanis that flag, then doesn't show that element for player


if(objectflag && (playerflags & objectflag))
{
show
}
else
{
not show
}

CreateDynamicObject(...., flag = 0x4);

new
flag = 0x4; // Vehicle objects
Streamer_SetFlag(playerid, streamertype, flag, true); // Enable vehicle objects for player
Straemer_SetFlag(playerid, streamertype, flag, false); // Disable vehicle objects for playerid
Streamer_SetFlagValue(playerid, streamertype, value); // Not AND or OR, only set the flag value to the given value
Streamer_GetFlagValue(streamertype, playerid);

Lot of servers have clear world where no objects, this also would very useful for this. Disable object update is bad because I have some objects what I don't want to hide. (Ex. fixed liberty city objects, fixed interior)
Get functions:
pawn Код:
Streamer_GetTickRate();
Streamer_GetMaxItems(type, items);
Streamer_GetVisibleItems(type, items);
Float:Streamer_GetCellDistance();
Float:Streamer_GetCellSize();

Streamer_IsIddleUpdate(playerid);
Streamer_IsItemUpdate(playerid, type);
And get 'original id' from 'streamer' id ad reverse.

pawn Код:
Streamer_GetOriginalID(playerid, type, streamerid); // Example will return CreatePlayerObject() id for given id which created be CreateDynamicObject();
Streamer_GetStreamerID(playerid, tpye, originalid); // If you give CreatePlayerObject() id and that object was created by streamer, then will return with CreateDynamicObject() id
And add support for AttachPlayerObjectToPlayer & AttachPlayerObjectToObject. (same player object to same player, not another to another, playerid 0 object to playerid 0)
With custom RPC sending for only one player these things are possible, and I did it in YSF. When 0.3z will released, i'll update it.

And in the future i'll try to make CreatePlayerPickup() with the same way.. But I din't found any RPC for CreatePickup(). DestroyPickup() rpc was found, but this is shit method to create pickup for everynoe and destroy for everyone except the given playerid.

P.S: Update plugin to VS2013
Reply

cool plugin, good luck)
Reply

I have some suggestions for next version:

forward OnPlayerDynamicItemStreamIn( playerid, type, itemid );
forward OnPlayerDynamicItemStreamOut( playerid, type, itemid );

native IsDynamicItemInStreamForPlayer( playerid, type, itemid );


And also if is possible Vehicles Stream.
Reply

Is an INT I assume..


EDIT: aa, ok I see
Reply

Quote:
Originally Posted by bogdyutzu
Посмотреть сообщение
I have some suggestions for next version:

forward OnPlayerDynamicItemStreamIn( playerid, type, itemid );
forward OnPlayerDynamicItemStreamOut( playerid, type, itemid );

native IsDynamicItemInStreamForPlayer( playerid, type, itemid );


And also if is possible Vehicles Stream.
pawn Код:
native Streamer_IsItemVisible(playerid, type, {Text3D,_}:id);
Reply

The best streamer need more updates also 0.3z is released
Reply

Quote:
Originally Posted by kurta999
Посмотреть сообщение
pawn Код:
GetDynamicPolygonCoordinates(&points_array[]);
GetDynamicPolygonPoints() - return number of points in this polygon
GetPlayerDynamicAreaID();
I could add these. As for GetPlayerDynamicAreaID, the player can be in more than one area at once, so an array would need to be passed.

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Support for create areas in areas.
Perhaps something like OnPlayerEnterDynamicParentArea and OnPlayerEnterDynamicChildArea, as well as some native to assign child areas to parent areas?

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Add option to change Streamer_GetDistanceToItem() mode to 2D or 3D distance check. Not useless, somehere you need to calculate 2D distance. Ex. Get distance to elevators if you move up/down with same keys.
pawn Код:
#define MODE_2D
#define MODE_3D

Streamer_GetDistanceToItem(Float:x, Float:y, Float:z, type, {Text3D,_}:id, &Float:distance, mode = MODE_3D);
I could add a simple "dimensions" parameter, sure.

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Add "filtercolors" option:
pawn Код:
GetDynamic3DTextLabelText(Text3D:id, text[], maxlength = sizeof text, filtercolors = false); // With text {FF0000}ASD{33FF33}QWE if filtering enabled would return: ASDQWE
Same for GetDynamicObjectMaterialText()
Maybe, though this doesn't sound very difficult to script, either.

Quote:
Originally Posted by kurta999
Посмотреть сообщение
In my server every player can attach 30object to their vehicle, and players can disable another player vehicle object for himself.
But the remove code is very complex and slow.

So I have idea to add "flags" parameter to every element with default is 0. (not used)

And if x bit of flag is disabled for player and the element flag is that which is disabled, then do not create these element for player. Ex if flag is 0x4 and player flags doesn't contanis that flag, then doesn't show that element for player
I kind of like this idea, but I'll have to think about it. Note that you can always disable objects for players by using Streamer_RemoveArrayData and E_STREAMER_PLAYER_ID.

Quote:
Originally Posted by kurta999
Посмотреть сообщение
And add support for AttachPlayerObjectToPlayer & AttachPlayerObjectToObject. (same player object to same player, not another to another, playerid 0 object to playerid 0)
With custom RPC sending for only one player these things are possible, and I did it in YSF. When 0.3z will released, i'll update it.
I could, though as I've said before, this would necessitate an update every time a new server version is released. However, I could possibly add a native to update the addresses inside of the script. The plugin would not need to be recompiled in this case.

Quote:
Originally Posted by bogdyutzu
Посмотреть сообщение
I have some suggestions for next version:

forward OnPlayerDynamicItemStreamIn( playerid, type, itemid );
forward OnPlayerDynamicItemStreamOut( playerid, type, itemid );
I don't want to add this. It would dramatically slow down the entire streaming process since everything is running on the same thread. However, I could possibly add a callback that is executed whenever streaming is finished for a particular player. I might even be able to push all of the item IDs that have been streamed in and out as an array.

Quote:
Originally Posted by bogdyutzu
Посмотреть сообщение
And also if is possible Vehicles Stream.
Possible, but there are too many vehicle-related natives and callbacks to wrap.
Reply

I kind of like this idea, but I'll have to think about it. Note that you can always disable objects for players by using Streamer_RemoveArrayData and E_STREAMER_PLAYER_ID. - Yes, but with flags would be easyer and lot of faster, call 10000 times Streamer_RemoveArrayData is very slow.

Anyway about memory hacking functions, currently very easy to update theese addresses and RPC-s. You could add some check if the addresses even not updated, then these functions simply will not work.

These small functions what I wrote these are small and very easy to create, but would be usefull if these would be in the streamer and you don't need to create these.

Vehicle streamer is should NOT be added to this streamer, because currently exists vehicle streamer in client. Kye should increase the limit MINIMUM to 4000 - 6000.
Reply

How can i destroy and after regenerate the dynamic checkpoints, without using "DestroyDynamicCP" functions?

Also, some exemples with these functions?
pawn Код:
native TogglePlayerDynamicCP(playerid, checkpointid, toggle);
native TogglePlayerAllDynamicCPs(playerid, toggle);
Reply

Quote:
Originally Posted by Edvin
Посмотреть сообщение
How can i destroy and after regenerate the dynamic checkpoints, without using "DestroyDynamicCP" functions?

Also, some exemples with these functions?
pawn Код:
native TogglePlayerDynamicCP(playerid, checkpointid, toggle);
native TogglePlayerAllDynamicCPs(playerid, toggle);
I think you use 1/true to toggle them on, and 0/false to toggle them off.
Reply

I somehow didnt found CancelEdit for dynamic objects.
Reply

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
I think you use 1/true to toggle them on, and 0/false to toggle them off.
Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
You posted the answer to your first question right underneath!
The toggle functions basically turn a streamer entity on/off without actually deleting it (makes it invisible I guess)
umm, yeah )

Thanks, btw.
Reply

oh sorry
thankyou
Reply


Forum Jump:


Users browsing this thread: 31 Guest(s)