SA-MP Forums Archive
How to get camera Positions??? - 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: How to get camera Positions??? (/showthread.php?tid=280739)



How to get camera Positions??? - seanny - 02.09.2011

Hello, I am confused, Is their anyway (or Programm) to get camera positions? I am completly Confused, Please Help


Re: How to get camera Positions??? - Kingunit - 02.09.2011

You are having a Camhack or something like that. You can also just /save ingame. Drive with a Maverick (Camera inside the vehicle with V)


Re: How to get camera Positions??? - Kingunit - 02.09.2011

Quote:
Originally Posted by Las Venturas CNR
Посмотреть сообщение
I think he's talking about creating OnPlayerRequestClass positions and cameras.
Код:
'to get camera positions'
He is saying he want a camera position (X,Y,Z). Or he is explaining it wrong.

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 66 seconds.



Re: How to get camera Positions??? - seanny - 02.09.2011

No No, I aint talking about "OnPlayerRequestClass" I am trying to ask how to get camera positions, So I can create an RP Script Tutorial


Re: How to get camera Positions??? - Kingunit - 02.09.2011

Quote:
Originally Posted by seanny
Посмотреть сообщение
No No, I aint talking about "OnPlayerRequestClass" I am trying to ask how to get camera positions, So I can create an RP Script Tutorial
Then read my post.


Re: How to get camera Positions??? - seanny - 02.09.2011

Can you change that to either strcmp or DCMD


Re: How to get camera Positions??? - Kingunit - 02.09.2011

pawn Код:
if(!strcmp("/savecampos", cmdtext))
{
    if(!IsPlayerAdmin(playerid)) return 0;
    if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Usage: /savecampos [Comment]");
    new path[128], File:ffile, Float:xp, Float:yp, Float:zp;
    GetPlayerCameraPos(playerid, xp, yp, zp);
    ffile = fopen("CamViews.txt", io_append);
    format(path, sizeof(path), "Camera Position: %0.2f %0.2f %0.2f - %s\n", xp, yp, zp, params);
    fwrite(ffile, path);
    fclose(ffile);
    return 1;
}
Untested, and credits to: Las Venturas CNR


Re: How to get camera Positions??? - seanny - 02.09.2011

Thx But is it in Dini or what?


Re: How to get camera Positions??? - Kingunit - 02.09.2011

It's making a new .txt file. So no DINI or Y_INI or whatever. It's just creating a new .txt file.


Re : How to get camera Positions??? - Alvin007 - 02.09.2011

a very usefull thing:
take a maverick ,fly to the place the camera will be looking from and do /save.
take the maverick or go with your character, to the place the where the camera will be looking at and do /save.

then you do SetCameraPosition and place (x , y, z ) from the first /save
the you do SetCameraLookAt and place (x ,y ,z) from the 2nd /save
That's all