This function was added in SA-MP 0.3.7 and will not work in earlier versions!
Allows you to retrieve the ID of the actor the player is looking at (in any).
|playerid||The ID of the player to get the target actor of.|
The ID of the actor the player is looking at.
This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor.
This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player.
- GetPlayerTargetActor: Gets id of an actor which is aimed by certain player.
- GetPlayerCameraTargetPlayer: Get the ID of the player a player is looking at.
- GetPlayerCameraTargetVehicle: Get the ID of the vehicle a player is looking at.
- GetPlayerCameraTargetObject: Get the ID of the object a player is looking at.
- GetPlayerCameraFrontVector: Get the player's camera front vector