[Plugin] Streamer Plugin

Thanks for that.


Does

CountDynamicObjects();
CountDynamicPickups();

actually do anything. I checked the include file and there is nothing at all in it except the native. I was hoping if I put those 2 things it would say on the log how much objects/pickups were detected so I don't need to spend 20 minutes selecting all of my objects then removing all the comments to see how much I have.
Reply

It tells you how many objects/pickups you have created (CreateDynamicObject/CreateDynamicPickup).
Reply

Quote:
Originally Posted by $ЂЯĢ
It tells you how many objects/pickups you have created (CreateDynamicObject/CreateDynamicPickup).
There's no way to make it print on the log when the GM starts?
Reply

Quote:
Originally Posted by [SU
BP13 ]
Quote:
Originally Posted by $ЂЯĢ
It tells you how many objects/pickups you have created (CreateDynamicObject/CreateDynamicPickup).
There's no way to make it print on the log when the GM starts?
Код:
printf("%d objects have been loaded!",CountDynamicObjects());
Reply

Pickups are messed up.

pawn Код:
if (pickupid == Info[13]) // End Cash
    {
        new string [128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "%s has escaped the box!", pName);
        SendClientMessageToAll(COLOR_GREY, string);
        return 1;
    }
    return 0;
}
Comes out like this:
Код:
[SU]BP13 has escaped the box!
[SU]BP13 has escaped the box!
Every Send client message on a streamed pickup comes out as doubble.
Reply

Maybe you have the same code at OnPlayerPickUpPickup? D:
Reply

If you keep standing there, the event gets called every X seconds. Maybe that's the case?
Reply

Quote:
Originally Posted by Double-O-Seven
Maybe you have the same code at OnPlayerPickUpPickup? D:
Nope its exactly how the code it shown.
Reply

Quote:
Originally Posted by cyber_punk
I tried it, its not bad, but would defiantly be better with a zoning system. On my server right now I use YSI, and when you drive down the main strip in LS (the one with the ammunation) the objects load fine. With this streamer the objects load to late if you are driving. Granted it does use less CPU and the .amx compiles smaller and at times does seem faster, while driving in heavily object populated areas there is an object pop up/lag. Put a zoning system and this streamer would be top notch. For now I will stick to YSI, but I will keep an eye out for the version with zoning however.
Yes, I was planning on adding that at some point, but I haven't gotten around to it yet (mainly because it would require a lot of recoding and testing). If objects are streaming too slowly, however, you can always adjust the tickrate.

Quote:
Originally Posted by Double-O-Seven
But there is something I really miss!
A second object update function to stream the objects at a defined position for a player:
pawn Код:
Streamer_UpdateObjectsEx(playerid, Float:x, Float:y, Float:z);
Such a function would be really great so you can stream the objects at a position where the player should be set with SetPlayerPos.
So he might not fall through the ground. Would be very useful.
That is possible, but it won't guarantee that the player will not fall through the objects. There is never any way to be certain that all objects have loaded client-side—that's completely dependent on the player's computer speed and amount of network lag, not the order in which the server sends the commands. What I actually recommend doing is using TogglePlayerControllable on a timer:

pawn Код:
Streamer_UpdateObjectsEx(playerid, Float:x, Float:y, Float:z)
{
    TogglePlayerControllable(playerid, 0);
    SetPlayerPos(playerid, x, y, z);
    Streamer_UpdateObjects(playerid);
    SetTimerEx("Streamer_UnfreezePlayer", 3000, 0, "d", playerid);
}
pawn Код:
forward
    Streamer_UnfreezePlayer(playerid);

public
    Streamer_UnfreezePlayer(playerid)
{
    TogglePlayerControllable(playerid, 1);
}
This will allow some time for the objects to be created client-side.

Quote:
Originally Posted by [SU
BP13 ]
Pickups are messed up.

Every Send client message on a streamed pickup comes out as doubble.
I think I see what your problem is. Download the new files from the first post and see if that fixes it.
Reply

I tried new version, but it doesn't fix the problem:
When you are standing on the pickup, OnPlayerPickUpDynamicPickup will be called many times, until you leave the pickup alone.
Also, it is called as many times as there are filterscripts loaded using streamer include.
Reply

Quote:
Originally Posted by CrαcK
I tried new version, but it doesn't fix the problem:
When you are standing on the pickup, OnPlayerPickUpDynamicPickup will be called many times, until you leave the pickup alone.
Also, it is called as many times as there are filterscripts loaded using streamer include.
If you use pickup type 1 (or any pickup which isn't pickupable) callback will be called all the time because you are actuallyx picking up that pickup all the time. Use pickup type 2, so you actually pickup the pickup and callback will be called only one time.
Reply

I am using type 23.
Reply

Quote:
Originally Posted by CrαcK
I am using type 23.
It isn't pickupable, so callback is called all the time you stand on it. If you want that callback is called only one time use type 2.
Reply

Awesome work!
The plugin works just fine over here.
Even with a tickrate of 350 everything streames very fast.
Anyway,I have one suggestion.I was previously using YSI Objects ( ****** ) [Worked fine] ,since I'm now using your streamer I'm kind of disappointed that there is now function to add a specific object to a player like it was possible in YSI Objects via Object_AddToPlayer(objectid,playerid)
I know I could create the object again and again for every player, using the specific PlayerID when I create the object,but I don't like that idea .


Quote:
Originally Posted by Incognito
pawn Код:
Streamer_UpdateObjectsEx(playerid, Float:x, Float:y, Float:z)
{
    TogglePlayerControllable(playerid, 0);
    SetPlayerPos(playerid, x, y, z);
    Streamer_UpdateObjects(playerid);
    SetTimerEx("Streamer_UnfreezePlayer", 3000, 0, "d", playerid);
}
pawn Код:
forward
    Streamer_UnfreezePlayer(playerid);

public
    Streamer_UnfreezePlayer(playerid)
{
    TogglePlayerControllable(playerid, 1);
}
I do it like that and it works fine.No problems over here.

Keep it up,your plugins are awesome .
Reply

Quote:
Originally Posted by $ЂЯĢ
It isn't pickupable, so callback is called all the time you stand on it. If you want that callback is called only one time use type 2.
Tested with non-streamed pickup and it seems that you're right. I guess I'll stick to using type 2.
Also, I think I fixed problem with that callback calling many times - I just forgot to put
pawn Код:
#define FILTERSCRIPT
Reply

I dont understand, I putted the include in my includes folder and when I write

Код:
#include <streamer>
What do I have to do then?

What do I have to change?



Please help.

Thanks.

Jaap Koopman

Reply

Is anyone else having problems with IsPlayerInDynamicCP ? It just doesnt want to work for me .

EDIT: never mind. It seems it was an issue with OnPlayerEnterCheckpoint/IsPlayerInDynamicCP (works fine with the default OnPlayerEnterDynamicCP alone).
Reply

Today I was playing on my server and suddenly it just stopped working, I couldn't even restart it through rcon panel. The log showed me this error: amx/amxfile.c:101: fgets_cell: Assertion `fp!=((void *)0)' failed. It actually was working but I wasn't able to join the game.
Reply

OK... i hawe one and BIG problem i builded BIG EAR drift map (just upgrade) and its hawe 400+ objects (just thet place)and some of objects dont show then after 30 sec some objects gone and some show up...ANY FIX FOR THET?

and how i can change:
TICKRATE,VISIBLE ITEMS..?im nob for this things and sry for bad ENG
Reply

DRIFT_HUNTER MAX objects in one area 150-250
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)