SA-MP Forums Archive
how to detect if a player shot a specific 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to detect if a player shot a specific object (/showthread.php?tid=278005)



how to detect if a player shot a specific object - Amine_Mejrhirrou - 20.08.2011

i would like to know if there is any way to detect if a player is shooting a specific object or attached object !


Re: how to detect if a player shot a specific object - Hurdehack - 20.08.2011

put Healt to the object and put in a pawn code if there will shoot on that obeject then it says (there is shootin on that object)


Re: how to detect if a player shot a specific object - MP2 - 20.08.2011

Quote:
Originally Posted by Hurdehack
View Post
put Healt to the object and put in a pawn code if there will shoot on that obeject then it says (there is shootin on that object)
You clearly have no idea what you're talking about.

This isn't really possible with SA:MP. You'd have to access the collision callback or however it works


Re : how to detect if a player shot a specific object - Amine_Mejrhirrou - 20.08.2011

amm so that's not possible ! i wanted to create a head shot system by attaching objects to players head and if they're shotted thy die


Re: how to detect if a player shot a specific object - MP2 - 20.08.2011

There's a headshot script somewhere. Use the search function.


Re: how to detect if a player shot a specific object - Lorenc_ - 20.08.2011

It's possible. I've remade NPC health loss with a algorithm for this, though yeah, I'd advise you look at RyDeR`'s Un-occupied vehicle shooting script (shooting the petrol caps), it'll have all the necessary functions for this.