SetPlayerCameraPos

From SA-MP Wiki

Jump to: navigation, search


Description:

Sets the camera to a specific position for a player.


Parameters:
(playerid, Float:x, Float:y, Float:z)
playeridID of the player
Float:xThe X coordinate to place the camera at.
Float:yThe Y coordinate to place the camera at.
Float:zThe Z coordinate to place the camera at.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The player specified doesn't exist.


Example Usage:

SetPlayerCameraPos(playerid, 652.23, 457.21, 10.84);
Image:32px-Circle-style-warning.png

Important
Note

Using the camera functions directly after enabling spectator mode doesn't work.


Image:32px-Ambox_warning_orange.png

Notes


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages