SA-MP Forums Archive
DestroyObject question - 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: DestroyObject question (/showthread.php?tid=442899)



DestroyObject question - Finn707 - 09.06.2013

So, does anyone know what happens when I try destroy an object that doesn't exist? Will the server crash or just continue like nothing happened?


Re: DestroyObject question - dEcooR - 09.06.2013

Nothin happens just destroy object


Re: DestroyObject question - park4bmx - 09.06.2013

you can check if its invalid before destroying it so you don't mess things up!


Re: DestroyObject question - Basssiiie - 09.06.2013

Most functions have fail-safe functions for this, so it probably wouldn't hurt when you try to destroy a non-existing vehicle. If you would try this on SA-MP 0.1a (very first SA-MP version) though, your server would crash.


Re: DestroyObject question - Finn707 - 09.06.2013

Yeah I know I can use IsValidObject it's just I'm handling quite a lot of objects and it would take a lot of IF statements, but thanks guys.