[Plugin] Streamer Plugin

I actually wanted to make something recently and couldn't find the AttachDynamic3DTextLableToPlayer, isn't this supposed to exist?
Reply

Quote:
Originally Posted by Cypress
Посмотреть сообщение
I actually wanted to make something recently and couldn't find the AttachDynamic3DTextLableToPlayer, isn't this supposed to exist?
PHP код:
native Text3D:CreateDynamic3DTextLabel(const text[], colorFloat:xFloat:yFloat:zFloat:drawdistanceattachedplayer INVALID_PLAYER_IDattachedvehicle INVALID_VEHICLE_IDtestlos 0worldid = -1interiorid = -1playerid = -1Float:streamdistance 100.0); 
Just set 'attachedplayer', and then coordinates will be offsets.
Reply

Quote:
Originally Posted by gandzia
Посмотреть сообщение
Hi, i have a weird problem. Im using your NEWEST include + plugin for linux, and i got an error everytime i startup the server (the plugin and include works good though):
Код:
*** Streamer Plugin: Warning: Include file version (unknown version) does not match plugin version (0x26105) (script might need to be recompiled with the latest include file)
I have tried everything, redownloading, recompiling everything, i checked everything that people told me. In the include file i can see:
Код:
public Streamer_IncludeFileVersion = 0x26105;
so the include version is proper, but the plugin or w/e just cant detect it ? I tried both windows and linux versions, none of them works. I used the plugins & includes from my friends, still nothing...
Anyone has any idea ?
Are you sure you are not using a filterscript which also uses the Streamer Plugin (with an outdated include)? To fix that you'll need to recompile all your filterscripts as well.
Reply

Код:
--------------------------

SA-MP Server: 0.3x-R2



Exception At Address: 0x003E10A0 Module: (Unknown)



Registers:

EAX: 0x00692CD0	EBX: 0x01E0E488	ECX: 0x00492BE6	EDX: 0x01FD0174

ESI: 0x01E0EA18	EDI: 0x01FD8D84	EBP: 0x76F83468	ESP: 0x0018FE08

EFLAGS: 0x00010202



Stack:

+0000: 0x00692CDB   0x0069813C   0x0046941B   0x01E0E488

+0010: 0x76F810FF   0x76F81136   0x00000000   0x01E0E488

+0020: 0x0018FEA4   0x004A4A1E   0x00000000   0x00488C46

+0030: 0x00000000   0x00001DB1   0x0018FF88   0x7EFDE000

+0040: 0x0000E000   0x00010101   0x00000032   0x00001E61

+0050: 0x000000A0   0x000019D0   0x01FD9558   0x656D6167

+0060: 0x65646F6D   0x00003531   0x004BC014   0x004BC010

+0070: 0x7EFDE000   0x004A5150   0x0018FE70   0x0018FF78

+0080: 0x0018FF78   0x00496FD8   0x004B27A8   0xFFFFFFFF

+0090: 0x00495271   0x00495281   0x004A5150   0x0018FF78

+00A0: 0x004A4E01   0xFFFFFFFF   0x00496A76   0x00000001

+00B0: 0x01FD1730   0x01FD1788   0x00000094   0x00000006

+00C0: 0x00000001   0x00001DB1   0x00000002   0x76726553

+00D0: 0x20656369   0x6B636150   0x00003120   0x00000000

+00E0: 0x00000000   0x00000000   0x00000000   0x00000000

+00F0: 0x00000000   0x00000000   0x00000000   0x00000000

+0100: 0x00000000   0x00000000   0x00000000   0x00000000

+0110: 0x00000000   0x00000000   0x00000000   0x00000000

+0120: 0x00000000   0x00000000   0x00000000   0x00000000

+0130: 0x00000000   0x00000000   0x00000000   0x00000000
I just received this, after adding streamer.inc to my gamemode when I close the server. Why?

edit://
Solved, wrong order in server.cfg about the plugins.
Reply

I have the same problem as this guy; https://sampforum.blast.hk/showthread.php?tid=452965 (he still has the problem)

I so far was able to figure out that the objects that are no longer there are actually destroyed, not just hidden or anything. Streamer_IsItemVisible returns false and GetDynamicObjectPos is 0.0, 0.0, 0.0

I create and destroy objects quite often and it just seems like object IDs are getting mixed up and the wrong ones destroyed. I always properly assign Objects to variables and check if they're valid before destroying them. I've had this issue for a very long time, also using the latest version of the plugin.

Anybody experiencing similar issues? Any idea on how to fix it?
Reply

The best streamer ever, btw we need new updates
Reply

If I set the drawdistance with E_STREAMER_DRAW_DISTANCE to 300.0 on each object, does this overload the client? (50000 objects on the server)
Reply

