SA-MP Forums Archive
Need help with Streamer object - 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)
+--- Thread: Need help with Streamer object (/showthread.php?tid=590914)



Need help with Streamer object - AleemIqbal1 - 05.10.2015

Hello guys i want to remove all streamer objects in virtual world 10 how can i do that.

i will +rep if the function will help.



Re: Need help with Streamer object - Gammix - 05.10.2015

You can easily perform this by using streamer memory natives.

pawn Код:
for (new i, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i < j; i++) {//loop through all dynamic objects
    if (IsValidDynamicObject(i) && Streamer_GetIntData(STREAMER_TYPE_OBJECT, i, E_STREAMER_WORLD_ID) == 10) {//check for virtual world 10
        DestroyDynamicObject(i);//destroy the object in world id 10
    }
}
EDIT: Use a validity check to avoid that warning.


Re: Need help with Streamer object - ATGOggy - 05.10.2015

It'll destroy this object from all virtual worlds.

The fix is to create another object which excludes world 10 by destroying this one.

I'm on phone so someone else will write the code for you.


Re: Need help with Streamer object - AleemIqbal1 - 06.10.2015

*** Streamer Plugin: Streamer_GetIntData: Invalid ID specified O.o any other ideas


Re: Need help with Streamer object - Affan - 06.10.2015

When you put your maps, set it to all other worlds except world 10.


Re: Need help with Streamer object - AleemIqbal1 - 06.10.2015

Lol it cant be possible i want to delete them in vw 10


Re: Need help with Streamer object - AbyssMorgan - 06.10.2015

if the object is in the VW -1 is not in the 10 but everywhere
this does not remove that was, say 0 ... 9 11 ... inf


Re: Need help with Streamer object - AleemIqbal1 - 10.10.2015

AbssMorgan can you give me some example