SA-MP Forums Archive
Removing all cones - 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: Removing all cones (/showthread.php?tid=290452)



Removing all cones - Tom1412 - 15.10.2011

hey,

I'm making a create cone command, and I'v done it so you can create loads of cones.

But When i do the /removecones it only removes the last one help.

How can i do it so it removes all object that are cones( object id = 1238 )

Iv removed the FS, Sorry I just need a way to remove all the cones that have been created.

Just using Cone = CreateObject

And i tryed to use DestroyObject(Cone);

But that only destroys that last one made.


Re: Removing all cones - manchestera - 15.10.2011

Post the command to create them aswell.


Re: Removing all cones - linuxthefish - 15.10.2011

Loop through all objects and check if they match the cone ID.


Re: Removing all cones - Tom1412 - 15.10.2011

How?

The cone object will only be created by the FS command,

But how am i ment to remove all cones?

or is they a way to do it if cone is in rangofplayer(x,y,z)

remove though cones?

I found,

for(new i; i<MAX_OBJECTS; i++)
{
if(IsValidObject(i))
DestroyObject(i);
}

But i just want it to remove cones not all objects