SA-MP Forums Archive
Camera problem! - 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: Camera problem! (/showthread.php?tid=657338)



Camera problem! - Tenka - 05.08.2018

https://*********/rR_9mtzVnug Here the video

When i try to put my password incorrect and the camera change after that
I put the camera to every function in my login or register system but its doesnt work
So here is my code

https://pastebin.com/5rpEhxdQ


Re: Camera problem! - DBZdabIt3Bro7 - 05.08.2018

To start off with, read this: https://sampforum.blast.hk/showthread.php?tid=341545

You shouldn't be use the macro "function:" for the camera, it should be plain text.

PHP код:
SetPlayerLoginCamera(playerid
Second, toggling the player to spectate is what causes your camera functions to not have an effect since you're calling the functions directly after.

PHP код:
        Camera(playerid);
        
TogglePlayerSpectating(playeridtrue); 
Instead, you could switch to using InterpolateCameraPos and InterpolateCameraLookAt.

https://sampwiki.blast.hk/wiki/InterpolateCameraPos
https://sampwiki.blast.hk/wiki/InterpolateCameraLookAt

You can set the type to CAMERA_CUT with a small interval of 1 millisecond or less.


Re: Camera problem! - Tenka - 06.08.2018

Quote:
Originally Posted by DBZdabIt3Bro7
Посмотреть сообщение
To start off with, read this: https://sampforum.blast.hk/showthread.php?tid=341545

You shouldn't be use the macro "function:" for the camera, it should be plain text.

PHP код:
SetPlayerLoginCamera(playerid
Second, toggling the player to spectate is what causes your camera functions to not have an effect since you're calling the functions directly after.

PHP код:
        Camera(playerid);
        
TogglePlayerSpectating(playeridtrue); 
Instead, you could switch to using InterpolateCameraPos and InterpolateCameraLookAt.

https://sampwiki.blast.hk/wiki/InterpolateCameraPos
https://sampwiki.blast.hk/wiki/InterpolateCameraLookAt

You can set the type to CAMERA_CUT with a small interval of 1 millisecond or less.
Wow, Thank you so much man all problem is gone