The Co-ordinates of 'SetCameraLookAt' should be
the same as SetPlayerPos' Co-ordinates as it is supposed to look at the position where the player is standing.
Here's an example -
Firstly, set the player's pos. to your desired Co-ordinates -
pawn Код:
SetPlayerPos(playerid,-2724.392,988.204,54.460); // Just An Example
Then Set The Camera's Pos. by changing the X,Y and Zs of SetPlayerPos' Coordiantes by some meters.
pawn Код:
SetPlayerCameraPos(playerid,-2726.348,992.213,55.236);
Then Make The Camera Face the Player, By doing this -
pawn Код:
SetPlayerCameraLookAt(playerid,-2724.392,988.204,54.460); // Note that, its co-ords. are exactly the same as setplayerpos' co-ords.
Then set the player's facing angle according to your wish -
pawn Код:
SetPlayerFacingAngle(playerid,0); // I've used Zero as an example cuz i don't want my player to change his facing angle.
And There you have it. The Whole code -
pawn Код:
SetPlayerCameraPos(playerid,-2726.348,992.213,55.236);
SetPlayerCameraLookAt(playerid,-2724.392,988.204,54.460);
SetPlayerPos(playerid,-2724.392,988.204,54.460);
SetPlayerFacingAngle(playerid,0);