Quote:
Originally Posted by Mellnik
Посмотреть сообщение
If I set the drawdistance with E_STREAMER_DRAW_DISTANCE to 300.0 on each object, does this overload the client? (50000 objects on the server)
No, there's a limit how many objects are shown.
You could basically set it to 3000 without issues (except speed, since it would exceed the cell size - so you should not exceed the cell size. If you do, set the cell size to be larger).
Reply

I'm having issues. Objects don't load, they're placed inside OnFilterScriptInit callback properly and compiled, they are not appearing in server. If I try those objects with other gamemodes for e.g. grandlarc, it loads fine. I've even checked the logs, streamer plugin is loaded, the object fiilterscript is loaded too. I did reloadfs, unloadfs, loadfs many many times, but not a single object is appearing. I'm using streamer stuff in my gamemode too like 3D Text Labels, dynamic checkpoints, dynamic moving objects, and etc.

If someone could assist, it'd be great. The server is Linux.

P.S: It was working FINE before, I didn't alter nothing with objects filterscript or the gamemode. I even re-uploaded the latest streamer plugin and even compiled with latest include.

EDIT: Lol, I somehow managed to fix this, it was related to the custom function I've made to fix the distance issue.
Reply

Need more updates.
Btw its overall good.
Reply

There are a bug of 3dtextlabel, sometimes disappear the label on player head.

Look this: https://sampforum.blast.hk/showthread.php?tid=486963
Reply

Quote:
Originally Posted by woot
Посмотреть сообщение
I have the same problem as this guy; https://sampforum.blast.hk/showthread.php?tid=452965 (he still has the problem)

I so far was able to figure out that the objects that are no longer there are actually destroyed, not just hidden or anything. Streamer_IsItemVisible returns false and GetDynamicObjectPos is 0.0, 0.0, 0.0

I create and destroy objects quite often and it just seems like object IDs are getting mixed up and the wrong ones destroyed. I always properly assign Objects to variables and check if they're valid before destroying them. I've had this issue for a very long time, also using the latest version of the plugin.

Anybody experiencing similar issues? Any idea on how to fix it?
Same Problem. Objects simply disappear after a random period of time....
Reply

Quote:
Originally Posted by Leenert
Посмотреть сообщение
Same Problem. Objects simply disappear after a random period of time....
It happens when you add/remove alot of objects, seems it mess up cells or something, really annoying as I got a script where officers can place/pickup cones, but after some 3 days without a restart, they start to disappear, same goes for furniture for houses.
Reply

I'll take a look if any of you can find a way to reproduce it in a standalone script. Otherwise, there's not really much I can do.
Reply

Quote:
Originally Posted by Incognito
Посмотреть сообщение
I'll take a look if any of you can find a way to reproduce it in a standalone script. Otherwise, there's not really much I can do.
Well, we've had the same issue but we've decreased the streamer rate but it seems after the server patch, it seems off again.
Reply

It has something to do with afking + run server for a while + many objects being destroyed/created

Try with this code

pawn Код:
#include <a_samp>
#include <streamer>
enum conInfo
{
    bCreated,Float:bX,Float:bY,Float:bZ,Float:bR,bObject,bModel
};
new Coninfo[1000][conInfo];
CreateCone(playerid,type)
{
    for(new i = 0; i < sizeof(Coninfo); i++)
    {
        if(Coninfo[i][bCreated] == 0)
        {
            GetPlayerPos(playerid,Coninfo[i][bX],Coninfo[i][bY],Coninfo[i][bZ]);
            GetPlayerFacingAngle(playerid,Coninfo[i][bR]);
            Coninfo[i][bCreated] = 1;
            if(type == 0) { Coninfo[i][bModel] = 1238; Coninfo[i][bZ] = Coninfo[i][bZ]-0.71; }
            else if(type == 1) { Coninfo[i][bModel] = 1237; Coninfo[i][bZ] = Coninfo[i][bZ]-1.01; }
            if(random(2) == 0)
            {
                Coninfo[i][bObject] = CreateDynamicObject(Coninfo[i][bModel],Coninfo[i][bX]+random(50),Coninfo[i][bY]-random(50),Coninfo[i][bZ],0,0,Coninfo[i][bR],-1,-1,-1,200.0);
            }
            else
            {
                Coninfo[i][bObject] = CreateDynamicObject(Coninfo[i][bModel],Coninfo[i][bX]-random(50),Coninfo[i][bY]+random(50),Coninfo[i][bZ],0,0,Coninfo[i][bR],-1,-1,-1,200.0);
            }
            for(new user; user < MAX_PLAYERS; user++)
            {
                if(IsPlayerConnected(user) && IsPlayerInRangeOfPoint(user,50.0,Coninfo[i][bX],Coninfo[i][bY],Coninfo[i][bZ]))
                {
                    Streamer_UpdateEx(user,Coninfo[i][bX],Coninfo[i][bY],Coninfo[i][bZ]);
                }
            }
            return 1;
        }
    }
    return 0;
}
DeleteCone()
{
    for(new i = 0; i < sizeof(Coninfo); i++)
    {
        if(Coninfo[i][bCreated] == 1)
        {
            Coninfo[i][bCreated] = 0; Coninfo[i][bX] = 0.0; Coninfo[i][bY] = 0.0; Coninfo[i][bZ] = 0.0;
            DestroyDynamicObject(Coninfo[i][bObject]);
        }
    }
    return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/conex", cmdtext, true))
    {
        for(new i; i < sizeof(Coninfo); i++)
        {
            CreateCone(playerid,random(2));
        }
        SendClientMessage(playerid,-1,"Cones created.");
        return 1;
    }
    else if (!strcmp("/rconex", cmdtext, true))
    {
        DeleteCone();
        SendClientMessage(playerid,-1,"Cones deleted.");
        return 1;
    }
    return 0;
}

