SA-MP Forums Archive
Login screen view. - 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: Login screen view. (/showthread.php?tid=576883)



Login screen view. - C4SH - 07.06.2015

My script basically loads the registration/login dialog OnPlayerConnect, it loads the dialog properly but I've got code that should show a view OnPlayerConnect behind the dialog, but it doesn't seem to be working properly. Can someone assist me.

The code I'm using is under the callback OnPlayerConnect.
Код:
SetPlayerCameraPos(playerid,-2639.7759,1160.9636,166.0073);
SetPlayerCameraLookAt(playerid,-1822.1753,772.0064,137.3224);



Re: Login screen view. - Kruno88 - 07.06.2015

I'm not sure what you mean but you should setplayercamera pos and view on playerconnect and set a little timer after it.If you mean that :/


Re: Login screen view. - theYiin - 07.06.2015

You can't change player camera position in OnPlayerConnect callback.
http://forum.sa-mp.com/showthread.ph...43#post1454643


Re: Login screen view. - JonathanW - 07.06.2015

Put this under
"OnPlayerRequestClass"
or either,
"OnPlayerRequestSpawn".
Try that.


Re: Login screen view. - Sithis - 07.06.2015

I like to do the login/spawn checking in OnPlayerRequestClass and set the camera position there.


Re: Login screen view. - FrankTimber - 08.06.2015

Because the login screen is defined as the player spectating, you can simply use InterpolateCameraLookAt as a workaround. Just set the positions twice. For example:

Код:
InterpolateCameraLookAt(playerid, ,-1822.1753,772.0064,137.3224,-1822.1753,772.0064,137.3224, 5000, CAMERA_MOVE);



Re: Login screen view. - bgedition - 08.06.2015

Hey, I have question for you? How you are blocking the spawn buttons??
and in for your question:
Код:
OnPlayerRequestClass(playerid, classid) {
    SetPlayerCameraPos(playerid,-2639.7759,1160.9636,166.0073);
    SetPlayerCameraLookAt(playerid,-1822.1753,772.0064,137.3224);
}