SA-MP Forums Archive
GetPlayerCamera? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetPlayerCamera? (/showthread.php?tid=91001)



GetPlayerCamera? - Jason_Borne420 - 11.08.2009


Hey guys Im wondering if there is a function like GetPlayerCameraPos, I have ysf, any info would be great, thanks.


Re: GetPlayerCamera? - dice7 - 11.08.2009

Make your own function e.g. SetPlayerCameraPosEx and GetPlayerCameraPos, In SetPlayerCameraPosEx save thier camera pos to a variable as well as setting it, in GetPlayerCameraPos return that variable


Re: GetPlayerCamera? - paytas - 11.08.2009

Quote:
Originally Posted by dice7
And what would that function do ?
The function name is obvious.

No, not possible actually.


Re: GetPlayerCamera? - Jason_Borne420 - 11.08.2009

Maybe someone can make me a GetPlayerCameraPos

I need to know where the camera is for this thing im doing :P

I dont want to set the camera there first either, i can already do it. I just want to acquire it


Re: GetPlayerCamera? - James_Alex - 11.08.2009

try this
pawn Код:
enum cInfo
{
    Float:cX,
    Float:cY,
    Float:cZ,
    Float:cA,
};
new CameraInfo[MAX_PLAYERS][cInfo];

stock SetPlayerCameraPosEx(playerid, Float:X, Float:Y, Float:Z)
{
    SetPlayerCameraPos(playerid, X, Y, Z);
  CameraInfo[playerid][cX] = X;
  CameraInfo[playerid][cY] = Y;
  CameraInfo[playerid][cZ] = Z;
  return 1;
}

stock GetPlayerCameraPosEx(playerid, Float:X, Float:Y, Float:Z)
{

  X = CameraInfo[playerid][cX];
  Y = CameraInfo[playerid][cY];
  Z = CameraInfo[playerid][cZ];
  return 1;
}



Re: GetPlayerCamera? - Jason_Borne420 - 16.09.2009

Thanks but you are simply setting the camera then getting that value back. My plan was to aquire the camerapos or camera angle on the player that just joined. Some mods like cleo mod change the camera position on connection (not looking at vinewood) -

When I connected at vinewwood screen i typed /save 1000 times and they all came with the exact same cordinates, but when i made a command to teleport to those coords - it was not at vinewood.

So obviously - when you first start , sa-mp sets your body in one place and your camera in another place (vinewood)

Only if /save would save camera pos & angles.... thats what I really need.