Delete all 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)
+--- Thread: Delete all objects.. (
/showthread.php?tid=600751)
Delete all objects.. -
ProRakNet - 12.02.2016
Hi, How do I delete all at once ? Thanks..
PHP код:
VehModelObject[0] = CreateObject(18809, 0.10140, 2.54382, -1.32190, 0.00000, -90.00000, 90.00000);
VehModelObject[1] = CreateObject(18809, 0.10180, 7.44782, -4.32190, 0.00000, -90.00000, 90.00000);
VehModelObject[2] = CreateObject(18809, 0.10170, 4.84382, -3.32190, 0.00000, -90.00000, 90.00000);
etc.
Re: Delete all objects.. -
Joron - 12.02.2016
What u mean delete them? delete the code ?
Re: Delete all objects.. -
ProRakNet - 12.02.2016
Quote:
Originally Posted by Joron
What u mean delete them? delete the code ?
|
DestroyObject and at one time all object VehModelObject[0]... [30] how can I do ? Sorry English.
Re: Delete all objects.. -
Joron - 12.02.2016
Just backspace and delete them?
Re: Delete all objects.. -
ProRakNet - 12.02.2016
Quote:
Originally Posted by Joron
Just backspace and delete them?
|
Not stable.
Did you deleted with a single function?
Re: Delete all objects.. -
AmigaBlizzard - 13.02.2016
A simple for-loop should do it just fine:
PHP код:
for (new i; i < sizeof(VehModelObject); i++)
{
DestroyObject(VehModelObject[i]);
VehModelObject[i] = 0; // Don't forget to NULL the array, otherwise you could get weird results if you did it again after creating new objects
}
Re: Delete all objects.. -
ProRakNet - 14.02.2016
Quote:
Originally Posted by AmigaBlizzard
A simple for-loop should do it just fine:
PHP код:
for (new i; i < sizeof(VehModelObject); i++)
{
DestroyObject(VehModelObject[i]);
VehModelObject[i] = 0; // Don't forget to NULL the array, otherwise you could get weird results if you did it again after creating new objects
}
|

Thanks..