[Plugin] Streamer Plugin

Quote:
Originally Posted by TommyB
Посмотреть сообщение
https://github.com/samp-incognito/sa...GetNearbyItems
That has all the info you need. If you wish to grab the number of objects in that position after using the native, you can use 'strlen(yourarray)'.
Woah, thanks!
Reply

Very good plugin
Reply

Quote:
Originally Posted by TommyB
Посмотреть сообщение
https://github.com/samp-incognito/sa...GetNearbyItems
That has all the info you need. If you wish to grab the number of objects in that position after using the native, you can use 'strlen(yourarray)'.
strlen is recommended only for char arrays. I guess you could use it in that case too, but it isn't recommended.
That wiki page says that it returns 0 or 1. It actually returns the size of final items: https://github.com/samp-incognito/sa...eous.cpp#L1682 . I don't think it is limited by the "maxitems" parameter, so he could actually use
Код:
new items = Streamer_GetNearbyItems( ... );
Quote:
Originally Posted by BeckzyBoi
Посмотреть сообщение
22 commits since 2.9.1. When is 2.9.2 coming? I'm getting sick of the checkpoint bug where they don't show until you re-enter the area. I know that one of the commits fixes this. I'd have thought you'd released 2.9.2 by now so people can download it, use it, and not experience that horrific bug.
As you may know, Streamer Plugin has a crash bug probably since chunks were added:
https://github.com/samp-incognito/sa...gin/issues/205. I remember that Incognito said in one of those issues that he will release the next version when he will be sure that crash was fixed. He can't find the source of server crash. It acts weird. He made few commits to try to fix it, but with no result.
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
@Salik, @TommyB, @IstuntmanI - do not use strlen for non-strings under any circumstances! If you pass a brand new array, strlen will return 0 and I don't think it would do any harm, the maxlen param ends its life in this function: https://sourcegraph.com/github.com/s...oArray#L92-108 but it certainly wouldn't do anything useful at all.

Use sizeof, it's even the default. You can also limit the amount of work done by using some value lower than sizeof if for example you only want the closest 3 items.
Well, I told him that it isn't recommended. I wrote something about sizeof too, but I deleted it afterwards, because that's not what he wants. sizeof only gets an array dimension size at compile time, but he wanted the number of IDs that will be filled in at run time (or maybe even more than that, if the array isn't big enough, maybe he wants the total nearby IDs without any array limit, which is what that function actually returns).

The downside of using strlen: it can report a wrong size if the whole array is filled up with IDs different than 0, so it won't find the internal 0 correctly. It may check too much causing some kind of buffer overflow.
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
@Salik, @TommyB, @IstuntmanI - do not use strlen for non-strings under any circumstances! If you pass a brand new array, strlen will return 0 and I don't think it would do any harm, the maxlen param ends its life in this function: https://sourcegraph.com/github.com/s...oArray#L92-108 but it certainly wouldn't do anything useful at all.

Use sizeof, it's even the default. You can also limit the amount of work done by using some value lower than sizeof if for example you only want the closest 3 items.
That's strange because the following code works flawlessly for me.

PHP код:
new DynamicPickup:pickups[300], Float:xFloat:yFloat:zidpickuparray[2];
GetPlayerPos(playeridxyz);
Streamer_GetNearbyItems(xyzSTREAMER_TYPE_PICKUPpickups300dist);
for(new 
0strlen(_:pickups); p++)
{
    
Streamer_GetArrayData(STREAMER_TYPE_PICKUPpickups[p], E_STREAMER_EXTRA_IDpickuparray);
    
//...

In fact, running that code in an area that only has two pickups gives me these results with strlen and sizeof.

Код:
[14:28:02] strlen: 2 sizeof: 300
The loop works exactly as intended and only iterates twice where I tested it. Using sizeof would in my case would would cause 300 iterations, 298 of them being absolutely useless.
Reply

fixed your retard plugin
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
Reply

Well Done!Keep It!
Reply

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
fixed your retard plugin
Get out of this forum if you cannot appreciate the best plugin on this entire forum..
You are a retarded noob with bad attitude and you will go nowhere in life.
rt-2
Reply

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
fixed your retard plugin
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
The problem is not in this plugin
Reply

Any luck on finding the crash?
Reply

Quote:
Originally Posted by BeckzyBoi
Посмотреть сообщение
Any luck on finding the crash?
You can see the progress here: https://github.com/samp-incognito/sa...gin/issues/205 . Well, currently there's actually no progress.
Reply

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
fixed your retard plugin
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
[sampgdk:warning] Index mismatch for OnPlayerStatsAndWeaponsUpdate (-10040 != -1003
Before you go insulting the developer, maybe understand why this is happening and why its not the developers fault. This is happening because you have a plugin or plugin's running on your server that has a later or earlier version of sampGDK.

I am sure the developer will update it when he has time, however why don't you take the initiative and update it yourself, compile it and get on with your life.

Remember the developer has no requirement to make this plugin or keep it updated. He had done you all a favour and given you a tool to use. Don't insult the people who make your life easier.

PS: I think OnPlayerStatsAndWeaponsUpdate is from YSF, so it's either YSF that's behind or this plugin.
Reply

Yeah haha sorry I'm gonna take the time to 'repair' my visual studio with the C++ libraries.
Reply

question: is the streamer working harder (like using more cpu) when players are driving around fast?
Reply

please playertextdrawstreamer
Reply

And how PlayerTextDraw streamer will work? :P
Streamer means that it streams when you're closer to object. PlayerTextDraw is an GUI, not a real object.
Reply

Quote:
Originally Posted by wallee
Посмотреть сообщение
question: is the streamer working harder (like using more cpu) when players are driving around fast?
I would say, server-side: negligibly, client-side yes, if loading objects and stuff.
Reply

27 commits since version 2.9.1. Please release 2.9.2 regardless of the crash as some of the commits since 2.9.1 are serious bug fixes; and even if there is a crash bug in the plugin, it'll be there whether you release 2.9.2 or not. Please do this. Then once you find the crash after 2.9.2 you can make the version 2.9.2.1? Thoughts?
Reply

Quote:
Originally Posted by BeckzyBoi
Посмотреть сообщение
27 commits since version 2.9.1. Please release 2.9.2 regardless of the crash as some of the commits since 2.9.1 are serious bug fixes; and even if there is a crash bug in the plugin, it'll be there whether you release 2.9.2 or not. Please do this. Then once you find the crash after 2.9.2 you can make the version 2.9.2.1? Thoughts?
I mean, if you want to you can just checkout the development branch, compile it and use it on your server and report back any problems you find.
Reply

Quote:
Originally Posted by Jeroen52
Посмотреть сообщение
I mean, if you want to you can just checkout the development branch, compile it and use it on your server and report back any problems you find.
I'd rather wait for the official release. I just hope it is soon as dynamic checkpoints don't show for players sometimes when they're reenabled and the player teleports into the area of the checkpoint. The player must re-enter the steam distance for the checkpoint to show. IDK if this happens with map icons, objects, etc but it certainly does with checkpoints. I am aware that this has been fixed but it isn't official yet. I develop the script for quite an active server and a lot of players complain thinking it's a bug with my script! Anyway, I guess I'll just have to wait for Incognito to find the cause of the crash (if it is ever found) . P.S. this plugin is awesome in general, it's just that bug that bugs me (bug bugs me - you get it?) . Thanks
Reply


Forum Jump:


Users browsing this thread: 30 Guest(s)