Help with SetPlayerCameraPos. - 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: Help with SetPlayerCameraPos. (
/showthread.php?tid=369301)
Help with SetPlayerCameraPos. -
TaLhA XIV - 16.08.2012
Hello,
I wanted to ask that how can I use SetPlayerCameraPos for making CCTV cameras,I mean how can I get the correct coordinates,and can someone provide me some small codes that explain the cmd better.
ThAnKs!.
Re: Help with SetPlayerCameraPos. -
BigGroter - 16.08.2012
/save name, saves your current position.
Re: Help with SetPlayerCameraPos. -
Ranama - 16.08.2012
SetPlayerCameraPos(playerid, x,y,z) are used for setting the camera to exactly that location.
SetCameraLookAt(playerid, x,y,z) are used for setting the location the players camera will be looking at.
SetcameraBehindPlayer(playerid) will set the camera behind the player when you are finished
wiki links:
https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
https://sampwiki.blast.hk/wiki/SetPlayerCameraPos
https://sampwiki.blast.hk/wiki/SetCameraBehindPlayer
Hope it helped
Re: Help with SetPlayerCameraPos. -
TaLhA XIV - 16.08.2012
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/test", cmdtext, true, 10) == 0)
{
SetPlayerCameraPos(playerid,1962.6359,1355.6021,9.2578);
return 1;
}
return 0;
}
Can you edit this for me please.
Re: Help with SetPlayerCameraPos. -
BigGroter - 16.08.2012
Edit it how? Where do you want it to be?
Re: Help with SetPlayerCameraPos. -
Cena44 - 16.08.2012
well if you want the CCTV camera to look at LSPD you will have to:
go back a few steps and type /save, add more meters to the Z so if it's 20 make it 30 or 35
pawn Код:
SetPlayerCameraPos(playerid, x,y,z)
This will be the place where will the camera looks: usually add your pos if you want it to look at you.
pawn Код:
SetCameraLookAt(playerid, x,y,z)