Detecting when an object gets destroyed - 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: Detecting when an object gets destroyed (
/showthread.php?tid=362822)
Detecting when an object gets destroyed -
Tee - 25.07.2012
Is there a way to detect when an object gets destroyed, naturally.
Example, this object (ID 2942) will be destroyed if crashed into or shot enough times.
Re: Detecting when an object gets destroyed -
ViniBorn - 25.07.2012
You can use OnPlayerKeyStateChange + IsPlayerInRangeOfPoint
Re: Detecting when an object gets destroyed -
Tee - 25.07.2012
What I want is to detect when the object actually gets destroyed - whether it be by a player crashing into it, or shooting it.
Re: Detecting when an object gets destroyed -
Rudy_ - 25.07.2012
i think only possible if you "Add the object" then
Re: Detecting when an object gets destroyed -
Tee - 25.07.2012
Quote:
Originally Posted by Rudy_
i think only possible if you "Add the object" then
|
What?
Respuesta: Detecting when an object gets destroyed -
Chris1337 - 25.07.2012
Quote:
Originally Posted by cessil
The object is created, a player can destroy the object and will most likely sync for all players streamed in, then another player streams in to see the object still there.
The object does not get deleted just because a player hits it, you'd need to detect it some other way like using camera vectors, players positions ect.
I'd recommend just using pickups instead.
|
That