Getting position where player aims
#1

Hey guys, I'm curious, is there a way to get the position where the player's crosshair is looking at (while aiming for example)? or to check if a player aims at another player.
I'm remaking Battlefield 2 on a sa-mp server, and I want to make the 'spot' function, so if someone aims at someone else, presses a button, the player gets spotted on the map (like BF2).
But I need to know either where the player's crosshair is aiming at, or when aiming at a person.
Thanks in advance
Reply
#2

Dammed! This is the first time since like a half year that I ask something on sa-mp forums, and now i have to...
'Bump'
Reply
#3

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer

This will help
Reply
#4

i beleive

Код:
GetPlayerTargetPlayer(playerid);
https://sampwiki.blast.hk/wiki/GetPlayerTargetPlayer

would help you

or this
OnPlayerTargetPlayer(playerid,newtarget,oldtarget)
https://sampforum.blast.hk/showthread.php?tid=293558

witch is being called when someone aims at the ohter
Код:
public OnPlayerTargetPlayer(playerid,newtarget,oldtarget)
{
   SetPlayerMarkerForPlayer............
}
Reply
#5

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
i beleive

Код:
GetPlayerTargetPlayer(playerid);
https://sampwiki.blast.hk/wiki/GetPlayerTargetPlayer

would help you

or this
OnPlayerTargetPlayer(playerid,newtarget,oldtarget)
https://sampforum.blast.hk/showthread.php?tid=293558

witch is being called when someone aims at the ohter
Код:
public OnPlayerTargetPlayer(playerid,newtarget,oldtarget)
{
   SetPlayerMarkerForPlayer............
}
Exactly what i needed, thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)