note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
EnablePlayerCameraTarget
warning
This function was added in SA-MP 0.3.7 and will not work in earlier versions!
Description
Toggle camera targeting functions for a player. Disabled by default to save bandwidth.
Name | Description |
---|---|
playerid | The ID of the player to toggle camera targeting functions for. |
bool:enable | 'true' to enable camera targeting functions and 'false' to disable them. |
Returns
true - The function executed successfully.
false - The function failed to execute. The player is not connected.
Examples
public OnPlayerConnect(playerid)
{
EnablePlayerCameraTarget(playerid, true);
return 1;
}
Related Functions
- IsPlayerCameraTargetEnabled: Check if the player camera target is enabled.
- GetPlayerCameraTargetVehicle: Get the ID of the vehicle a player is looking at.
- GetPlayerCameraTargetPlayer: Get the ID of the player a player is looking at.
- GetPlayerCameraFrontVector: Get the player's camera front vector