SA-MP Forums Archive
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: SetPlayerCameraPos ?? (/showthread.php?tid=396632)



SetPlayerCameraPos ?? - Azazelo - 01.12.2012

How to set camera to look like (camera when player aim) ?


Re: SetPlayerCameraPos ?? - [HK]Ryder[AN] - 01.12.2012

I didn't understand you..what do you mean?
you want a camera to look like a camera?


Re: SetPlayerCameraPos ?? - Azazelo - 01.12.2012

When player have gun and press Right Mouse Button camera with aim appears i want recreate that camera.
to act same. but be called with command.

I try
pawn Код:
GetPlayerCameraPos(player,x,y,z);
GetXYinFront(playerid,x,y,1.0);
SetPlayerCameraPos(player,x,y,z);
But i have no action on camera pos.


Re: SetPlayerCameraPos ?? - [HK]Ryder[AN] - 01.12.2012

you mean crosshair?the 4 lines or the dot which helps you to AIM?
Simply create textdraws like 4 lines and show them while player is pressing Right Click


Re: SetPlayerCameraPos ?? - Azazelo - 01.12.2012

No, i need position of camera when aim. not cross-hair.

May be this help to understand

Quote:

GetPlayerCameraPos(player,x,y,z);
GetXYinFront(playerid,x,y,1.0);
SetPlayerCameraPos(player,x,y,z);




Re: SetPlayerCameraPos ?? - [HK]Ryder[AN] - 01.12.2012

You want to know where the player is shooting/aiming?
Or do you want the position where he has his camera?

If you want the pos of the camera the code is
pawn Код:
new Float:x, Float:y, Float:z;
    GetPlayerCameraPos(playerid, x, y, z);
 
    new string[128];
    format(string, 128, "Position of the camera is %f, %f, %f", x, y, z);
    print(string);