Create and Destroy Dynamic(Player)Objects
#2

Thank you very much for your answer.

I did it successfully.It works as I wanted..
I just have question about destroy object,is there any better way to destroy all playerobject then for loop through the whole objects.(I have many objects,so it's very big loop with many checks). (~30,000 objects...)

My code

Код:
DestroySnowObject(playerid)
{
    new data;
    for(new i; i < Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); ++i) //for loop for all objects
    {
        if(!IsValidDynamicObject(i)) continue;
        Streamer_GetArrayData(STREAMER_TYPE_OBJECT, i, E_STREAMER_PLAYER_ID, data);
        if(data == playerid) 
        {
            DestroyDynamicObject(i);
        }
    }

    return 0;
}
If not.It's okay,it works.
Sorry for my English..
Reply


Messages In This Thread
Create and Destroy Dynamic(Player)Objects - by GospodinX - 26.11.2018, 23:01
Re: Create and Destroy Dynamic(Player)Objects - by GospodinX - 01.12.2018, 22:29

Forum Jump:


Users browsing this thread: 1 Guest(s)