SA-MP Forums Archive
detect if destroyed object? - 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: detect if destroyed object? (/showthread.php?tid=301627)



detect if destroyed object? - jamesbond007 - 05.12.2011

there are some objects that can get destroyed .. like garbage bags, hay, fence ...

how can i check if they exist or not ? (if destroyed)

because im making waste collector job and i cant know if someone destroyed the bag with a vehicle or punching so i can respawn it ... also its making bugs..

pls help this is importent.. ty


Re: detect if destroyed object? - MP2 - 05.12.2011

Not possible, sorry.

Someone may suggest using keys and camera vectors, but it really isn't a reliable option.


Re: detect if destroyed object? - -Rebel Son- - 05.12.2011

Quote:
Originally Posted by MP2
Посмотреть сообщение
Not possible, sorry.
-You sir, Are a gumball.

Theres a way to do it, Not sure how.


Re: detect if destroyed object? - cessil - 05.12.2011

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.


Re: detect if destroyed object? - MP2 - 05.12.2011

Quote:
Originally Posted by -Rebel Son-
Посмотреть сообщение
-You sir, Are a gumball.

Theres a way to do it, Not sure how.
You're not sure how because there IS no way to do it. As I said in my previous post it's BARELY possible with key detection and camera vectors, but it's never going to be reliable.


Re: detect if destroyed object? - AstonDA-G - 05.12.2011

Maybe you should make your own with CreatePlayerObject, then check with IsValidPlayerObject. I think that's the best way there is...


Re: detect if destroyed object? - MP2 - 05.12.2011

He wants to detect clientside destruction, not deletion.


Re: detect if destroyed object? - AstonDA-G - 05.12.2011

Oh, sorry
Still, it might be easier for a trashmaster mission, then you can delete it when the player 'picks it up' via a checkpoint or whatever.