samp.directory
← Scripts y librerías

MichaelBelgium/PlayerCameraRotateFromPoint

A San Andreas Multiplayer include to let the camera of a player rotate around a position.

Librería★ 7actualizado nov 2023MITPawnsampctl
Abrir en GitHub

Instalar con sampctl

sampctl package install MichaelBelgium/PlayerCameraRotateFromPoint

Ejecútalo en la carpeta de tu proyecto. sampctl descarga el paquete y sus dependencias.

Depende de 1 paquete

README.md

PlayerCameraRotateFromPoint

A San Andreas Multiplayer include to let the camera of a player rotate around a position.

Functions

native PlayerCameraRotateFromPoint(playerid, Float:x, Float:y, Float:z, Float:range, cam_speed = 3, bool: cam_overview = false, Float: cam_overview_height = 20.0);
native StopPlayerCameraRotate(playerid, bool:set_camera_behind = true);
native ContinuePlayerCameraRotate(playerid);
native SetPlayerCameraRotateToLeft(playerid);
native SetPlayerCameraRotateToRight(playerid);

Clarification

PlayerCameraRotateFromPoint

  • playerid - the id of the player to set the camera rotation
  • Float:x, Float:y, Float:z - the x, y and z position in-game.
  • Float: range - how far the camera should rotate from the position aka range.
  • cam_speed - the speed (in seconds) of the moving camera from stop to stop (Optional / Default = 3 seconds)
  • cam_overview - should the camera act like an "overview", meaning it'll look down to the position instead of otherwise. (Optional / Default = no)
  • cam_overview_height - the height of the camera that has to be added to the z position (so it can look down) (Optional / Default = 20)

StopPlayerCameraRotate

  • playerid - the id of the player to stop the camera rotation
  • bool: set_camera_behind - set camera behind player (Default = yes)

ContinuePlayerCameraRotate

  • playerid - the id of the player to continue the camera rotation

SetPlayerCameraRotateToLeft

  • playerid - the id of the player to set the camera rotation to left

SetPlayerCameraRotateToRight

  • playerid - the id of the player to set the camera rotation to right

Example/Installation

  • An example is located at example.pwn - just an edited bare.pwn
  • Download it manually or use sampctl: sampctl package install MichaelBelgium/PlayerCameraRotateFromPoint

Video

Here

Extra credits

  • robin_be for helping

Esta página se genera con lo que GitHub publica sobre el repositorio. samp.directory no aloja el código. Informar de un problema con esta ficha

MichaelBelgium/PlayerCameraRotateFromPoint: Librería de SA-MP | samp.directory