SA-MP Forums Archive
Setting the camera angle is not working please help - 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)
+--- Thread: Setting the camera angle is not working please help (/showthread.php?tid=365348)



Setting the camera angle is not working please help - Euan Hughes - 02.08.2012

Well i am trying to make it so the camera will face a certain angle it works fine but it is just not in the right angle i am getting the right coordinates by doing these commands in game

pawn Код:
command(camerapos, playerid, params[])
{
    new string[128];
    new Float:x, Float:y, Float:z;
    GetPlayerCameraPos(playerid, x, y, z);
   
    format(string, sizeof(string), "X: %f, Y: %f, Z: %f", x, y, z);
    SendClientMessage(playerid, WHITE, string);
}

command(facinganlge, playerid, params[])
{
    new Float:Angle, string[26];
    GetPlayerFacingAngle(playerid, Angle);
    format(string, sizeof(string), "Your facing angle: %0.2f", Angle);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
}
But when i put the coordinates i get from that in to this it just dont face the right angle

pawn Код:
SetPlayerFacingAngle(playerid, 203.74);
SetPlayerCameraLookAt(playerid, 240.371902, 121.995002, 1004.219421);
SetPlayerCameraPos(playerid, 240.371902, 121.995002, 1004.219421);
Please help

Thanks