Tho those objects which are created on server init, doesn't disappear, just such things as cones etc which are being created/destroyed in gameplay, also they sometimes not creating at all, and what Im noticed that sometimes when I come back from afk, I see an object, but when I move abit it disappears, and not coming back.


Just reproduced, video:

[ame]http://www.youtube.com/watch?v=AJI-Rpp4QwI[/ame]


/fixmap cmd is made specially for this issue, it destroy and create object again, as you can see in 1st part and 2nd, the same cells was missing, 2nd video I made after I reload object creator and created the same fence, after I came back from afk and moved those objects issue accured, also sry about lags at the 2nd part, HDD is almost full :S
Reply

I tried running both of those commands several times. All of the objects were being created and destroyed properly for me. You seem to have other scripts running in your video, though. Those scripts might actually be the source of your problem if they're creating and destroying objects improperly due to scripting errors. Have you tried removing all of the other scripts to see if you can still reproduce this?

Also, you mention that being idle somehow brings this about. Does that mean it only affects players individually? Does reconnecting to the server fix it?
Reply

When it glich aka disappear, it happens for everyone, and no once object is gone, reconnect etc doesnt help, that slot is unusable until next restart.

About scripts, well I have Map FS where is all static map objects, like new ints etc, then I have gates/doors(moving ) objects in the gamemode itself, and /cone /block and few other things at cmds.

This wall what I made that was with IG object editor ( not interested in sharing it ), tho sometimes, when I make some maps, without touching cones cmds or Map FS, objects also disappear, while its still there, after /fixmap cmd aka it destroy and recreate made objects it comes back, but also only if objects gets other slots.


But whats interesting its always the same slots, if you place a road cone and it disappear, after removing it and trying to place again, it wont even appear. So you have to create another, just to pass the slot.


I don't say anything, maybe it is my script issue, but Im pretty confident about what Im doing in pawn.



EDIT, just to tell that script I posted, I was stressing it for around a hour to get that disappearance effect, I was reloading Map FS ( around 5k objects ), creating objects with IG editor, placing gamemode cones, etc
Reply

Well, as I said, there's not much I can do if I'm unable to reproduce it myself. Try doing some debug prints to see if you can narrow down exactly where the problem originates in your code.

I'll add something. I'm not saying this is definitely a scripting issue, because there could very well be a bug in the plugin, but this is an easy mistake to make:

pawn Код:
// This is a global variable that gets initialized in some function to create a road object.
// Let's say this variable is equal to 100 (that is, the object ID is 100).
road = CreateDynamicObject(...);

// The global variable is used in some function to destroy the road object.
// However, the variable is still equal to 100.
DestroyDynamicObject(road);

// Another global variable gets initialized in some function to create a bridge object.
// Since the road object was just destroyed, this variable is also equal to 100.
bridge = CreateDynamicObject(...);

// The function that destroys the road object is called again before another road object is created.
// Although the road object no longer exists, both the "road" and "bridge" variables are still equivalent.
// Therefore, the bridge object gets destroyed.
DestroyDynamicObject(road);
The lesson here is to always reset any variable holding an object ID to 0 immediately after DestroyDynamicObject is called. All object IDs start at 1, so calling DestroyDynamicObject with a variable set to 0 will simply do nothing.
Reply

Код:
#define BULLET_HIT_TYPE_NONE            0
#define BULLET_HIT_TYPE_PLAYER          1
#define BULLET_HIT_TYPE_VEHICLE         2
#define BULLET_HIT_TYPE_OBJECT          3

forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
Are you planning to update streamer to support DynamicObjectId with hittype BULLET_HIT_TYPE_OBJECT ?
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)