SA-MP Forums Archive
Destroy lots of objects - 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: Destroy lots of objects (/showthread.php?tid=101977)



Destroy lots of objects - Gappy - 13.10.2009

What would be the best way to destroy a lot of objects at the same time?
As when you unload a FS the objects don't get deleted.


Re: Destroy lots of objects - toneysix - 13.10.2009

Should be DestroyObject https://sampwiki.blast.hk/wiki/DestroyObject


Re: Destroy lots of objects - Correlli - 13.10.2009

Make a loop at OnFilterScriptExit-callback?

pawn Код:
for(new o = 0; o < MAX_OBJECTS; o++)
{
  if(IsValidObject(o)) DestroyObject(o);
}



Re: Destroy lots of objects - Gappy - 13.10.2009

Quote:
Originally Posted by Don Correlli
Make a loop at OnFilterScriptExit-callback?

pawn Код:
for(new o = 0; o < MAX_OBJECTS; o++)
{
  if(IsValidObject(o)) DestroyObject(o);
}
Sweet, cheers.