SA-MP Forums Archive
object streamer idea... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: object streamer idea... (/showthread.php?tid=247338)



object streamer idea... [unique] - sciman001 - 08.04.2011

ok guys... i got an idea.. and i think it might b a great idea... heres what i was thinking. instead of creating streamed objects, why dont we just create as many objects as we want and stream them all at once? Heres a demo of tis idea:

pawn Код:
#include <a_samp>
forward gg();

main()
{
    print("streamer loaded!");
}

public OnFilterScriptInit()
{
    SetTimer("gg", 1000, true);
    return 1;
}

public gg()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            for(new a=0l a<MAX_OBJECTS; a++
            {
                new Float:x, Float:y, Float:z;
                GetObjectPos(a, x, y, z);
                if(IsPlayerInRangeOFPoint(i, 200, x, y, z);
                {
                    //code that creates the object... somehow... i need a GetObjectModelId(a, id); function
                }
                else
                {
                    DestroyObject(a);
                }
            }
        }
    }
}
lemme no if tis is possible..


Re: object streamer idea... - Gamer_Z - 09.04.2011

I think that indexing is faster than your code...
__
offtopic:
Yay got my brand new laptop!


Re: object streamer idea... - Donya - 09.04.2011

you like lag don't you?


Re: object streamer idea... - sciman001 - 09.04.2011

no...