Moving the camera - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Moving the camera (
/showthread.php?tid=268728)
Moving the camera -
[IL]HeHu - 13.07.2011
I tried moving my camera on login, so it kind of moves forward but it didn't work quite how I wanted it to :P
I tried to do it with GetPlayerCameraPos and then SetPlayerCameraPos, has anybody got any other way to do it?
Re: Moving the camera -
Toni - 13.07.2011
You are using a timer, correct?
Re: Moving the camera -
[IL]HeHu - 13.07.2011
Correct
Oh and it goes every 500 milliseconds.
Re: Moving the camera -
DRIFT_HUNTER - 13.07.2011
[ame]http://www.youtube.com/watch?v=a1GaZ7fPRrA[/ame]
I use 50 mili seconds one time for each player when it stops i kill timer so its not using to much CPU
Re: Moving the camera -
[IL]HeHu - 13.07.2011
It still won't work, that's the code I used:
PHP код:
forward CameraMovement(playerid);
public CameraMovement(playerid)
{
if(LoginDialog[playerid])
{
new Float:p[3];
GetPlayerCameraPos(playerid,p[0],p[1],p[2]);
SetPlayerCameraPos(playerid,p[0],p[1]+1,p[2]);
print("Camera moved");
movetimer[playerid] = SetTimerEx("CameraMovement",50,false,"i",playerid);
return 1;
}
return 1;
}
OnPlayerRequestClass:
PHP код:
movetimer[playerid] = SetTimerEx("CameraMovement",50,false,"i",playerid);
Re: Moving the camera -
[IL]HeHu - 13.07.2011
Help, anyone?
Re: Moving the camera -
[IL]HeHu - 13.07.2011
Did it by myself :P
Thanks to everyone who tried helping!