SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Plugin Development (https://forum.sa-mp.com/forumdisplay.php?f=18)
-   -   [Plugin] Streamer Plugin (https://forum.sa-mp.com/showthread.php?t=102865)

CracK 25/02/2010 11:57 AM

Re: [REL] Streamer Plugin v2.3.6
 
Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_MODEL_ID, modelid);

[03]Garsino 25/02/2010 12:05 PM

Re: [REL] Streamer Plugin v2.3.6
 
Quote:

Originally Posted by CrαcK
Streamer_SetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_MODEL_ID, modelid);

Or that ^^

Balon 25/02/2010 02:24 PM

Re: [REL] Streamer Plugin v2.3.6
 
Quote:

GhoulSlayeR: A few other people have reported this, and it does indeed seem to be a problem. I just reproduced the crash by creating a lot of 3D text labels across the map and attempting to stream them, so I'll try to debug the code now.
Take a look at Invoke::callFunction. You allocate the memory for the string, but you don't deallocate it ;)

Incognito 25/02/2010 07:25 PM

Re: [REL] Streamer Plugin v2.3.6
 
Yes, I quickly realized that was the problem as I began debugging it, but thanks for catching my mistake as well. It's been there for at least as long as the rewritten invoke function was added, so I'm surprised that more people didn't experience at least some crashes. I just tested with 1,000,000 3D text labels spread evenly across the map, and everything went fine.

The next version will feature a few area detection natives and callbacks (thanks to DavidC for the suggestion). Areas are functionally similar to checkpoints, but they're invisible and offer a bit more control over the exact positions where players can be detected. These were pretty easy to add, but I haven't tested everything extensively, so I'll put the new version up whenever I'm finished.

shady91 25/02/2010 08:17 PM

Re: [REL] Streamer Plugin v2.3.6
 
Quote:

Originally Posted by Incognito
Yes, I quickly realized that was the problem as I began debugging it, but thanks for catching my mistake as well. It's been there for at least as long as the rewritten invoke function was added, so I'm surprised that more people didn't experience at least some crashes. I just tested with 1,000,000 3D text labels spread evenly across the map, and everything went fine.

The next version will feature a few area detection natives and callbacks (thanks to DavidC for the suggestion). Areas are functionally similar to checkpoints, but they're invisible and offer a bit more control over the exact positions where players can be detected. These were pretty easy to add, but I haven't tested everything extensively, so I'll put the new version up whenever I'm finished.

can't wait for this ;)

Stas92 26/02/2010 05:25 PM

Re: [REL] Streamer Plugin v1.0
 
Quote:

Originally Posted by $€ЯĢ
Maybe it would be useful to have a native 'CountDynamicObjects' which would return value of all the objects created, oh and OnDynamicObjectMoved would be nice callback for the future ;)

I hope it won't make problems which combination zcmd + foreach + streamer because of all redefinitions:
Code:

\pawno\include\zcmd.inc(58) : warning 201: redefinition of constant/macro (symbol "OnGameModeInit")
\pawno\include\streamer.inc(75) : warning 201: redefinition of constant/macro (symbol "OnGameModeInit")
\pawno\include\streamer.inc(94) : warning 201: redefinition of constant/macro (symbol "OnPlayerConnect")
\pawno\include\streamer.inc(113) : warning 201: redefinition of constant/macro (symbol "OnPlayerDisconnect")


Same problem with foreach ... how can I fix it? If ignore that warnings, server crash after a while.

Sergei 26/02/2010 05:28 PM

Re: [REL] Streamer Plugin v2.3.6
 
Download lastest zcmd and foreach includes.

Stas92 26/02/2010 05:40 PM

Re: [REL] Streamer Plugin v2.3.6
 
Have got the lastest foreach .. but doesn't help :x

Incognito 27/02/2010 03:20 AM

Re: [REL] Streamer Plugin v2.3.7
 
Here's the latest version:

Quote:

v2.3.7
- Fixed 3D text label crash
- Optimized more streaming code
- Resolved some checkpoint problems
- Added area detection natives and callbacks
I highly recommend updating if you are using streamed 3D text labels at all.

The new area detection natives and callbacks are as follows:

Quote:

native CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicCube(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1);
native DestroyDynamicArea(areaid);
native IsValidDynamicArea(areaid);
native TogglePlayerDynamicArea(playerid, areaid, toggle);
native TogglePlayerAllDynamicAreas(playerid, toggle);
native IsPlayerInDynamicArea(playerid, areaid);
native DestroyAllDynamicAreas();
native CountDynamicAreas();
Quote:

forward OnPlayerEnterDynamicArea(playerid, areaid);
forward OnPlayerLeaveDynamicArea(playerid, areaid);
Usage should be almost identical to checkpoints. Two-dimensional areas (circles and rectangles) as well as three-dimensional areas (spheres and cubes) can be created, returning an area ID. There's also no distance parameter as areas are not technically streamed, so an unlimited number can "visible" at any one time.

I tested it as thoroughly as I could, but there might still be bugs, so let me know if you find any.

GhoulSlayeR 27/02/2010 04:05 AM

Re: [REL] Streamer Plugin v2.3.7
 
Very nice work, thanks a lot!


All times are GMT. The time now is 04:35 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.