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



Targets. - audriuxxx - 29.10.2013

Hi,

I want to make target's, but what is them object? and how chech when player shoot to target, and i can to destroy him?


Re: Targets. - Krakuski - 29.10.2013

Target Objects are from 1583 - 1592, and 3018 - 3025. Im not actually sure if they collapse or not. Is that what you have been looking for?


AW: Targets. - audriuxxx - 30.10.2013

But how to check is player shoot to the target?


Re: Targets. - Pottus - 30.10.2013

You can use the NPC hit detection I posted here.

https://sampforum.blast.hk/showthread.php?tid=355849&page=61

All you really need to do is code in the OnPlayerShoot() callback to check your targets with the BulletCollisionSphere() function there is another way to do it with this https://sampforum.blast.hk/showthread.php?tid=140765 I have no idea how accurate it is but I know BulletCollisionSphere() isn't 100 percent accurate but I get the feeling by this reply that the accuracy isn't good.

Quote:
Originally Posted by niCe
Посмотреть сообщение
Well, for better accuracy when detecting aiming at a player, I recommend creating 4 hitting zones instead of one with 1.1 radius.