முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

GetPlayerCameraTargetPlayer

எச்சரிக்கை

செயல்பாடு என்பது SA-MP 0.3.7 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Allows you to retrieve the ID of the player the playerid is looking at.

NameDescription
playeridThe ID of the player to check

Returns​

The ID of the player the playerid is looking at

Examples​

new playerTarget = GetPlayerCameraTargetPlayer(playerid);

if (IsPlayerAdmin(playerTarget))
{
GameTextForPlayer(playerid, "Looking at an admin", 3000, 3);
}

Notes​

எச்சரிக்கை
  • This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player.
  • Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aiming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen).