SA-MP Forums Archive
Help with Basketball. - 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: Help with Basketball. (/showthread.php?tid=483116)



Help with Basketball. - xFallen - 24.12.2013

I was thinking of making a Basketball throwing system, how should i do it?
Can i use MoveObject?
Thanks.

Also how do i detect if it has hitted a player or a position?
For example if i want to throw it to another play how do i check if it has hitted him?
or if i want to shoot the hoop and i want to detect if it has hitted X,Y,Z location, how do i test for that?


Re: Help with Basketball. - xFallen - 24.12.2013

Anyone? Please?


Re: Help with Basketball. - SilentSoul - 24.12.2013

Yes , that's can be done through MoveObject , ApplyAnimations , OnPlayerKeyState (Call back used to detect the key pressed) IsPlayerInRangeOfPoint , simply you can check another filterscripts already made up and try to understand how did they make this.
https://sampforum.blast.hk/showthread.php?tid=243949
http://pastebin.com/KJ2hBmix


Re: Help with Basketball. - xFallen - 24.12.2013

Appreciate your help!
Thanks!