SA-MP Forums Archive
GetPlayerLookingAt or GetPlayerAimingPoint - 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: GetPlayerLookingAt or GetPlayerAimingPoint (/showthread.php?tid=128392)



GetPlayerLookingAt or GetPlayerAimingPoint - Coicatak - 17.02.2010

How to get what point the player is aiming with a gun? This assume you need the z coords as well.
Actually I juste want to know what point player aims with his cursor. I'm sure it is possible with trigonometry and as we have the SetPlayerCameraLookAt which is similar.

Any idea?


Re: GetPlayerLookingAt or GetPlayerAimingPoint - dice7 - 17.02.2010

You mean GetPlayerFacingAngle ?
If you're looking for how to get the x and y in front of the player, then search for GetXYInfronOfPlayer


Re: GetPlayerLookingAt or GetPlayerAimingPoint - Coicatak - 17.02.2010

No I mean the aiming point with a gun, where the sursor is, no it needs Z coordonitane as well. But I've found other topics and saw that it was impossible...