SetPlayerCamersPos Promblem
#1

if used this code:
Код:
new Float:P[3];
GetPlayerPos(playerid,P[0],P[1],P[2]);
GetXYInfrontOfPlayer(playerid,P[0],P[1],20.0);
SetPlayerCameraPos(playerid,P[0],P[1],P[2]);
in OnPlayerUpdate.
try it in your mode and see: its not working !
i can't set the camera pos.
i want the camera to be away from the player...

edit:
i now know the promlem:
i should do:

Код:
SetPlayerCameraPos(playerid,P[0],P[1],P[2]);
SetPlayerCameraLookAt(playerid,P[0],P[1],P[2]);
tnk...
Reply
#2

Yes, you got your code working..?
Reply
#3

Yes, but, i have a new problem:

Код:
new Keys,ud,lr;
GetPlayerKeys(playerid,Keys,ud,lr);
if(Keys & 128)
{
	new Float:P[3];
	GetPlayerPos(playerid,P[0],P[1],P[2]);
	SetPlayerCameraLookAt(playerid,P[0],P[1],P[2] + 0.5);
	GetXYBehindPlayer(playerid,P[0],P[1],0.001);
	SetPlayerCameraPos(playerid,P[0],P[1],P[2] + 0.5);
    VBS[playerid][CamMoved] = 0;
}
else
{
	if(VBS[playerid][CamMoved] != 1)
	{
		SetCameraBehindPlayer(playerid);
		VBS[playerid][CamMoved] = 1;
	}
}
this code shout make a FPS camera when i prees the aim key and regular camera when i dont prees but its not working.
when i prees the right button, the camera is in a position that i want ( FPS ) but i cant aim ( i can move but i cant move the gun ).
help ?

[img width=960 height=768]http://up203.siz.co.il/up1/maztyizmnjmh.jpg[/img]
Reply
#4

Try explaining again, count to ten after writing one word, try to write so we can understand too
Reply
#5

Quote:
Originally Posted by Assyria
Try explaining again, count to ten after writing one word, try to write so we can understand too
When i moving the camera to the pos in the image, i can't aim - that the problem.
Reply
#6

When using SetPlayerCamera, the mouse gets disabled. You can re-enable it with SetCameraBehindPlayer(playerid);
Reply
#7

Quote:
Originally Posted by dice7
When using SetPlayerCamera, the mouse gets disabled. You can re-enable it with SetCameraBehindPlayer(playerid);
Sow there is another way to create FPS camera like in the image?
Reply
#8

Try this http://forum.sa-mp.com/index.php?topic=95936
Reply
#9

Quote:
Originally Posted by sushihusi
Its not working in 0.3
Reply
#10

SRY I didnt know
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)