SA-MP Forums Archive
LOS [Line Of Sight] - Calculations - 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: LOS [Line Of Sight] - Calculations (/showthread.php?tid=153244)



LOS [Line Of Sight] - Calculations - clavador - 08.06.2010


I'm intrigued now because of what a guy said that with the bodydetection include you can shoot pleople from behind walls.

Is there a way to calculate line of sight in SAMP? (not waiting for the next release, if it does have a check like this).

We would need the x, y & z values from all the buildings or terrain to check that, right?




Re: LOS [Line Of Sight] - Calculations - cessil - 08.06.2010

yes you would unless your map was 100% custom objects


Re: LOS [Line Of Sight] - Calculations - ev0lution - 08.06.2010

Sort of.
http://forum.sa-mp.com/index.php?top...4491#msg964491


Re: LOS [Line Of Sight] - Calculations - clavador - 08.06.2010

Quote:
Originally Posted by ev0lutionnn
Mmmm... interesting... I'll be playing with that.

Thanks


Re: LOS [Line Of Sight] - Calculations - Giacomand - 08.06.2010

If you only needed it so that you can give more damage to the gun then you could just check if the player's aiming at a person and fired then you can check the player's health to see if it has decreased.


Re: LOS [Line Of Sight] - Calculations - clavador - 08.06.2010

Quote:
Originally Posted by Giacomand
If you only needed it so that you can give more damage to the gun then you could just check if the player's aiming at a person and fired then you can check the player's health to see if it has decreased.
No, what I need is to check LOS when I'm aiming to a bot, because the calculations only detect when I aim the npc, no matter if there's a wall or not.